diff options
author | Chocobozzz <me@florianbigard.com> | 2022-11-15 11:57:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-11-15 11:57:49 +0100 |
commit | 59a643aa5cf6775d27dfcc147b19c4537292d53c (patch) | |
tree | 74bc87e2f0f5581306c8ea9dd1f8acf05833a74a /client/src/assets/player/shared/webtorrent | |
parent | c2419476302b20e9fe3708d7a0a889ae18c95c1b (diff) | |
download | PeerTube-59a643aa5cf6775d27dfcc147b19c4537292d53c.tar.gz PeerTube-59a643aa5cf6775d27dfcc147b19c4537292d53c.tar.zst PeerTube-59a643aa5cf6775d27dfcc147b19c4537292d53c.zip |
Force autoplay when live starts
Using the mute
Diffstat (limited to 'client/src/assets/player/shared/webtorrent')
-rw-r--r-- | client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts b/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts index 658b7c867..46d009410 100644 --- a/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts +++ b/client/src/assets/player/shared/webtorrent/webtorrent-plugin.ts | |||
@@ -25,7 +25,7 @@ class WebTorrentPlugin extends Plugin { | |||
25 | 25 | ||
26 | private readonly playerElement: HTMLVideoElement | 26 | private readonly playerElement: HTMLVideoElement |
27 | 27 | ||
28 | private readonly autoplay: boolean = false | 28 | private readonly autoplay: boolean | string = false |
29 | private readonly startTime: number = 0 | 29 | private readonly startTime: number = 0 |
30 | private readonly savePlayerSrcFunction: videojs.Player['src'] | 30 | private readonly savePlayerSrcFunction: videojs.Player['src'] |
31 | private readonly videoDuration: number | 31 | private readonly videoDuration: number |
@@ -449,7 +449,7 @@ class WebTorrentPlugin extends Plugin { | |||
449 | return | 449 | return |
450 | } | 450 | } |
451 | 451 | ||
452 | if (this.autoplay) { | 452 | if (this.autoplay !== false) { |
453 | this.player.posterImage.hide() | 453 | this.player.posterImage.hide() |
454 | 454 | ||
455 | return this.updateVideoFile(undefined, { forcePlay: true, seek: this.startTime }) | 455 | return this.updateVideoFile(undefined, { forcePlay: true, seek: this.startTime }) |