}
private get element () {
- return this.embed.videoElement
+ return this.embed.playerElement
}
private constructChannel () {
channel.bind('setPlaybackRate', (txn, playbackRate) => this.embed.player.playbackRate(playbackRate))
channel.bind('getPlaybackRate', (txn, params) => this.embed.player.playbackRate())
channel.bind('getPlaybackRates', (txn, params) => this.embed.player.options_.playbackRates)
+
+ channel.bind('playNextVideo', (txn, params) => this.embed.playNextVideo())
+ channel.bind('playPreviousVideo', (txn, params) => this.embed.playPreviousVideo())
+ channel.bind('getCurrentPosition', (txn, params) => this.embed.getCurrentPosition())
this.channel = channel
}
setInterval(() => {
const position = this.element.currentTime
const volume = this.element.volume
- const duration = this.element.duration
this.channel.notify({
method: 'playbackStatusUpdate',