Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

When video should be played on mobile device, browser can require some user actions by default (button pressing etc). To bypass this, playFirstSound() function (when stream is played using WSPlayer only) and playFirstVideo() function (when stream is played via WebRTC in iOS Safari and via MSE in another browsers) should be called as follows:

code

        if (Flashphoner.getMediaProviders()[0] === "WSPlayer") {
            Flashphoner.playFirstSound();
        } else if (Browser.isSafariWebRTC() || Flashphoner.getMediaProviders()[0] === "MSE") {
            Flashphoner.playFirstVideo(remoteVideo, false, PRELOADER_URL).then(function() {
                start();
            });
            return;
        }

playFirstVideo function returns Promise which is resolved if a test video fragment was successfully played in remoteVideo page element by URL PRELOADER_URL. When Promise is resolved, server video stream playback can be run in this video element. If Promise was rejected, playback can not be run.

This function should be called to play any video including SIP video call.


  • No labels