Looping, increase/decrease volume fix
This commit is contained in:
@ -76,7 +76,7 @@ const youtube = {
|
||||
widget_referrer: window && window.location.href,
|
||||
|
||||
// Captions are flaky on YouTube
|
||||
cc_load_policy: (this.captions.active ? 1 : 0),
|
||||
cc_load_policy: this.captions.active ? 1 : 0,
|
||||
cc_lang_pref: this.config.captions.language,
|
||||
},
|
||||
events: {
|
||||
@ -246,18 +246,15 @@ const youtube = {
|
||||
switch (event.data) {
|
||||
case 0:
|
||||
// YouTube doesn't support loop for a single video, so mimick it.
|
||||
if (player.config.loop.active) {
|
||||
if (player.media.loop) {
|
||||
// YouTube needs a call to `stopVideo` before playing again
|
||||
instance.stopVideo();
|
||||
instance.playVideo();
|
||||
|
||||
break;
|
||||
} else {
|
||||
utils.dispatchEvent.call(player, player.media, 'ended');
|
||||
player.media.paused = true;
|
||||
}
|
||||
|
||||
player.media.paused = true;
|
||||
|
||||
utils.dispatchEvent.call(player, player.media, 'ended');
|
||||
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
Reference in New Issue
Block a user