diff options
author | Chocobozzz <me@florianbigard.com> | 2019-03-07 17:06:00 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-03-18 11:17:59 +0100 |
commit | f0a3988066f72a28bb44520af072f18d91d77dde (patch) | |
tree | dfa3a92102557b567530c5dd014c90866621140a /client/src/assets/player/webtorrent | |
parent | 830b4faff15fb9c81d88e8e69fcdf94aad32bef8 (diff) | |
download | PeerTube-f0a3988066f72a28bb44520af072f18d91d77dde.tar.gz PeerTube-f0a3988066f72a28bb44520af072f18d91d77dde.tar.zst PeerTube-f0a3988066f72a28bb44520af072f18d91d77dde.zip |
Add to playlist dropdown
Diffstat (limited to 'client/src/assets/player/webtorrent')
-rw-r--r-- | client/src/assets/player/webtorrent/webtorrent-plugin.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/assets/player/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/webtorrent/webtorrent-plugin.ts index c69bf31fa..c7182acc9 100644 --- a/client/src/assets/player/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/webtorrent/webtorrent-plugin.ts | |||
@@ -6,7 +6,7 @@ import * as WebTorrent from 'webtorrent' | |||
6 | import { VideoFile } from '../../../../../shared/models/videos/video.model' | 6 | import { VideoFile } from '../../../../../shared/models/videos/video.model' |
7 | import { renderVideo } from './video-renderer' | 7 | import { renderVideo } from './video-renderer' |
8 | import { LoadedQualityData, PlayerNetworkInfo, VideoJSComponentInterface, WebtorrentPluginOptions } from '../peertube-videojs-typings' | 8 | import { LoadedQualityData, PlayerNetworkInfo, VideoJSComponentInterface, WebtorrentPluginOptions } from '../peertube-videojs-typings' |
9 | import { getRtcConfig, videoFileMaxByResolution, videoFileMinByResolution } from '../utils' | 9 | import { getRtcConfig, timeToInt, videoFileMaxByResolution, videoFileMinByResolution } from '../utils' |
10 | import { PeertubeChunkStore } from './peertube-chunk-store' | 10 | import { PeertubeChunkStore } from './peertube-chunk-store' |
11 | import { | 11 | import { |
12 | getAverageBandwidthInStore, | 12 | getAverageBandwidthInStore, |
@@ -73,6 +73,8 @@ class WebTorrentPlugin extends Plugin { | |||
73 | constructor (player: videojs.Player, options: WebtorrentPluginOptions) { | 73 | constructor (player: videojs.Player, options: WebtorrentPluginOptions) { |
74 | super(player, options) | 74 | super(player, options) |
75 | 75 | ||
76 | this.startTime = timeToInt(options.startTime) | ||
77 | |||
76 | // Disable auto play on iOS | 78 | // Disable auto play on iOS |
77 | this.autoplay = options.autoplay && this.isIOS() === false | 79 | this.autoplay = options.autoplay && this.isIOS() === false |
78 | this.playerRefusedP2P = !getStoredWebTorrentEnabled() | 80 | this.playerRefusedP2P = !getStoredWebTorrentEnabled() |