After updating WCS and WEB SDK to Nov 22 versions Safari will not play stream

Discussion in 'Web Call Server 5' started by Dani, Nov 23, 2019.

  1. Dani

    Dani Member

    I've updated both server and client to this version:
    client:
    0.5.28.2753.124

    server:
    5.2.409

    Everything works great on chrome (both streams are fine)
    On Iphone (Xr) OS: 13.2.3
    the streams goes out ok (I can see the stream on the other side) but safari shows a frozen image of the first frame and nothing more.

    Any idea what is wrong ?
    Is there a change in code needed to make this work again ?
  2. Max

    Max Administrator Staff Member

    Good day.
    Are you using parameter 'autoplay' for Player on iOS?
    We have issues with this right now and we raised internal ticket (WCS-2375) and let you know results in this topic.
  3. Dani

    Dani Member

    any updates ?
  4. Max

    Max Administrator Staff Member

    Good day.
    WCS version with this fix is on verification and will be available soon.
  5. Max

    Max Administrator Staff Member

    Good day.
    We fixed WebRTC autoplay issue in iOS Safari in WebSDK build 0.5.28.2753.132. Please update and check.
    Also, please note that autoplay can be started only with muted audio. So, you have to unmute audio after playback is started:
    Code:
        $("#volumeControl").slider({
            range: "min",
            min: 0,
            max: 100,
            value: currentVolumeValue,
            step: 10,
            animate: true,
            slide: function(event, ui) {
                //WCS-2375. fixed autoplay in ios safari
                stream.unmuteRemoteAudio();
                currentVolumeValue = ui.value;
                stream.setVolume(currentVolumeValue);
            }
        }).slider("disable");
    
    In example above (see Player code on GitHub) we unmute remote audio after volume slider moving.
    Note that autoplay does not work in Low Power Mode at all.
  6. Dani

    Dani Member

    I have updated but still frozen on latest iphone version.
    Do I need to add the unmute code for it to work on iphones ? As old js works good. Just new one frozen.
  7. Max

    Max Administrator Staff Member

  8. Dani

    Dani Member

    This is our own code - it's a chat (web) application - do I need to force autoplay on the new version ?
    currently if we detect safari with webrtc we run this:
    publishStream.muteAudio();
    publishStream.muteVideo();

    User needs to unmute using a control.
  9. Max

    Max Administrator Staff Member

    Good day.
    To use autoplay, you should start playback with muted audio, then user should unmute with volume control.
    We cannot reproduce freeze on autoplay in iOS 13.3 using latest WebSDK. Do you use playFirstVideo function like Player example?
    Code:
    function playBtnClick() {
        if (validateForm()) {
            ...
            if (Flashphoner.getMediaProviders()[0] === "WSPlayer") {
                Flashphoner.playFirstSound();
            } else if (Browser.isSafariWebRTC() || Flashphoner.getMediaProviders()[0] === "MSE") {
                Flashphoner.playFirstVideo(remoteVideo, false, PRELOADER_URL).then(function() {
                    start();
                }).catch(function () {
                    onStopped();
                });
                return;
            }
            start();
        }
    }
    

Share This Page