aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSam Potts <me@sampotts.me>2016-01-18 17:35:18 +1100
committerSam Potts <me@sampotts.me>2016-01-18 17:35:18 +1100
commit2e5bdb338eee71f777bc3898cc57875b0e705dfa (patch)
tree24ad323c2697dedcee1e9e343c8b5e2639051065 /src
parentdbe152a4c104906ab872f1ecd80ba3929db809af (diff)
downloadplyr-2e5bdb338eee71f777bc3898cc57875b0e705dfa.tar.lz
plyr-2e5bdb338eee71f777bc3898cc57875b0e705dfa.tar.xz
plyr-2e5bdb338eee71f777bc3898cc57875b0e705dfa.zip
Tidying up, Vimeo fix
Diffstat (limited to 'src')
-rw-r--r--src/js/plyr.js9
-rw-r--r--src/less/plyr.less15
-rw-r--r--src/sass/plyr.scss13
3 files changed, 20 insertions, 17 deletions
diff --git a/src/js/plyr.js b/src/js/plyr.js
index ca160ac6..a1b4de27 100644
--- a/src/js/plyr.js
+++ b/src/js/plyr.js
@@ -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));
diff --git a/src/less/plyr.less b/src/less/plyr.less
index 955bd824..7cb768a8 100644
--- a/src/less/plyr.less
+++ b/src/less/plyr.less
@@ -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;
diff --git a/src/sass/plyr.scss b/src/sass/plyr.scss
index bbd52579..5a94d17d 100644
--- a/src/sass/plyr.scss
+++ b/src/sass/plyr.scss
@@ -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;