diff options
Diffstat (limited to 'client/src/assets/player/webtorrent/webtorrent-plugin.ts')
-rw-r--r-- | client/src/assets/player/webtorrent/webtorrent-plugin.ts | 7 |
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 @@ | |||
1 | import videojs, { VideoJsPlayer } from 'video.js' | 1 | import videojs from 'video.js/dist/alt/video.core.js' |
2 | |||
3 | import * as WebTorrent from 'webtorrent' | 2 | import * as WebTorrent from 'webtorrent' |
4 | import { renderVideo } from './video-renderer' | 3 | import { renderVideo } from './video-renderer' |
5 | import { LoadedQualityData, PlayerNetworkInfo, WebtorrentPluginOptions } from '../peertube-videojs-typings' | 4 | import { 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) |