fix(JitsiStreamPresenterEffect): frozen on Safari
Canvas rendering does not work as expected on Safari - the image stays still on the first frame. Calling play() on the video tags seems to help.
This commit is contained in:
parent
3677a2f769
commit
a0806716ae
|
@ -59,6 +59,9 @@ export default class JitsiStreamPresenterEffect {
|
|||
this._videoElement.autoplay = true;
|
||||
this._videoElement.srcObject = videoStream;
|
||||
|
||||
// autoplay is not enough to start the video on Safari, it's fine to call play() on other platforms as well
|
||||
this._videoElement.play();
|
||||
|
||||
// set the style attribute of the div to make it invisible
|
||||
videoDiv.style.display = 'none';
|
||||
|
||||
|
@ -132,6 +135,10 @@ export default class JitsiStreamPresenterEffect {
|
|||
this._desktopElement.height = parseInt(height, 10);
|
||||
this._desktopElement.autoplay = true;
|
||||
this._desktopElement.srcObject = desktopStream;
|
||||
|
||||
// autoplay is not enough to start the video on Safari, it's fine to call play() on other platforms as well
|
||||
this._desktopElement.play();
|
||||
|
||||
this._canvas.width = parseInt(width, 10);
|
||||
this._canvas.height = parseInt(height, 10);
|
||||
this._videoFrameTimerWorker = new Worker(timerWorkerScript, { name: 'Presenter effect worker' });
|
||||
|
|
Loading…
Reference in New Issue