#615: updates to vimeo and youtube plugins to ensure that loading classes are added as content is buffering

This commit is contained in:
Dustin Harrell 2019-09-23 18:26:49 -04:00
parent dfc09b8e04
commit 627df20b6d
2 changed files with 14 additions and 0 deletions

View File

@ -335,6 +335,14 @@ const vimeo = {
}
});
player.embed.on('bufferstart', () => {
triggerEvent.call(player, player.media, 'waiting');
});
player.embed.on('bufferend', () => {
triggerEvent.call(player, player.media, 'playing');
});
player.embed.on('play', () => {
assurePlaybackState.call(player, true);
triggerEvent.call(player, player.media, 'playing');

View File

@ -416,6 +416,12 @@ const youtube = {
break;
case 3:
// Trigger waiting event to add loading classes to container as the video buffers.
triggerEvent.call(player, player.media, 'waiting');
break;
default:
break;
}