aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/p2p-media-loader
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-10-22 16:18:00 +0200
committerChocobozzz <me@florianbigard.com>2021-10-22 16:18:00 +0200
commit02b2e482e0bdf16432b1ee34e95a71bbad39a4ff (patch)
tree48f45d24881ccead3fda36bc2fc9f57c054f5c03 /client/src/assets/player/p2p-media-loader
parent60dd77c6922fced1945635a16ac7ecf1df43a839 (diff)
downloadPeerTube-02b2e482e0bdf16432b1ee34e95a71bbad39a4ff.tar.gz
PeerTube-02b2e482e0bdf16432b1ee34e95a71bbad39a4ff.tar.zst
PeerTube-02b2e482e0bdf16432b1ee34e95a71bbad39a4ff.zip
Fix some old typing issues
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r--client/src/assets/player/p2p-media-loader/hls-plugin.ts4
-rw-r--r--client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts5
2 files changed, 2 insertions, 7 deletions
diff --git a/client/src/assets/player/p2p-media-loader/hls-plugin.ts b/client/src/assets/player/p2p-media-loader/hls-plugin.ts
index 17b9aba97..71c31696a 100644
--- a/client/src/assets/player/p2p-media-loader/hls-plugin.ts
+++ b/client/src/assets/player/p2p-media-loader/hls-plugin.ts
@@ -68,10 +68,6 @@ function hlsjsConfigHandler (this: videojs.Player, options: HlsjsConfigHandlerOp
68 player.srOptions_.hlsjsConfig = options.hlsjsConfig 68 player.srOptions_.hlsjsConfig = options.hlsjsConfig
69 } 69 }
70 70
71 if (!player.srOptions_.captionConfig) {
72 player.srOptions_.captionConfig = options.captionConfig
73 }
74
75 if (options.levelLabelHandler && !player.srOptions_.levelLabelHandler) { 71 if (options.levelLabelHandler && !player.srOptions_.levelLabelHandler) {
76 player.srOptions_.levelLabelHandler = options.levelLabelHandler 72 player.srOptions_.levelLabelHandler = options.levelLabelHandler
77 } 73 }
diff --git a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts
index d917fda03..f8e5e2d6b 100644
--- a/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts
+++ b/client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts
@@ -89,8 +89,7 @@ class P2pMediaLoaderPlugin extends Plugin {
89 } 89 }
90 90
91 getLiveLatency () { 91 getLiveLatency () {
92 // FIXME: typings 92 return Math.round(this.hlsjs.latency)
93 return Math.round((this.hlsjs as any).latency)
94 } 93 }
95 94
96 getHLSJS () { 95 getHLSJS () {
@@ -113,7 +112,7 @@ class P2pMediaLoaderPlugin extends Plugin {
113 initHlsJsPlayer(this.hlsjs) 112 initHlsJsPlayer(this.hlsjs)
114 113
115 // FIXME: typings 114 // FIXME: typings
116 const options = this.player.tech(true).options_ as any 115 const options = (this.player.tech(true).options_ as any)
117 this.p2pEngine = options.hlsjsConfig.loader.getEngine() 116 this.p2pEngine = options.hlsjsConfig.loader.getEngine()
118 117
119 this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => { 118 this.p2pEngine.on(Events.SegmentError, (segment: Segment, err) => {