diff --git a/src/VideoPlayer/index.js b/src/VideoPlayer/index.js index ee6a807..c6a56e4 100644 --- a/src/VideoPlayer/index.js +++ b/src/VideoPlayer/index.js @@ -69,7 +69,8 @@ const hooks = { state.playing = false }, seeked() { - state.playAfterSeek === true && videoPlayerPlugin.play() + state.playAfterSeek && + videoEl.addEventListener('canplay', () => videoPlayerPlugin.play(), { once: true }) state.playAfterSeek = null }, abort() { @@ -442,7 +443,10 @@ const videoPlayerPlugin = { export default autoSetupMixin(videoPlayerPlugin, () => { precision = - (ApplicationInstance && ApplicationInstance.stage && ApplicationInstance.stage.getRenderPrecision()) || precision + (ApplicationInstance && + ApplicationInstance.stage && + ApplicationInstance.stage.getRenderPrecision()) || + precision videoEl = setupVideoTag()