aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/assets')
-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
-rw-r--r--client/src/assets/player/peertube-videojs-typings.ts6
-rw-r--r--client/src/assets/player/videojs-components/peertube-load-progress-bar.ts1
-rw-r--r--client/src/assets/player/videojs-components/settings-menu-item.ts2
5 files changed, 6 insertions, 12 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) => {
diff --git a/client/src/assets/player/peertube-videojs-typings.ts b/client/src/assets/player/peertube-videojs-typings.ts
index bd6db4ffc..ea39ac44d 100644
--- a/client/src/assets/player/peertube-videojs-typings.ts
+++ b/client/src/assets/player/peertube-videojs-typings.ts
@@ -1,6 +1,7 @@
1import { HlsConfig, Level } from 'hls.js' 1import { HlsConfig, Level } from 'hls.js'
2import videojs from 'video.js' 2import videojs from 'video.js'
3import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@shared/models' 3import { VideoFile, VideoPlaylist, VideoPlaylistElement } from '@shared/models'
4import { Html5Hlsjs } from './p2p-media-loader/hls-plugin'
4import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin' 5import { P2pMediaLoaderPlugin } from './p2p-media-loader/p2p-media-loader-plugin'
5import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager' 6import { RedundancyUrlManager } from './p2p-media-loader/redundancy-url-manager'
6import { PlayerMode } from './peertube-player-manager' 7import { PlayerMode } from './peertube-player-manager'
@@ -56,12 +57,11 @@ declare module 'video.js' {
56} 57}
57 58
58export interface VideoJSTechHLS extends videojs.Tech { 59export interface VideoJSTechHLS extends videojs.Tech {
59 hlsProvider: any // FIXME: typings 60 hlsProvider: Html5Hlsjs
60} 61}
61 62
62export interface HlsjsConfigHandlerOptions { 63export interface HlsjsConfigHandlerOptions {
63 hlsjsConfig?: HlsConfig & { cueHandler: any }// FIXME: typings 64 hlsjsConfig?: HlsConfig
64 captionConfig?: any // FIXME: typings
65 65
66 levelLabelHandler?: (level: Level) => string 66 levelLabelHandler?: (level: Level) => string
67} 67}
diff --git a/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts b/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts
index 7869b56ce..623e70eb2 100644
--- a/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts
+++ b/client/src/assets/player/videojs-components/peertube-load-progress-bar.ts
@@ -25,7 +25,6 @@ class PeerTubeLoadProgressBar extends Component {
25 const torrent = this.player().webtorrent().getTorrent() 25 const torrent = this.player().webtorrent().getTorrent()
26 if (!torrent) return 26 if (!torrent) return
27 27
28 // FIXME: typings
29 (this.el() as HTMLElement).style.width = (torrent.progress * 100) + '%' 28 (this.el() as HTMLElement).style.width = (torrent.progress * 100) + '%'
30 } 29 }
31 30
diff --git a/client/src/assets/player/videojs-components/settings-menu-item.ts b/client/src/assets/player/videojs-components/settings-menu-item.ts
index d27163373..67e71b4e2 100644
--- a/client/src/assets/player/videojs-components/settings-menu-item.ts
+++ b/client/src/assets/player/videojs-components/settings-menu-item.ts
@@ -56,7 +56,7 @@ class SettingsMenuItem extends MenuItem {
56 56
57 const newOptions = Object.assign({}, options, { entry: options.menuButton, menuButton: this }) 57 const newOptions = Object.assign({}, options, { entry: options.menuButton, menuButton: this })
58 58
59 this.subMenu = new SubMenuComponent(this.player(), newOptions) as any // FIXME: typings 59 this.subMenu = new SubMenuComponent(this.player(), newOptions) as SettingsButton
60 const subMenuClass = this.subMenu.buildCSSClass().split(' ')[0] 60 const subMenuClass = this.subMenu.buildCSSClass().split(' ')[0]
61 this.settingsSubMenuEl_.className += ' ' + subMenuClass 61 this.settingsSubMenuEl_.className += ' ' + subMenuClass
62 62