aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed-api.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-31 08:59:30 +0200
committerChocobozzz <me@florianbigard.com>2022-05-31 10:39:56 +0200
commitf1a0f3b701e005a9533f09b7913c615376e42f32 (patch)
tree807e5377635bfa30d42ce42bdcd88ff7b1553257 /client/src/standalone/videos/embed-api.ts
parente5a781ec25191c0dbb4a991f25307732d798619d (diff)
downloadPeerTube-f1a0f3b701e005a9533f09b7913c615376e42f32.tar.gz
PeerTube-f1a0f3b701e005a9533f09b7913c615376e42f32.tar.zst
PeerTube-f1a0f3b701e005a9533f09b7913c615376e42f32.zip
Refactor embed
Diffstat (limited to 'client/src/standalone/videos/embed-api.ts')
-rw-r--r--client/src/standalone/videos/embed-api.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/standalone/videos/embed-api.ts b/client/src/standalone/videos/embed-api.ts
index a28aeeaef..84d664654 100644
--- a/client/src/standalone/videos/embed-api.ts
+++ b/client/src/standalone/videos/embed-api.ts
@@ -27,11 +27,11 @@ export class PeerTubeEmbedApi {
27 } 27 }
28 28
29 private get element () { 29 private get element () {
30 return this.embed.playerElement 30 return this.embed.getPlayerElement()
31 } 31 }
32 32
33 private constructChannel () { 33 private constructChannel () {
34 const channel = Channel.build({ window: window.parent, origin: '*', scope: this.embed.scope }) 34 const channel = Channel.build({ window: window.parent, origin: '*', scope: this.embed.getScope() })
35 35
36 channel.bind('play', (txn, params) => this.embed.player.play()) 36 channel.bind('play', (txn, params) => this.embed.player.play())
37 channel.bind('pause', (txn, params) => this.embed.player.pause()) 37 channel.bind('pause', (txn, params) => this.embed.player.pause())
@@ -52,9 +52,9 @@ export class PeerTubeEmbedApi {
52 channel.bind('getPlaybackRate', (txn, params) => this.embed.player.playbackRate()) 52 channel.bind('getPlaybackRate', (txn, params) => this.embed.player.playbackRate())
53 channel.bind('getPlaybackRates', (txn, params) => this.embed.player.options_.playbackRates) 53 channel.bind('getPlaybackRates', (txn, params) => this.embed.player.options_.playbackRates)
54 54
55 channel.bind('playNextVideo', (txn, params) => this.embed.playNextVideo()) 55 channel.bind('playNextVideo', (txn, params) => this.embed.playNextPlaylistVideo())
56 channel.bind('playPreviousVideo', (txn, params) => this.embed.playPreviousVideo()) 56 channel.bind('playPreviousVideo', (txn, params) => this.embed.playPreviousPlaylistVideo())
57 channel.bind('getCurrentPosition', (txn, params) => this.embed.getCurrentPosition()) 57 channel.bind('getCurrentPosition', (txn, params) => this.embed.getCurrentPlaylistPosition())
58 this.channel = channel 58 this.channel = channel
59 } 59 }
60 60