aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-05 11:57:38 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-07 08:58:29 +0200
commit1a8c2d74d1022cfddc4a12881a4c167ff3eedb3d (patch)
tree77e8c8a1d5c893ca566c88e92f8d7b519200e6e9 /client/src/standalone/videos/embed.ts
parent56674bb9f81775ff85115e7daa7d9be0db95c001 (diff)
downloadPeerTube-1a8c2d74d1022cfddc4a12881a4c167ff3eedb3d.tar.gz
PeerTube-1a8c2d74d1022cfddc4a12881a4c167ff3eedb3d.tar.zst
PeerTube-1a8c2d74d1022cfddc4a12881a4c167ff3eedb3d.zip
Handle start at/stop at in playlist embed
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r--client/src/standalone/videos/embed.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 786d749a4..f12b8c9ac 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -441,11 +441,13 @@ export class PeerTubeEmbed {
441 controls: this.controls, 441 controls: this.controls,
442 muted: this.muted, 442 muted: this.muted,
443 loop: this.loop, 443 loop: this.loop,
444
444 captions: videoCaptions.length !== 0, 445 captions: videoCaptions.length !== 0,
445 startTime: this.startTime,
446 stopTime: this.stopTime,
447 subtitle: this.subtitle, 446 subtitle: this.subtitle,
448 447
448 startTime: this.playlist ? this.currentPlaylistElement.startTimestamp : this.startTime,
449 stopTime: this.playlist ? this.currentPlaylistElement.stopTimestamp : this.stopTime,
450
449 nextVideo: this.playlist ? () => this.playNextVideo() : undefined, 451 nextVideo: this.playlist ? () => this.playNextVideo() : undefined,
450 hasNextVideo: this.playlist ? () => !!this.getNextPlaylistElement() : undefined, 452 hasNextVideo: this.playlist ? () => !!this.getNextPlaylistElement() : undefined,
451 453
@@ -506,7 +508,12 @@ export class PeerTubeEmbed {
506 508
507 if (this.isPlaylistEmbed()) { 509 if (this.isPlaylistEmbed()) {
508 await this.buildPlaylistManager() 510 await this.buildPlaylistManager()
511
509 this.player.playlist().updateSelected() 512 this.player.playlist().updateSelected()
513
514 this.player.on('stopped', () => {
515 this.playNextVideo()
516 })
510 } 517 }
511 } 518 }
512 519