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 gulp
.src(src) .src(src)
.pipe(plumber()) .pipe(plumber())
.pipe(imagemin()) .pipe(imagemin([
imagemin.svgo({
plugins: [{ removeViewBox: false }]
})
]))
.pipe(svgstore()) .pipe(svgstore())
.pipe(rename({ basename: path.parse(filename).name })) .pipe(rename({ basename: path.parse(filename).name }))
.pipe(size(sizeOptions)) .pipe(size(sizeOptions))

View File

@ -164,6 +164,7 @@ const defaults = {
frameTitle: 'Player for {title}', frameTitle: 'Player for {title}',
captions: 'Captions', captions: 'Captions',
settings: 'Settings', settings: 'Settings',
pip: 'PIP',
menuBack: 'Go back to previous menu', menuBack: 'Go back to previous menu',
speed: 'Speed', speed: 'Speed',
normal: 'Normal', 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', () => { player.embed.on('play', () => {
assurePlaybackState.call(player, true); assurePlaybackState.call(player, true);
triggerEvent.call(player, player.media, 'playing'); triggerEvent.call(player, player.media, 'playing');

View File

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

View File

@ -214,6 +214,7 @@ const ui = {
// Set state // Set state
Array.from(this.elements.buttons.play || []).forEach(target => { Array.from(this.elements.buttons.play || []).forEach(target => {
Object.assign(target, { pressed: this.playing }); 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 // Only update controls on non timeupdate events