1
0
Fork 0

Force videojs to not recreate <video>

Happens with HLS playlist on iOS breaking our event listener on the
former <video> element in embed api
This commit is contained in:
Chocobozzz 2022-11-14 09:50:20 +01:00
parent 30b123257d
commit 32f44a017c
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 0 deletions

View File

@ -66,6 +66,9 @@ class P2pMediaLoaderPlugin extends Plugin {
player.ready(() => player.error(error))
return
}
// Workaround to force video.js to not re create a video element
(this.player as any).playerElIngest_ = this.player.el().parentNode
} else {
// FIXME: typings https://github.com/Microsoft/TypeScript/issues/14080
(videojs as any).Html5Hlsjs.addHook('beforeinitialize', (videojsPlayer: any, hlsjs: any) => {