diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/js/defaults.js | 22 | ||||
-rw-r--r-- | src/js/plugins/youtube.js | 6 |
2 files changed, 12 insertions, 16 deletions
diff --git a/src/js/defaults.js b/src/js/defaults.js index a3d95bb4..ee863066 100644 --- a/src/js/defaults.js +++ b/src/js/defaults.js @@ -19,9 +19,18 @@ const defaults = { volume: 1, muted: false, + // Pass a custom duration + duration: null, + // Display the media duration displayDuration: true, + // Aspect ratio (for embeds) + ratio: '16:9', + + // Looping + loop: false, + // Click video to play clickToPlay: true, @@ -42,25 +51,12 @@ const defaults = { // Blank video (used to prevent errors on source change) blankVideo: 'https://cdn.plyr.io/static/blank.mp4', - // Pass a custom duration - duration: null, - - // Aspect ratio (for embeds) - ratio: '16:9', - // Quality default quality: { default: 'default', options: ['hd2160', 'hd1440', 'hd1080', 'hd720', 'large', 'medium', 'small', 'tiny', 'default'], }, - // Set loops - loop: { - active: false, - start: null, - end: null, - }, - // Speed default and options to display speed: { default: 1, diff --git a/src/js/plugins/youtube.js b/src/js/plugins/youtube.js index ca0f2991..84d16488 100644 --- a/src/js/plugins/youtube.js +++ b/src/js/plugins/youtube.js @@ -75,9 +75,9 @@ const youtube = { origin: window && window.location.hostname, widget_referrer: window && window.location.href, - // Captions is flaky on YouTube - // cc_load_policy: (this.captions.active ? 1 : 0), - // cc_lang_pref: 'en', + // Captions are flaky on YouTube + cc_load_policy: (this.captions.active ? 1 : 0), + cc_lang_pref: this.config.captions.language, }, events: { onError(event) { |