aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-11 10:57:58 +0200
committerChocobozzz <me@florianbigard.com>2022-08-11 10:57:58 +0200
commitaeb112edbe8524fdd25fcaa339e8cfab63bc16db (patch)
tree2f995d408df7838ee7bc291dd200a44337de4ef3
parentb1053a30f6979ad097965efd1fa661ed37209f78 (diff)
downloadPeerTube-aeb112edbe8524fdd25fcaa339e8cfab63bc16db.tar.gz
PeerTube-aeb112edbe8524fdd25fcaa339e8cfab63bc16db.tar.zst
PeerTube-aeb112edbe8524fdd25fcaa339e8cfab63bc16db.zip
Don't autoplay in embed with waiting/ended live
-rw-r--r--client/src/standalone/videos/shared/player-manager-options.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/standalone/videos/shared/player-manager-options.ts b/client/src/standalone/videos/shared/player-manager-options.ts
index 2eeb5ecac..9cebdcd10 100644
--- a/client/src/standalone/videos/shared/player-manager-options.ts
+++ b/client/src/standalone/videos/shared/player-manager-options.ts
@@ -6,6 +6,7 @@ import {
6 VideoCaption, 6 VideoCaption,
7 VideoDetails, 7 VideoDetails,
8 VideoPlaylistElement, 8 VideoPlaylistElement,
9 VideoState,
9 VideoStreamingPlaylistType 10 VideoStreamingPlaylistType
10} from '../../../../../shared/models' 11} from '../../../../../shared/models'
11import { P2PMediaLoaderOptions, PeertubePlayerManagerOptions, PlayerMode, VideoJSCaption } from '../../../assets/player' 12import { P2PMediaLoaderOptions, PeertubePlayerManagerOptions, PlayerMode, VideoJSCaption } from '../../../assets/player'
@@ -108,6 +109,10 @@ export class PlayerManagerOptions {
108 const params = new URL(window.location.toString()).searchParams 109 const params = new URL(window.location.toString()).searchParams
109 110
110 this.autoplay = getParamToggle(params, 'autoplay', false) 111 this.autoplay = getParamToggle(params, 'autoplay', false)
112 // Disable auto play on live videos that are not streamed
113 if (video.state.id === VideoState.LIVE_ENDED || video.state.id === VideoState.WAITING_FOR_LIVE) {
114 this.autoplay = false
115 }
111 116
112 this.controls = getParamToggle(params, 'controls', true) 117 this.controls = getParamToggle(params, 'controls', true)
113 this.controlBar = getParamToggle(params, 'controlBar', true) 118 this.controlBar = getParamToggle(params, 'controlBar', true)