...
Code Block | ||||
---|---|---|---|---|
| ||||
session.createStream({ name: streamName, display: remoteVideo }).on(STREAM_STATUS.PENDING, function (stream) { ... }).on(STREAM_STATUS.PLAYING, function (stream) { setStatus("#playStatus", stream.status()); onPlaying(stream); if (Browser.isSafariWebRTC() && Browser.isiOS() && Flashphoner.getMediaProviders()[0] === "WebRTC") { setTimeout(function () { muteVideo(); unmuteVideo(); }, 1500); } ... }).play(); |
Additional video stream playing delay
Sometimes it is necessary to add a certain fixed delay relative to translation while playing a stream. To do this, the option playoutDelay can be used since WebSDK build 0.5.28.2753.142 shipped with WCS build 5.2.708 and later:
Code Block | ||||
---|---|---|---|---|
| ||||
session.createStream({
name: streamName,
display: remoteVideo,
playoutDelay: 10
}).on(STREAM_STATUS.PENDING, function (stream) {
...
}).play(); |
The delay is set in seconds.
The option works in Chromium browsers only which support the attribute
Code Block | ||||
---|---|---|---|---|
| ||||
partial interface RTCRtpReceiver {
attribute double? playoutDelayHint;
}; |
The delay is not applied to audio tracks in the stream and to aoudio only streams.
Known issues
1. Possible bug in the Safari browser on iOS leads to freezes while playing via WebRTC
...