aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/player/player.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/standalone/player/player.ts')
-rw-r--r--client/src/standalone/player/player.ts21
1 files changed, 21 insertions, 0 deletions
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 {
170 await this.sendMessage('setPlaybackRate', rate) 170 await this.sendMessage('setPlaybackRate', rate)
171 } 171 }
172 172
173 /**
174 * Play next video in playlist
175 */
176 async playNextVideo () {
177 await this.sendMessage('playNextVideo')
178 }
179
180 /**
181 * Play previous video in playlist
182 */
183 async playPreviousVideo () {
184 await this.sendMessage('playPreviousVideo')
185 }
186
187 /**
188 * Get video position currently played (starts from 1)
189 */
190 async getCurrentPosition () {
191 return this.sendMessage<void, number>('getCurrentPosition')
192 }
193
173 private constructChannel () { 194 private constructChannel () {
174 this.channel = Channel.build({ 195 this.channel = Channel.build({
175 window: this.embedElement.contentWindow, 196 window: this.embedElement.contentWindow,