aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/assets/player/webtorrent
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-17 11:20:12 +0200
committerChocobozzz <me@florianbigard.com>2020-04-17 14:12:43 +0200
commit7e37e111116e41530749b88327bc601cb39ade03 (patch)
treea141a84b6999029084629d45a3d5addbfa34e603 /client/src/assets/player/webtorrent
parentbb3933ef370c46be6090e4e522c6e3f5b7144f4c (diff)
downloadPeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.gz
PeerTube-7e37e111116e41530749b88327bc601cb39ade03.tar.zst
PeerTube-7e37e111116e41530749b88327bc601cb39ade03.zip
Fix videojs typings
Diffstat (limited to 'client/src/assets/player/webtorrent')
-rw-r--r--client/src/assets/player/webtorrent/webtorrent-plugin.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
index bf6b0a718..26fb5a245 100644
--- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts
+++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts
@@ -1,5 +1,4 @@
1import videojs, { VideoJsPlayer } from 'video.js' 1import videojs from 'video.js/dist/alt/video.core.js'
2
3import * as WebTorrent from 'webtorrent' 2import * as WebTorrent from 'webtorrent'
4import { renderVideo } from './video-renderer' 3import { renderVideo } from './video-renderer'
5import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings' 4import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings'
@@ -31,7 +30,7 @@ class WebTorrentPlugin extends Plugin {
31 30
32 private readonly autoplay: boolean = false 31 private readonly autoplay: boolean = false
33 private readonly startTime: number = 0 32 private readonly startTime: number = 0
34 private readonly savePlayerSrcFunction: VideoJsPlayer['src'] 33 private readonly savePlayerSrcFunction: videojs.Player['src']
35 private readonly videoDuration: number 34 private readonly videoDuration: number
36 private readonly CONSTANTS = { 35 private readonly CONSTANTS = {
37 INFO_SCHEDULER: 1000, // Don't change this 36 INFO_SCHEDULER: 1000, // Don't change this
@@ -69,7 +68,7 @@ class WebTorrentPlugin extends Plugin {
69 68
70 private downloadSpeeds: number[] = [] 69 private downloadSpeeds: number[] = []
71 70
72 constructor (player: VideoJsPlayer, options?: WebtorrentPluginOptions) { 71 constructor (player: videojs.Player, options?: WebtorrentPluginOptions) {
73 super(player) 72 super(player)
74 73
75 this.startTime = timeToInt(options.startTime) 74 this.startTime = timeToInt(options.startTime)