]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/standalone/player/player.ts
Merge branch 'release/3.2.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / standalone / player / player.ts
index 119f5e035e55f5a46690d205c3f00885560b4645..9776fda120297fbfd21966203cfd66f5eb65aeb1 100644 (file)
@@ -170,6 +170,27 @@ export class PeerTubePlayer {
     await this.sendMessage('setPlaybackRate', rate)
   }
 
+  /**
+   * Play next video in playlist
+   */
+  async playNextVideo () {
+    await this.sendMessage('playNextVideo')
+  }
+
+  /**
+   * Play previous video in playlist
+   */
+  async playPreviousVideo () {
+    await this.sendMessage('playPreviousVideo')
+  }
+
+  /**
+   * Get video position currently played (starts from 1)
+   */
+  async getCurrentPosition () {
+    return this.sendMessage<void, number>('getCurrentPosition')
+  }
+
   private constructChannel () {
     this.channel = Channel.build({
       window: this.embedElement.contentWindow,