aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-11-14 09:50:20 +0100
committerChocobozzz <me@florianbigard.com>2022-11-14 10:13:02 +0100
commit32f44a017c8037f212fc9a0a3f1c58a57eec1e4c (patch)
treeee0cb5e8f170f80992e7e62108924ecbb68576b9 /client
parent30b123257dfe0c4aa10c828a0773cac3b6e5149b (diff)
downloadPeerTube-32f44a017c8037f212fc9a0a3f1c58a57eec1e4c.tar.gz
PeerTube-32f44a017c8037f212fc9a0a3f1c58a57eec1e4c.tar.zst
PeerTube-32f44a017c8037f212fc9a0a3f1c58a57eec1e4c.zip
Force videojs to not recreate <video>
Happens with HLS playlist on iOS breaking our event listener on the former <video> element in embed api
Diffstat (limited to 'client')
-rw-r--r--client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts
index 0757aa5de..b608ee3e2 100644
--- a/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts
+++ b/client/src/assets/player/shared/p2p-media-loader/p2p-media-loader-plugin.ts
@@ -66,6 +66,9 @@ class P2pMediaLoaderPlugin extends Plugin {
66 player.ready(() => player.error(error)) 66 player.ready(() => player.error(error))
67 return 67 return
68 } 68 }
69
70 // Workaround to force video.js to not re create a video element
71 (this.player as any).playerElIngest_ = this.player.el().parentNode
69 } else { 72 } else {
70 // FIXME: typings https://github.com/Microsoft/TypeScript/issues/14080 73 // FIXME: typings https://github.com/Microsoft/TypeScript/issues/14080
71 (videojs as any).Html5Hlsjs.addHook('beforeinitialize', (videojsPlayer: any, hlsjs: any) => { 74 (videojs as any).Html5Hlsjs.addHook('beforeinitialize', (videojsPlayer: any, hlsjs: any) => {