Retrofit PRs

This commit is contained in:
Sam Potts 2017-11-04 22:41:18 +11:00
parent d920de2a25
commit 597b3fe0db
3 changed files with 10 additions and 8 deletions

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js.map vendored

File diff suppressed because one or more lines are too long

14
src/js/controls.js vendored
View File

@ -49,7 +49,7 @@ const controls = {
getIconUrl() { getIconUrl() {
return { return {
url: this.config.iconUrl, url: this.config.iconUrl,
absolute: this.config.iconUrl.indexOf('http') === 0 || this.browser.isIE, absolute: this.config.iconUrl.indexOf('http') === 0 || (this.browser.isIE && !window.svg4everybody),
}; };
}, },
@ -594,6 +594,7 @@ const controls = {
}, },
// Get current selected caption language // Get current selected caption language
// TODO: rework this to user the getter in the API?
getLanguage() { getLanguage() {
if (!this.supported.ui) { if (!this.supported.ui) {
return null; return null;
@ -606,6 +607,7 @@ const controls = {
if (this.captions.enabled) { if (this.captions.enabled) {
return this.captions.currentTrack.label; return this.captions.currentTrack.label;
} }
return this.config.i18n.disabled; return this.config.i18n.disabled;
}, },
@ -1160,18 +1162,18 @@ const controls = {
container = this.config.controls({ container = this.config.controls({
id: this.id, id: this.id,
seektime: this.config.seekTime, seektime: this.config.seekTime,
title: this.config.title,
}); });
} else { } else {
// Create controls // Create controls
container = controls.create.call(this, { container = controls.create.call(this, {
id: this.id, id: this.id,
seektime: this.config.seekTime, seektime: this.config.seekTime,
speed: '-', speed: this.speed,
// TODO: Get current quality quality: this.quality,
quality: '-',
captions: controls.getLanguage.call(this), captions: controls.getLanguage.call(this),
// TODO: Get loop // TODO: Looping
loop: 'None', // loop: 'None',
}); });
} }