Tweaks
This commit is contained in:
parent
ef1d73df15
commit
55dfab8394
2
dist/plyr.css
vendored
2
dist/plyr.css
vendored
File diff suppressed because one or more lines are too long
4
dist/plyr.js
vendored
4
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -492,7 +492,7 @@
|
|||||||
|
|
||||||
// Add text node
|
// Add text node
|
||||||
if (is.string(text)) {
|
if (is.string(text)) {
|
||||||
element.appendChild(document.createTextNode(text));
|
element.textContent = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return built element
|
// Return built element
|
||||||
@ -508,6 +508,14 @@
|
|||||||
prependChild(parent, element);
|
prependChild(parent, element);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove all child elements
|
||||||
|
function emptyElement(element) {
|
||||||
|
var length = element.childNodes.length;
|
||||||
|
while (length--) {
|
||||||
|
element.removeChild(element.lastChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get a classname from selector
|
// Get a classname from selector
|
||||||
function getClassname(selector) {
|
function getClassname(selector) {
|
||||||
return selector.replace('.', '');
|
return selector.replace('.', '');
|
||||||
@ -1150,8 +1158,7 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var label = document.createTextNode('% ' + suffix.toLowerCase());
|
progress.textContent = '% ' + suffix.toLowerCase();
|
||||||
progress.appendChild(label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
elements.display[type] = progress;
|
elements.display[type] = progress;
|
||||||
@ -1228,8 +1235,7 @@
|
|||||||
class: config.classes.tooltip
|
class: config.classes.tooltip
|
||||||
});
|
});
|
||||||
|
|
||||||
var value = document.createTextNode('00:00');
|
tooltip.textContent = '00:00';
|
||||||
tooltip.appendChild(value);
|
|
||||||
container.appendChild(tooltip);
|
container.appendChild(tooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1819,7 +1825,7 @@
|
|||||||
var content = createElement('span');
|
var content = createElement('span');
|
||||||
|
|
||||||
// Empty the container
|
// Empty the container
|
||||||
captions.innerHTML = '';
|
emptyElement(captions);
|
||||||
|
|
||||||
// Default to empty
|
// Default to empty
|
||||||
if (is.undefined(caption)) {
|
if (is.undefined(caption)) {
|
||||||
@ -1837,7 +1843,7 @@
|
|||||||
captions.appendChild(content);
|
captions.appendChild(content);
|
||||||
|
|
||||||
// Force redraw (for Safari)
|
// Force redraw (for Safari)
|
||||||
var redraw = captions.offsetHeight;
|
// var redraw = captions.offsetHeight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1957,8 +1963,10 @@
|
|||||||
|
|
||||||
// Set global
|
// Set global
|
||||||
plyr.captionsEnabled = show;
|
plyr.captionsEnabled = show;
|
||||||
elements.buttons.captions_menu.innerHTML = show ? 'Off' : 'On';
|
|
||||||
getElement('[data-captions="settings"]').innerHTML = getSubsLangValue();
|
// Set current language etc
|
||||||
|
//elements.buttons.captions_menu.innerHTML = show ? 'Off' : 'On';
|
||||||
|
//getElement('[data-captions="settings"]').innerHTML = getSubsLangValue();
|
||||||
|
|
||||||
// Toggle state
|
// Toggle state
|
||||||
toggleState(elements.buttons.captions, plyr.captionsEnabled);
|
toggleState(elements.buttons.captions, plyr.captionsEnabled);
|
||||||
@ -3321,14 +3329,14 @@
|
|||||||
plyr.secs = ('0' + plyr.secs).slice(-2);
|
plyr.secs = ('0' + plyr.secs).slice(-2);
|
||||||
plyr.mins = ('0' + plyr.mins).slice(-2);
|
plyr.mins = ('0' + plyr.mins).slice(-2);
|
||||||
|
|
||||||
// Generate display
|
// Generate label
|
||||||
var display = (displayHours ? plyr.hours + ':' : '') + plyr.mins + ':' + plyr.secs;
|
var label = (displayHours ? plyr.hours + ':' : '') + plyr.mins + ':' + plyr.secs;
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
element.innerHTML = display;
|
element.textContent = label;
|
||||||
|
|
||||||
// Return for looping
|
// Return for looping
|
||||||
return display;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the duration on metadataloaded
|
// Show the duration on metadataloaded
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
@plyr-font-size-base: 16px;
|
@plyr-font-size-base: 16px;
|
||||||
|
|
||||||
// Captions
|
// Captions
|
||||||
@plyr-captions-bg: fade(#000, 85%);
|
@plyr-captions-bg: fade(#000, 60%);
|
||||||
@plyr-captions-color: #fff;
|
@plyr-captions-color: #fff;
|
||||||
@plyr-font-size-captions-base: @plyr-font-size-base;
|
@plyr-font-size-captions-base: @plyr-font-size-base;
|
||||||
@plyr-font-size-captions-medium: ceil(@plyr-font-size-base * 1.5);
|
@plyr-font-size-captions-medium: ceil(@plyr-font-size-base * 1.5);
|
||||||
|
@ -18,7 +18,7 @@ $plyr-font-size-small: 14px !default;
|
|||||||
$plyr-font-size-base: 16px !default;
|
$plyr-font-size-base: 16px !default;
|
||||||
|
|
||||||
// Captions
|
// Captions
|
||||||
$plyr-captions-bg: transparentize(#000, .3) !default;
|
$plyr-captions-bg: transparentize(#000, .4) !default;
|
||||||
$plyr-captions-color: #fff !default;
|
$plyr-captions-color: #fff !default;
|
||||||
$plyr-font-size-captions-base: $plyr-font-size-base !default;
|
$plyr-font-size-captions-base: $plyr-font-size-base !default;
|
||||||
$plyr-font-size-captions-medium: ceil($plyr-font-size-base * 1.5) !default;
|
$plyr-font-size-captions-medium: ceil($plyr-font-size-base * 1.5) !default;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user