diff options
Diffstat (limited to 'client/src/assets/player/p2p-media-loader')
-rw-r--r-- | client/src/assets/player/p2p-media-loader/hls-plugin.ts | 4 | ||||
-rw-r--r-- | client/src/assets/player/p2p-media-loader/p2p-media-loader-plugin.ts | 5 |
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) => { |