X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fstandalone%2Fplayer%2Fplayer.ts;h=9776fda120297fbfd21966203cfd66f5eb65aeb1;hb=35f676e5d3e5e242e84ed63da2cc78117079c7cb;hp=119f5e035e55f5a46690d205c3f00885560b4645;hpb=1151f5210c0e7665ec6714e73261f299e6fe757b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/standalone/player/player.ts b/client/src/standalone/player/player.ts index 119f5e035..9776fda12 100644 --- a/client/src/standalone/player/player.ts +++ b/client/src/standalone/player/player.ts @@ -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('getCurrentPosition') + } + private constructChannel () { this.channel = Channel.build({ window: this.embedElement.contentWindow,