diff options
Diffstat (limited to 'client/src/assets/player/peertube-videojs-plugin.ts')
-rw-r--r-- | client/src/assets/player/peertube-videojs-plugin.ts | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/client/src/assets/player/peertube-videojs-plugin.ts b/client/src/assets/player/peertube-videojs-plugin.ts index b62dcb829..35a347e99 100644 --- a/client/src/assets/player/peertube-videojs-plugin.ts +++ b/client/src/assets/player/peertube-videojs-plugin.ts | |||
@@ -4,18 +4,17 @@ import { VideoFile } from '../../../../shared/models/videos/video.model' | |||
4 | import { renderVideo } from './video-renderer' | 4 | import { renderVideo } from './video-renderer' |
5 | import './settings-menu-button' | 5 | import './settings-menu-button' |
6 | import { PeertubePluginOptions, VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' | 6 | import { PeertubePluginOptions, VideoJSComponentInterface, videojsUntyped } from './peertube-videojs-typings' |
7 | import { isMobile, videoFileMaxByResolution, videoFileMinByResolution } from './utils' | ||
8 | import * as CacheChunkStore from 'cache-chunk-store' | ||
9 | import { PeertubeChunkStore } from './peertube-chunk-store' | ||
7 | import { | 10 | import { |
8 | getAverageBandwidth, | 11 | getAverageBandwidthInStore, |
9 | getStoredMute, | 12 | getStoredMute, |
10 | getStoredVolume, isMobile, | 13 | getStoredVolume, |
11 | saveAverageBandwidth, | 14 | saveAverageBandwidth, |
12 | saveMuteInStore, | 15 | saveMuteInStore, |
13 | saveVolumeInStore, | 16 | saveVolumeInStore |
14 | videoFileMaxByResolution, | 17 | } from './peertube-player-local-storage' |
15 | videoFileMinByResolution | ||
16 | } from './utils' | ||
17 | import * as CacheChunkStore from 'cache-chunk-store' | ||
18 | import { PeertubeChunkStore } from './peertube-chunk-store' | ||
19 | 18 | ||
20 | const Plugin: VideoJSComponentInterface = videojs.getPlugin('plugin') | 19 | const Plugin: VideoJSComponentInterface = videojs.getPlugin('plugin') |
21 | class PeerTubePlugin extends Plugin { | 20 | class PeerTubePlugin extends Plugin { |
@@ -148,7 +147,7 @@ class PeerTubePlugin extends Plugin { | |||
148 | ) { | 147 | ) { |
149 | // Automatically choose the adapted video file | 148 | // Automatically choose the adapted video file |
150 | if (videoFile === undefined) { | 149 | if (videoFile === undefined) { |
151 | const savedAverageBandwidth = getAverageBandwidth() | 150 | const savedAverageBandwidth = getAverageBandwidthInStore() |
152 | videoFile = savedAverageBandwidth | 151 | videoFile = savedAverageBandwidth |
153 | ? this.getAppropriateFile(savedAverageBandwidth) | 152 | ? this.getAppropriateFile(savedAverageBandwidth) |
154 | : this.pickAverageVideoFile() | 153 | : this.pickAverageVideoFile() |