Tidying up, Vimeo fix

This commit is contained in:
Sam Potts 2016-01-18 17:35:18 +11:00
parent dbe152a4c1
commit 2e5bdb338e
4 changed files with 21 additions and 18 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1646,7 +1646,8 @@
break;
case 'vimeo':
plyr.embed.api('seekTo', targetTime);
// Round to nearest second for vimeo
plyr.embed.api('seekTo', targetTime.toFixed(0));
break;
}
@ -2214,8 +2215,8 @@
}
// Determine which buttons
var trigger = plyr.buttons[play ? "play" : "pause"],
target = plyr.buttons[play ? "pause" : "play"];
var trigger = plyr.buttons[play ? 'play' : 'pause'],
target = plyr.buttons[play ? 'pause' : 'play'];
// Setup focus and tab focus
if(target) {
@ -2475,7 +2476,7 @@
function _setupInterface() {
// Don't setup interface if no support
if (!plyr.supported.full) {
_log("No full support for this media type (" + plyr.type + ")", true);
_log('No full support for this media type (' + plyr.type + ')', true);
// Remove controls
_remove(_getElement(config.selectors.controls.wrapper));

View File

@ -599,7 +599,7 @@
}
// Full screen mode
&--fullscreen,
&.plyr--fullscreen,
&--fullscreen-active {
position: fixed;
top: 0;
@ -627,24 +627,25 @@
}
// Hide controls when playing in full screen
&--fullscreen--hide-controls&--fullscreen-active&--playing {
&--fullscreen-active.plyr--fullscreen--hide-controls.plyr--playing,
&.plyr--fullscreen.plyr--fullscreen--hide-controls.plyr--playing {
.plyr__controls {
transform: translateY(100%) translateY(@plyr-control-spacing / 2);
transition: transform .3s .2s ease;
}
&.plyr--hover .plyr__controls {
transform: translateY(0);
}
.plyr__captions {
bottom: (@plyr-control-spacing / 2);
transition: bottom .3s .2s ease;
}
&.plyr--hover .plyr__controls {
transform: translateY(0);
}
}
// Captions
&--fullscreen .plyr__captions,
&.plyr--fullscreen .plyr__captions,
&--fullscreen-active .plyr__captions,
&--fullscreen--hide-controls&--fullscreen-active&--playing&--hover &__captions {
&--fullscreen--hide-controls.plyr--fullscreen-active.plyr--playing.plyr--hover .plyr__captions {
top: auto;
bottom: 90px;

View File

@ -626,24 +626,25 @@ $plyr-bp-captions-large: 768px !default; // When captions jump to the la
}
// Hide controls when playing in full screen
&--fullscreen--hide-controls&--fullscreen-active&--playing {
&--fullscreen-active.plyr--fullscreen--hide-controls.plyr--playing,
&.plyr--fullscreen.plyr--fullscreen--hide-controls.plyr--playing {
.plyr__controls {
transform: translateY(100%) translateY($plyr-control-spacing / 2);
transition: transform .3s .2s ease;
}
&.plyr--hover .plyr__controls {
transform: translateY(0);
}
.plyr__captions {
bottom: ($plyr-control-spacing / 2);
transition: bottom .3s .2s ease;
}
&.plyr--hover .plyr__controls {
transform: translateY(0);
}
}
// Captions
&--fullscreen .plyr__captions,
&.plyr--fullscreen .plyr__captions,
&--fullscreen-active .plyr__captions,
&--fullscreen--hide-controls&--fullscreen-active&--playing&--hover &__captions {
&--fullscreen--hide-controls.plyr--fullscreen-active.plyr--playing.plyr--hover .plyr__captions {
top: auto;
bottom: 90px;