loop video
This commit is contained in:
parent
607b845abc
commit
fd11ab1ca1
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue