diff --git a/src/components/Channel.vue b/src/components/Channel.vue index e37dbe6..6c13664 100644 --- a/src/components/Channel.vue +++ b/src/components/Channel.vue @@ -75,8 +75,13 @@ export default class Channel extends Vue { playerVars: {"autoplay": 0}, }); this.youtubePlayer.on("stateChange", (event) => { - if (event.data == PlayerStates.BUFFERING) { - this.state = ChannelState.READY; + switch (event.data) { + case PlayerStates.BUFFERING: + this.state = ChannelState.READY; + break; + case PlayerStates.ENDED: + this.youtubePlayer!.playVideo(); + break; } }); }