Browse Source

Force videojs to not recreate <video>

Happens with HLS playlist on iOS breaking our event listener on the
former <video> element in embed api
develop
Chocobozzz 1 week ago
parent
commit
32f44a017c
No known key found for this signature in database GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts

+ 3
- 0
client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts 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) => {


Loading…
Cancel
Save