Merge pull request #1577 from avidnewmedia/issue-615

#615: updates to vimeo and youtube buffering state
This commit is contained in:
Sam Potts 2020-01-13 16:06:27 +00:00 committed by GitHub
commit 67cb324aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}