Merge branch 'develop' of github.com:sampotts/plyr into develop

This commit is contained in:
Sam Potts 2020-01-13 16:18:24 +00:00
commit 2463434d27
5 changed files with 21 additions and 1 deletions

View File

@ -222,7 +222,11 @@ Object.entries(build.sprite).forEach(([filename, entry]) => {
gulp
.src(src)
.pipe(plumber())
.pipe(imagemin())
.pipe(imagemin([
imagemin.svgo({
plugins: [{ removeViewBox: false }]
})
]))
.pipe(svgstore())
.pipe(rename({ basename: path.parse(filename).name }))
.pipe(size(sizeOptions))

View File

@ -164,6 +164,7 @@ const defaults = {
frameTitle: 'Player for {title}',
captions: 'Captions',
settings: 'Settings',
pip: 'PIP',
menuBack: 'Go back to previous menu',
speed: 'Speed',
normal: 'Normal',

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;
}

View File

@ -214,6 +214,7 @@ const ui = {
// Set state
Array.from(this.elements.buttons.play || []).forEach(target => {
Object.assign(target, { pressed: this.playing });
target.setAttribute('aria-label', i18n.get(this.playing ? 'pause' : 'play', this.config));
});
// Only update controls on non timeupdate events