From 61a24eab765f09bdcff92c872c6882d79cf4d180 Mon Sep 17 00:00:00 2001 From: ydylla Date: Sat, 1 Feb 2020 16:32:14 +0100 Subject: [PATCH 01/13] add previewThumbnails source setter #1369 --- src/js/plugins/preview-thumbnails.js | 11 ++++++++++- src/js/source.js | 18 +++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/js/plugins/preview-thumbnails.js b/src/js/plugins/preview-thumbnails.js index 44e6ace7..aa06edf4 100644 --- a/src/js/plugins/preview-thumbnails.js +++ b/src/js/plugins/preview-thumbnails.js @@ -104,7 +104,7 @@ class PreviewThumbnails { } load() { - // Togglethe regular seek tooltip + // Toggle the regular seek tooltip if (this.player.elements.display.seekTooltip) { this.player.elements.display.seekTooltip.hidden = this.enabled; } @@ -328,6 +328,15 @@ class PreviewThumbnails { this.player.elements.wrapper.appendChild(this.elements.scrubbing.container); } + destroy() { + if (this.elements.thumb.container) { + this.elements.thumb.container.remove(); + } + if (this.elements.scrubbing.container) { + this.elements.scrubbing.container.remove(); + } + } + showImageAtCurrentTime() { if (this.mouseDown) { this.setScrubbingContainerSize(); diff --git a/src/js/source.js b/src/js/source.js index 0173cc9e..bc39cc9d 100644 --- a/src/js/source.js +++ b/src/js/source.js @@ -5,6 +5,7 @@ import { providers } from './config/types'; import html5 from './html5'; import media from './media'; +import PreviewThumbnails from './plugins/preview-thumbnails'; import support from './support'; import ui from './ui'; import { createElement, insertElement, removeElement } from './utils/elements'; @@ -130,9 +131,20 @@ const source = { this.media.load(); } - // Reload thumbnails - if (this.previewThumbnails) { - this.previewThumbnails.load(); + // Update previewThumbnails config & reload plugin + if (!is.empty(input.previewThumbnails)) { + Object.assign(this.config.previewThumbnails, input.previewThumbnails); + + // cleanup previewThumbnails plugin if it was loaded + if (this.previewThumbnails && this.previewThumbnails.loaded) { + this.previewThumbnails.destroy(); + this.previewThumbnails = null; + } + + // create new instance if it is still enabled + if (this.config.previewThumbnails.enabled) { + this.previewThumbnails = new PreviewThumbnails(this); + } } // Update the fullscreen support From 97f8093a8df1fd7462512d43716bcd7601fecb18 Mon Sep 17 00:00:00 2001 From: ydylla Date: Sat, 8 Feb 2020 19:04:26 +0100 Subject: [PATCH 02/13] allows to set only width or height for thumb css size Also fixes sprites when css thumb size is used --- src/js/plugins/preview-thumbnails.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/js/plugins/preview-thumbnails.js b/src/js/plugins/preview-thumbnails.js index 44e6ace7..8256c811 100644 --- a/src/js/plugins/preview-thumbnails.js +++ b/src/js/plugins/preview-thumbnails.js @@ -561,6 +561,11 @@ class PreviewThumbnails { return height; } + // If css is used this needs to return the css height for sprites to work (see setImageSizeAndOffset) + if (this.sizeSpecifiedInCSS) { + return this.elements.thumb.imageContainer.clientHeight; + } + return Math.floor(this.player.media.clientWidth / this.thumbAspectRatio / 4); } @@ -601,7 +606,7 @@ class PreviewThumbnails { } determineContainerAutoSizing() { - if (this.elements.thumb.imageContainer.clientHeight > 20) { + if (this.elements.thumb.imageContainer.clientHeight > 20 || this.elements.thumb.imageContainer.clientWidth > 20) { // This will prevent auto sizing in this.setThumbContainerSizeAndPos() this.sizeSpecifiedInCSS = true; } @@ -613,6 +618,12 @@ class PreviewThumbnails { const thumbWidth = Math.floor(this.thumbContainerHeight * this.thumbAspectRatio); this.elements.thumb.imageContainer.style.height = `${this.thumbContainerHeight}px`; this.elements.thumb.imageContainer.style.width = `${thumbWidth}px`; + } else if (this.elements.thumb.imageContainer.clientHeight > 20 && this.elements.thumb.imageContainer.clientWidth < 20) { + const thumbWidth = Math.floor(this.elements.thumb.imageContainer.clientHeight * this.thumbAspectRatio); + this.elements.thumb.imageContainer.style.width = `${thumbWidth}px`; + } else if (this.elements.thumb.imageContainer.clientHeight < 20 && this.elements.thumb.imageContainer.clientWidth > 20) { + const thumbHeight = Math.floor(this.elements.thumb.imageContainer.clientWidth / this.thumbAspectRatio); + this.elements.thumb.imageContainer.style.height = `${thumbHeight}px`; } this.setThumbContainerPos(); From d7d0f5fca08b4352a6e2ab430503ce0720b4555d Mon Sep 17 00:00:00 2001 From: ydylla Date: Sun, 9 Feb 2020 17:03:31 +0100 Subject: [PATCH 03/13] add previewThumbnails to source setter docs --- readme.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index 6e1f2460..bf31759a 100644 --- a/readme.md +++ b/readme.md @@ -445,6 +445,9 @@ player.source = { }, ], poster: '/path/to/poster.jpg', + previewThumbnails: { + src: '/path/to/thumbnails.vtt' + }, tracks: [ { kind: 'captions', @@ -514,13 +517,14 @@ player.source = { _Note:_ `src` property for YouTube and Vimeo can either be the video ID or the whole URL. -| Property | Type | Description | -| -------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `type` | String | Either `video` or `audio`. _Note:_ YouTube and Vimeo are currently not supported as audio sources. | -| `title` | String | _Optional._ Title of the new media. Used for the `aria-label` attribute on the play button, and outer container. YouTube and Vimeo are populated automatically. | -| `sources` | Array | This is an array of sources. For HTML5 media, the properties of this object are mapped directly to HTML attributes so more can be added to the object if required. | -| `poster`¹ | String | The URL for the poster image (HTML5 video only). | -| `tracks`¹ | String | An array of track objects. Each element in the array is mapped directly to a track element and any keys mapped directly to HTML attributes so as in the example above, it will render as `` and similar for the French version. Booleans are converted to HTML5 value-less attributes. | +| Property | Type | Description | +| ------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | String | Either `video` or `audio`. _Note:_ YouTube and Vimeo are currently not supported as audio sources. | +| `title` | String | _Optional._ Title of the new media. Used for the `aria-label` attribute on the play button, and outer container. YouTube and Vimeo are populated automatically. | +| `sources` | Array | This is an array of sources. For HTML5 media, the properties of this object are mapped directly to HTML attributes so more can be added to the object if required. | +| `poster`¹ | String | The URL for the poster image (HTML5 video only). | +| `tracks`¹ | String | An array of track objects. Each element in the array is mapped directly to a track element and any keys mapped directly to HTML attributes so as in the example above, it will render as `` and similar for the French version. Booleans are converted to HTML5 value-less attributes. | +| `previewThumbnails`¹ | Object | The same object like in the `previewThumbnails` constructor option. This means you can either change the thumbnails vtt via the `src` key or disable the thumbnails plugin for the next video by passing `{ enabled: false }`. | 1. HTML5 only From 5837c2d5f0bdbf156bb591a6e0e02ba62e973e29 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 10 Feb 2020 11:23:57 +0000 Subject: [PATCH 04/13] SASS orginasation clean up and flex-direction added --- src/sass/base.scss | 1 + src/sass/components/audio.scss | 7 -- src/sass/components/control.scss | 56 ----------- src/sass/components/controls.scss | 34 ------- src/sass/components/sliders.scss | 72 +------------- src/sass/components/times.scss | 4 - src/sass/components/video.scss | 51 ---------- src/sass/plyr.scss | 5 +- src/sass/types/audio.scss | 56 +++++++++++ src/sass/types/video.scss | 157 ++++++++++++++++++++++++++++++ 10 files changed, 218 insertions(+), 225 deletions(-) delete mode 100644 src/sass/components/audio.scss delete mode 100644 src/sass/components/video.scss create mode 100644 src/sass/types/audio.scss create mode 100644 src/sass/types/video.scss diff --git a/src/sass/base.scss b/src/sass/base.scss index 811c762d..05e77bb1 100644 --- a/src/sass/base.scss +++ b/src/sass/base.scss @@ -8,6 +8,7 @@ align-items: center; direction: ltr; display: flex; + flex-direction: column; font-family: $plyr-font-family; font-variant-numeric: tabular-nums; // Force monosace-esque number widths font-weight: $plyr-font-weight-regular; diff --git a/src/sass/components/audio.scss b/src/sass/components/audio.scss deleted file mode 100644 index 285d34f9..00000000 --- a/src/sass/components/audio.scss +++ /dev/null @@ -1,7 +0,0 @@ -// -------------------------------------------------------------- -// Audio styles -// -------------------------------------------------------------- - -.plyr--audio { - display: block; -} diff --git a/src/sass/components/control.scss b/src/sass/components/control.scss index 0022d17b..64390dbd 100644 --- a/src/sass/components/control.scss +++ b/src/sass/components/control.scss @@ -50,59 +50,3 @@ a.plyr__control { .plyr__control.plyr__control--pressed .label--not-pressed { display: none; } - -// Audio control -.plyr--audio .plyr__control { - &.plyr__tab-focus, - &:hover, - &[aria-expanded='true'] { - background: $plyr-audio-control-bg-hover; - color: $plyr-audio-control-color-hover; - } -} - -// Video control -.plyr--video .plyr__control { - // Hover and tab focus - &.plyr__tab-focus, - &:hover, - &[aria-expanded='true'] { - background: $plyr-video-control-bg-hover; - color: $plyr-video-control-color-hover; - } -} - -// Large play button (video only) -.plyr__control--overlaid { - background: rgba($plyr-video-control-bg-hover, 0.8); - border: 0; - border-radius: 100%; - color: $plyr-video-control-color; - display: none; - left: 50%; - padding: ceil($plyr-control-spacing * 1.5); - position: absolute; - top: 50%; - transform: translate(-50%, -50%); - z-index: 2; - - // Offset icon to make the play button look right - svg { - left: 2px; - position: relative; - } - - &:hover, - &:focus { - background: $plyr-video-control-bg-hover; - } -} - -.plyr--playing .plyr__control--overlaid { - opacity: 0; - visibility: hidden; -} - -.plyr--full-ui.plyr--video .plyr__control--overlaid { - display: block; -} diff --git a/src/sass/components/controls.scss b/src/sass/components/controls.scss index cc07ef7f..50333701 100644 --- a/src/sass/components/controls.scss +++ b/src/sass/components/controls.scss @@ -49,40 +49,6 @@ } } -// Audio controls -.plyr--audio .plyr__controls { - background: $plyr-audio-controls-bg; - border-radius: inherit; - color: $plyr-audio-control-color; - padding: $plyr-control-spacing; -} - -// Video controls -.plyr--video .plyr__controls { - background: linear-gradient(rgba($plyr-video-controls-bg, 0), rgba($plyr-video-controls-bg, 0.7)); - border-bottom-left-radius: inherit; - border-bottom-right-radius: inherit; - bottom: 0; - color: $plyr-video-control-color; - left: 0; - padding: ($plyr-control-spacing * 2) ($plyr-control-spacing / 2) ($plyr-control-spacing / 2); - position: absolute; - right: 0; - transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; - z-index: 3; - - @media (min-width: $plyr-bp-sm) { - padding: ($plyr-control-spacing * 3.5) $plyr-control-spacing $plyr-control-spacing; - } -} - -// Hide video controls -.plyr--video.plyr--hide-controls .plyr__controls { - opacity: 0; - pointer-events: none; - transform: translateY(100%); -} - // Some options are hidden by default .plyr [data-plyr='captions'], .plyr [data-plyr='pip'], diff --git a/src/sass/components/sliders.scss b/src/sass/components/sliders.scss index ee64271b..7b519fc6 100644 --- a/src/sass/components/sliders.scss +++ b/src/sass/components/sliders.scss @@ -19,11 +19,7 @@ &::-webkit-slider-runnable-track { @include plyr-range-track(); - background-image: linear-gradient( - to right, - currentColor var(--value, 0%), - transparent var(--value, 0%) - ); + background-image: linear-gradient(to right, currentColor var(--value, 0%), transparent var(--value, 0%)); } &::-webkit-slider-thumb { @@ -96,69 +92,3 @@ } } } - -// Video range inputs -.plyr--full-ui.plyr--video input[type='range'] { - &::-webkit-slider-runnable-track { - background-color: $plyr-video-range-track-bg; - } - - &::-moz-range-track { - background-color: $plyr-video-range-track-bg; - } - - &::-ms-track { - background-color: $plyr-video-range-track-bg; - } - - // Pressed styles - &:active { - &::-webkit-slider-thumb { - @include plyr-range-thumb-active(); - } - - &::-moz-range-thumb { - @include plyr-range-thumb-active(); - } - - &::-ms-thumb { - @include plyr-range-thumb-active(); - } - } -} - -// Audio range inputs -.plyr--full-ui.plyr--audio input[type='range'] { - &::-webkit-slider-runnable-track { - background-color: $plyr-audio-range-track-bg; - } - - &::-moz-range-track { - background-color: $plyr-audio-range-track-bg; - } - - &::-ms-track { - background-color: $plyr-audio-range-track-bg; - } - - // Pressed styles - &:active { - &::-webkit-slider-thumb { - @include plyr-range-thumb-active( - $plyr-audio-range-thumb-shadow-color - ); - } - - &::-moz-range-thumb { - @include plyr-range-thumb-active( - $plyr-audio-range-thumb-shadow-color - ); - } - - &::-ms-thumb { - @include plyr-range-thumb-active( - $plyr-audio-range-thumb-shadow-color - ); - } - } -} diff --git a/src/sass/components/times.scss b/src/sass/components/times.scss index 240d3528..7d7a50f1 100644 --- a/src/sass/components/times.scss +++ b/src/sass/components/times.scss @@ -18,7 +18,3 @@ display: none; } } - -.plyr--video .plyr__time { - text-shadow: 0 1px 1px rgba(#000, 0.15); -} diff --git a/src/sass/components/video.scss b/src/sass/components/video.scss deleted file mode 100644 index e5f6fe87..00000000 --- a/src/sass/components/video.scss +++ /dev/null @@ -1,51 +0,0 @@ -// -------------------------------------------------------------- -// Video styles -// -------------------------------------------------------------- - -.plyr--video { - background: #000; - overflow: hidden; - - // Menu open - &.plyr--menu-open { - overflow: visible; - } -} - -.plyr__video-wrapper { - background: #000; - height: 100%; - margin: auto; - overflow: hidden; - width: 100%; -} - -// Default to 16:9 ratio but this is set by JavaScript based on config -$embed-padding: ((100 / 16) * 9); - -.plyr__video-embed, -.plyr__video-wrapper--fixed-ratio { - height: 0; - padding-bottom: to-percentage($embed-padding); -} - -.plyr__video-embed iframe, -.plyr__video-wrapper--fixed-ratio video { - border: 0; - left: 0; - position: absolute; - top: 0; -} - -// If the full custom UI is supported -.plyr--full-ui .plyr__video-embed { - $height: 240; - $offset: to-percentage(($height - $embed-padding) / ($height / 50)); - - // Only used for Vimeo - > .plyr__video-embed__container { - padding-bottom: to-percentage($height); - position: relative; - transform: translateY(-$offset); - } -} diff --git a/src/sass/plyr.scss b/src/sass/plyr.scss index 445ca1ea..cb8a3921 100644 --- a/src/sass/plyr.scss +++ b/src/sass/plyr.scss @@ -25,7 +25,6 @@ @import 'base'; -@import 'components/audio'; @import 'components/badges'; @import 'components/captions'; @import 'components/control'; @@ -35,10 +34,12 @@ @import 'components/poster'; @import 'components/times'; @import 'components/tooltips'; -@import 'components/video'; @import 'components/progress'; @import 'components/volume'; +@import 'types/audio'; +@import 'types/video'; + @import 'states/fullscreen'; @import 'plugins/ads'; diff --git a/src/sass/types/audio.scss b/src/sass/types/audio.scss new file mode 100644 index 00000000..5d779a61 --- /dev/null +++ b/src/sass/types/audio.scss @@ -0,0 +1,56 @@ +// -------------------------------------------------------------- +// Audio styles +// -------------------------------------------------------------- + +// Container +.plyr--audio { + display: block; +} + +// Controls container +.plyr--audio .plyr__controls { + background: $plyr-audio-controls-bg; + border-radius: inherit; + color: $plyr-audio-control-color; + padding: $plyr-control-spacing; +} + +// Control elements +.plyr--audio .plyr__control { + &.plyr__tab-focus, + &:hover, + &[aria-expanded='true'] { + background: $plyr-audio-control-bg-hover; + color: $plyr-audio-control-color-hover; + } +} + +// Range inputs +.plyr--full-ui.plyr--audio input[type='range'] { + &::-webkit-slider-runnable-track { + background-color: $plyr-audio-range-track-bg; + } + + &::-moz-range-track { + background-color: $plyr-audio-range-track-bg; + } + + &::-ms-track { + background-color: $plyr-audio-range-track-bg; + } + + // Pressed styles + &:active { + &::-webkit-slider-thumb { + @include plyr-range-thumb-active($plyr-audio-range-thumb-shadow-color); + } + + &::-moz-range-thumb { + @include plyr-range-thumb-active($plyr-audio-range-thumb-shadow-color); + } + + &::-ms-thumb { + @include plyr-range-thumb-active($plyr-audio-range-thumb-shadow-color); + } + } +} diff --git a/src/sass/types/video.scss b/src/sass/types/video.scss new file mode 100644 index 00000000..cf3ee9c8 --- /dev/null +++ b/src/sass/types/video.scss @@ -0,0 +1,157 @@ +// -------------------------------------------------------------- +// Video styles +// -------------------------------------------------------------- + +// Container +.plyr--video { + background: #000; + overflow: hidden; + + &.plyr--menu-open { + overflow: visible; + } +} + +.plyr__video-wrapper { + background: #000; + height: 100%; + margin: auto; + overflow: hidden; + width: 100%; +} + +// Default to 16:9 ratio but this is set by JavaScript based on config +$embed-padding: ((100 / 16) * 9); + +.plyr__video-embed, +.plyr__video-wrapper--fixed-ratio { + height: 0; + padding-bottom: to-percentage($embed-padding); +} + +.plyr__video-embed iframe, +.plyr__video-wrapper--fixed-ratio video { + border: 0; + left: 0; + position: absolute; + top: 0; +} + +// If the full custom UI is supported +.plyr--full-ui .plyr__video-embed { + $height: 240; + $offset: to-percentage(($height - $embed-padding) / ($height / 50)); + + // Only used for Vimeo + > .plyr__video-embed__container { + padding-bottom: to-percentage($height); + position: relative; + transform: translateY(-$offset); + } +} + +// Controls container +.plyr--video .plyr__controls { + background: linear-gradient(rgba($plyr-video-controls-bg, 0), rgba($plyr-video-controls-bg, 0.7)); + border-bottom-left-radius: inherit; + border-bottom-right-radius: inherit; + bottom: 0; + color: $plyr-video-control-color; + left: 0; + padding: ($plyr-control-spacing * 2) ($plyr-control-spacing / 2) ($plyr-control-spacing / 2); + position: absolute; + right: 0; + transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; + z-index: 3; + + @media (min-width: $plyr-bp-sm) { + padding: ($plyr-control-spacing * 3.5) $plyr-control-spacing $plyr-control-spacing; + } +} + +// Hide controls +.plyr--video.plyr--hide-controls .plyr__controls { + opacity: 0; + pointer-events: none; + transform: translateY(100%); +} + +// Control elements +.plyr--video .plyr__control { + // Hover and tab focus + &.plyr__tab-focus, + &:hover, + &[aria-expanded='true'] { + background: $plyr-video-control-bg-hover; + color: $plyr-video-control-color-hover; + } +} + +// Large play button (video only) +.plyr__control--overlaid { + background: rgba($plyr-video-control-bg-hover, 0.8); + border: 0; + border-radius: 100%; + color: $plyr-video-control-color; + display: none; + left: 50%; + padding: ceil($plyr-control-spacing * 1.5); + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + z-index: 2; + + // Offset icon to make the play button look right + svg { + left: 2px; + position: relative; + } + + &:hover, + &:focus { + background: $plyr-video-control-bg-hover; + } +} + +.plyr--playing .plyr__control--overlaid { + opacity: 0; + visibility: hidden; +} + +.plyr--full-ui.plyr--video .plyr__control--overlaid { + display: block; +} + +// Video range inputs +.plyr--full-ui.plyr--video input[type='range'] { + &::-webkit-slider-runnable-track { + background-color: $plyr-video-range-track-bg; + } + + &::-moz-range-track { + background-color: $plyr-video-range-track-bg; + } + + &::-ms-track { + background-color: $plyr-video-range-track-bg; + } + + // Pressed styles + &:active { + &::-webkit-slider-thumb { + @include plyr-range-thumb-active(); + } + + &::-moz-range-thumb { + @include plyr-range-thumb-active(); + } + + &::-ms-thumb { + @include plyr-range-thumb-active(); + } + } +} + +.plyr--video .plyr__time { + text-shadow: 0 1px 1px rgba(#000, 0.15); +} From 7ca74f48bc8d84de696c3e4a50ed4167d67ddaf5 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 10 Feb 2020 11:24:38 +0000 Subject: [PATCH 05/13] Added vimeo options to hide controls and set referrerPolicy --- src/js/config/defaults.js | 5 +++++ src/js/plugins/vimeo.js | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/js/config/defaults.js b/src/js/config/defaults.js index bf0f8c42..be289e6a 100644 --- a/src/js/config/defaults.js +++ b/src/js/config/defaults.js @@ -419,6 +419,11 @@ const defaults = { title: false, speed: true, transparent: false, + // These settings require a pro or premium account to work + sidedock: false, + controls: false, + // Custom settings from Plyr + referrerPolicy: null, // https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy }, // YouTube plugin diff --git a/src/js/plugins/vimeo.js b/src/js/plugins/vimeo.js index 9529f2cd..7d796858 100644 --- a/src/js/plugins/vimeo.js +++ b/src/js/plugins/vimeo.js @@ -99,6 +99,11 @@ const vimeo = { iframe.setAttribute('allowtransparency', ''); iframe.setAttribute('allow', 'autoplay'); + // Set the referrer policy if required + if (!is.empty(config.referrerPolicy)) { + iframe.setAttribute('referrerPolicy', config.referrerPolicy); + } + // Get poster, if already set const { poster } = player; // Inject the package @@ -191,12 +196,10 @@ const vimeo = { return speed; }, set(input) { - player.embed - .setPlaybackRate(input) - .then(() => { - speed = input; - triggerEvent.call(player, player.media, 'ratechange'); - }); + player.embed.setPlaybackRate(input).then(() => { + speed = input; + triggerEvent.call(player, player.media, 'ratechange'); + }); }, }); From 0f16a018ff741eb6c12e69fa7f7b77f07492432c Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 10 Feb 2020 11:25:25 +0000 Subject: [PATCH 06/13] Set referrerPolicy in the demo --- demo/src/js/demo.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demo/src/js/demo.js b/demo/src/js/demo.js index a2867b20..39614eeb 100644 --- a/demo/src/js/demo.js +++ b/demo/src/js/demo.js @@ -64,6 +64,10 @@ import toggleClass from './toggle-class'; 'https://cdn.plyr.io/static/demo/thumbs/240p.vtt', ], }, + vimeo: { + // Prevent Vimeo blocking plyr.io demo site + referrerPolicy: 'no-referrer', + } }); // Expose for tinkering in the console From eda192639d3eda9f93528c3fe4ad862161479828 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 10 Feb 2020 11:25:39 +0000 Subject: [PATCH 07/13] Demo packages updated --- demo/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/package.json b/demo/package.json index 8ded66f0..6403c198 100644 --- a/demo/package.json +++ b/demo/package.json @@ -5,10 +5,10 @@ "homepage": "https://plyr.io", "author": "Sam Potts ", "dependencies": { - "core-js": "^3.1.4", + "core-js": "^3.6.4", "custom-event-polyfill": "^1.0.7", "raven-js": "^3.27.2", "shr-buttons": "2.0.3", - "url-polyfill": "^1.1.5" + "url-polyfill": "^1.1.8" } } From ea350f9d1ded176979b4a8a9a7bf9a66e8ae9a53 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Mon, 10 Feb 2020 11:25:48 +0000 Subject: [PATCH 08/13] Update demo video --- demo/index.html | 3 ++- demo/src/js/sources.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/demo/index.html b/demo/index.html index 3242f40c..de7c41df 100644 --- a/demo/index.html +++ b/demo/index.html @@ -233,7 +233,8 @@