diff --git a/src/lib/video/modal-video-manager.js b/src/lib/video/modal-video-manager.js index fcc7bebf06cd46c1bd9dc4f02ac116146500d43e..fee3d452d7102df5df5884c5b27450987d1b5f71 100644 --- a/src/lib/video/modal-video-manager.js +++ b/src/lib/video/modal-video-manager.js @@ -16,17 +16,17 @@ class ModalVideoManager { } - enableVideo (onPermissionSuccess, afterFrameDraw) { + enableVideo (onPermissionSuccess, onVideoLoaded) { const thisContext = this; - this._videoProvider.enableVideo(afterFrameDraw).then(() => { + this._videoProvider.enableVideo(onVideoLoaded).then(() => { if (onPermissionSuccess) onPermissionSuccess(); const ctx = thisContext._canvas.getContext('2d'); ctx.scale(-1, 1); ctx.translate(thisContext._canvasWidth * -1, 0); - if (afterFrameDraw) { + if (onVideoLoaded) { thisContext._videoProvider.video.onloadeddata = () => { - afterFrameDraw(); + onVideoLoaded(); }; }