Compare commits
3 Commits
v3.0.0-bet
...
v3.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
c74b75e8e1 | |||
0538476d6f | |||
5ebe18d081 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"plugins": ["stylelint-selector-bem-pattern", "stylelint-scss"],
|
||||
"extends": ["stylelint-config-sass-guidelines", "stylelint-config-recommended", "stylelint-config-prettier"],
|
||||
"extends": ["stylelint-config-recommended", "stylelint-config-sass-guidelines", "stylelint-config-prettier"],
|
||||
"rules": {
|
||||
"selector-class-pattern": null,
|
||||
"selector-no-qualifying-type": [
|
||||
|
2
demo/dist/demo.css
vendored
2
demo/dist/demo.css
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.css
vendored
2
dist/plyr.css
vendored
File diff suppressed because one or more lines are too long
57
dist/plyr.js
vendored
57
dist/plyr.js
vendored
@ -77,7 +77,7 @@ var defaults = {
|
||||
// Sprite (for icons)
|
||||
loadSprite: true,
|
||||
iconPrefix: 'plyr',
|
||||
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.17/plyr.svg',
|
||||
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.19/plyr.svg',
|
||||
|
||||
// Blank video (used to prevent errors on source change)
|
||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||
@ -3883,7 +3883,9 @@ var Listeners = function () {
|
||||
|
||||
}, {
|
||||
key: 'global',
|
||||
value: function global(toggle) {
|
||||
value: function global() {
|
||||
var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||||
|
||||
// Keyboard shortcuts
|
||||
if (this.player.config.keyboard.global) {
|
||||
utils.toggleListener(window, 'keydown keyup', this.handleKey, toggle, false);
|
||||
@ -4294,6 +4296,14 @@ var Listeners = function () {
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
|
||||
// Reset on destroy
|
||||
|
||||
}, {
|
||||
key: 'clear',
|
||||
value: function clear() {
|
||||
this.global(false);
|
||||
}
|
||||
}]);
|
||||
return Listeners;
|
||||
}();
|
||||
@ -4565,7 +4575,7 @@ var Ads = function () {
|
||||
var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
|
||||
if (!start) {
|
||||
window.clearInterval(this.countdownTimer);
|
||||
clearInterval(this.countdownTimer);
|
||||
this.elements.container.removeAttribute('data-badge-text');
|
||||
return;
|
||||
}
|
||||
@ -4576,7 +4586,7 @@ var Ads = function () {
|
||||
_this5.elements.container.setAttribute('data-badge-text', label);
|
||||
};
|
||||
|
||||
this.countdownTimer = window.setInterval(update, 100);
|
||||
this.countdownTimer = setInterval(update, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -5351,10 +5361,10 @@ var youtube = {
|
||||
utils.dispatchEvent.call(player, player.media, 'durationchange');
|
||||
|
||||
// Reset timer
|
||||
window.clearInterval(player.timers.buffering);
|
||||
clearInterval(player.timers.buffering);
|
||||
|
||||
// Setup buffering
|
||||
player.timers.buffering = window.setInterval(function () {
|
||||
player.timers.buffering = setInterval(function () {
|
||||
// Get loaded % from YouTube
|
||||
player.media.buffered = instance.getVideoLoadedFraction();
|
||||
|
||||
@ -5368,7 +5378,7 @@ var youtube = {
|
||||
|
||||
// Bail if we're at 100%
|
||||
if (player.media.buffered === 1) {
|
||||
window.clearInterval(player.timers.buffering);
|
||||
clearInterval(player.timers.buffering);
|
||||
|
||||
// Trigger event
|
||||
utils.dispatchEvent.call(player, player.media, 'canplaythrough');
|
||||
@ -5385,7 +5395,7 @@ var youtube = {
|
||||
var instance = event.target;
|
||||
|
||||
// Reset timer
|
||||
window.clearInterval(player.timers.playing);
|
||||
clearInterval(player.timers.playing);
|
||||
|
||||
// Handle events
|
||||
// -1 Unstarted
|
||||
@ -5425,7 +5435,7 @@ var youtube = {
|
||||
utils.dispatchEvent.call(player, player.media, 'playing');
|
||||
|
||||
// Poll to get playback progress
|
||||
player.timers.playing = window.setInterval(function () {
|
||||
player.timers.playing = setInterval(function () {
|
||||
utils.dispatchEvent.call(player, player.media, 'timeupdate');
|
||||
}, 50);
|
||||
|
||||
@ -6031,7 +6041,7 @@ var source = {
|
||||
|
||||
// ==========================================================================
|
||||
// Plyr
|
||||
// plyr.js v3.0.0-beta.17
|
||||
// plyr.js v3.0.0-beta.19
|
||||
// https://github.com/sampotts/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
@ -6287,7 +6297,7 @@ var Plyr = function () {
|
||||
this.listeners.container();
|
||||
|
||||
// Global listeners
|
||||
this.listeners.global(true);
|
||||
this.listeners.global();
|
||||
|
||||
// Setup fullscreen
|
||||
this.fullscreen = new Fullscreen(this);
|
||||
@ -6547,7 +6557,7 @@ var Plyr = function () {
|
||||
}
|
||||
|
||||
// Clear timer on every call
|
||||
window.clearTimeout(this.timers.controls);
|
||||
clearTimeout(this.timers.controls);
|
||||
|
||||
// If the mouse is not over the controls, set a timeout to hide them
|
||||
if (show || this.paused || this.loading) {
|
||||
@ -6666,12 +6676,12 @@ var Plyr = function () {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
// Unbind listeners
|
||||
_this4.listeners.clear();
|
||||
|
||||
// Replace the container with the original element provided
|
||||
utils.replaceElement(_this4.elements.original, _this4.elements.container);
|
||||
|
||||
// Unbind global listeners
|
||||
_this4.listeners.global(false);
|
||||
|
||||
// Event
|
||||
utils.dispatchEvent.call(_this4, _this4.elements.original, 'destroyed', true);
|
||||
|
||||
@ -6680,15 +6690,24 @@ var Plyr = function () {
|
||||
callback.call(_this4.elements.original);
|
||||
}
|
||||
|
||||
// Clear for GC
|
||||
_this4.elements = null;
|
||||
// Clear for garbage collection
|
||||
setTimeout(function () {
|
||||
_this4.elements = null;
|
||||
_this4.media = null;
|
||||
}, 200);
|
||||
}
|
||||
};
|
||||
|
||||
// Stop playback
|
||||
this.stop();
|
||||
|
||||
// Type specific stuff
|
||||
switch (this.provider + ':' + this.type) {
|
||||
case 'html5:video':
|
||||
case 'html5:audio':
|
||||
// Clear timeout
|
||||
clearTimeout(this.timers.loading);
|
||||
|
||||
// Restore native video controls
|
||||
ui.toggleNativeControls.call(this, true);
|
||||
|
||||
@ -6699,8 +6718,8 @@ var Plyr = function () {
|
||||
|
||||
case 'youtube:video':
|
||||
// Clear timers
|
||||
window.clearInterval(this.timers.buffering);
|
||||
window.clearInterval(this.timers.playing);
|
||||
clearInterval(this.timers.buffering);
|
||||
clearInterval(this.timers.playing);
|
||||
|
||||
// Destroy YouTube API
|
||||
if (this.embed !== null) {
|
||||
|
2
dist/plyr.js.map
vendored
2
dist/plyr.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js
vendored
2
dist/plyr.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.min.js.map
vendored
2
dist/plyr.min.js.map
vendored
File diff suppressed because one or more lines are too long
59
dist/plyr.polyfilled.js
vendored
59
dist/plyr.polyfilled.js
vendored
@ -5268,7 +5268,7 @@ var defaults = {
|
||||
// Sprite (for icons)
|
||||
loadSprite: true,
|
||||
iconPrefix: 'plyr',
|
||||
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.18/plyr.svg',
|
||||
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.20/plyr.svg',
|
||||
|
||||
// Blank video (used to prevent errors on source change)
|
||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||
@ -9074,7 +9074,9 @@ var Listeners = function () {
|
||||
|
||||
}, {
|
||||
key: 'global',
|
||||
value: function global(toggle) {
|
||||
value: function global() {
|
||||
var toggle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||||
|
||||
// Keyboard shortcuts
|
||||
if (this.player.config.keyboard.global) {
|
||||
utils.toggleListener(window, 'keydown keyup', this.handleKey, toggle, false);
|
||||
@ -9485,6 +9487,14 @@ var Listeners = function () {
|
||||
});
|
||||
}, false);
|
||||
}
|
||||
|
||||
// Reset on destroy
|
||||
|
||||
}, {
|
||||
key: 'clear',
|
||||
value: function clear() {
|
||||
this.global(false);
|
||||
}
|
||||
}]);
|
||||
return Listeners;
|
||||
}();
|
||||
@ -9756,7 +9766,7 @@ var Ads = function () {
|
||||
var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
|
||||
if (!start) {
|
||||
window.clearInterval(this.countdownTimer);
|
||||
clearInterval(this.countdownTimer);
|
||||
this.elements.container.removeAttribute('data-badge-text');
|
||||
return;
|
||||
}
|
||||
@ -9767,7 +9777,7 @@ var Ads = function () {
|
||||
_this5.elements.container.setAttribute('data-badge-text', label);
|
||||
};
|
||||
|
||||
this.countdownTimer = window.setInterval(update, 100);
|
||||
this.countdownTimer = setInterval(update, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -10542,10 +10552,10 @@ var youtube = {
|
||||
utils.dispatchEvent.call(player, player.media, 'durationchange');
|
||||
|
||||
// Reset timer
|
||||
window.clearInterval(player.timers.buffering);
|
||||
clearInterval(player.timers.buffering);
|
||||
|
||||
// Setup buffering
|
||||
player.timers.buffering = window.setInterval(function () {
|
||||
player.timers.buffering = setInterval(function () {
|
||||
// Get loaded % from YouTube
|
||||
player.media.buffered = instance.getVideoLoadedFraction();
|
||||
|
||||
@ -10559,7 +10569,7 @@ var youtube = {
|
||||
|
||||
// Bail if we're at 100%
|
||||
if (player.media.buffered === 1) {
|
||||
window.clearInterval(player.timers.buffering);
|
||||
clearInterval(player.timers.buffering);
|
||||
|
||||
// Trigger event
|
||||
utils.dispatchEvent.call(player, player.media, 'canplaythrough');
|
||||
@ -10576,7 +10586,7 @@ var youtube = {
|
||||
var instance = event.target;
|
||||
|
||||
// Reset timer
|
||||
window.clearInterval(player.timers.playing);
|
||||
clearInterval(player.timers.playing);
|
||||
|
||||
// Handle events
|
||||
// -1 Unstarted
|
||||
@ -10616,7 +10626,7 @@ var youtube = {
|
||||
utils.dispatchEvent.call(player, player.media, 'playing');
|
||||
|
||||
// Poll to get playback progress
|
||||
player.timers.playing = window.setInterval(function () {
|
||||
player.timers.playing = setInterval(function () {
|
||||
utils.dispatchEvent.call(player, player.media, 'timeupdate');
|
||||
}, 50);
|
||||
|
||||
@ -11222,7 +11232,7 @@ var source = {
|
||||
|
||||
// ==========================================================================
|
||||
// Plyr
|
||||
// plyr.js v3.0.0-beta.18
|
||||
// plyr.js v3.0.0-beta.20
|
||||
// https://github.com/sampotts/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
@ -11478,7 +11488,7 @@ var Plyr$1 = function () {
|
||||
this.listeners.container();
|
||||
|
||||
// Global listeners
|
||||
this.listeners.global(true);
|
||||
this.listeners.global();
|
||||
|
||||
// Setup fullscreen
|
||||
this.fullscreen = new Fullscreen(this);
|
||||
@ -11738,7 +11748,7 @@ var Plyr$1 = function () {
|
||||
}
|
||||
|
||||
// Clear timer on every call
|
||||
window.clearTimeout(this.timers.controls);
|
||||
clearTimeout(this.timers.controls);
|
||||
|
||||
// If the mouse is not over the controls, set a timeout to hide them
|
||||
if (show || this.paused || this.loading) {
|
||||
@ -11857,12 +11867,12 @@ var Plyr$1 = function () {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
// Unbind listeners
|
||||
_this4.listeners.clear();
|
||||
|
||||
// Replace the container with the original element provided
|
||||
utils.replaceElement(_this4.elements.original, _this4.elements.container);
|
||||
|
||||
// Unbind global listeners
|
||||
_this4.listeners.global(false);
|
||||
|
||||
// Event
|
||||
utils.dispatchEvent.call(_this4, _this4.elements.original, 'destroyed', true);
|
||||
|
||||
@ -11871,15 +11881,24 @@ var Plyr$1 = function () {
|
||||
callback.call(_this4.elements.original);
|
||||
}
|
||||
|
||||
// Clear for GC
|
||||
_this4.elements = null;
|
||||
// Clear for garbage collection
|
||||
setTimeout(function () {
|
||||
_this4.elements = null;
|
||||
_this4.media = null;
|
||||
}, 200);
|
||||
}
|
||||
};
|
||||
|
||||
// Stop playback
|
||||
this.stop();
|
||||
|
||||
// Type specific stuff
|
||||
switch (this.provider + ':' + this.type) {
|
||||
case 'html5:video':
|
||||
case 'html5:audio':
|
||||
// Clear timeout
|
||||
clearTimeout(this.timers.loading);
|
||||
|
||||
// Restore native video controls
|
||||
ui.toggleNativeControls.call(this, true);
|
||||
|
||||
@ -11890,8 +11909,8 @@ var Plyr$1 = function () {
|
||||
|
||||
case 'youtube:video':
|
||||
// Clear timers
|
||||
window.clearInterval(this.timers.buffering);
|
||||
window.clearInterval(this.timers.playing);
|
||||
clearInterval(this.timers.buffering);
|
||||
clearInterval(this.timers.playing);
|
||||
|
||||
// Destroy YouTube API
|
||||
if (this.embed !== null) {
|
||||
@ -12481,7 +12500,7 @@ var Plyr$1 = function () {
|
||||
|
||||
// ==========================================================================
|
||||
// Plyr Polyfilled Build
|
||||
// plyr.js v3.0.0-beta.17
|
||||
// plyr.js v3.0.0-beta.19
|
||||
// https://github.com/sampotts/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
|
2
dist/plyr.polyfilled.js.map
vendored
2
dist/plyr.polyfilled.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.min.js
vendored
2
dist/plyr.polyfilled.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/plyr.polyfilled.min.js.map
vendored
2
dist/plyr.polyfilled.min.js.map
vendored
File diff suppressed because one or more lines are too long
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plyr",
|
||||
"version": "3.0.0-beta.18",
|
||||
"version": "3.0.0-beta.20",
|
||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||
"homepage": "https://plyr.io",
|
||||
"main": "./dist/plyr.js",
|
||||
@ -17,11 +17,11 @@
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-plugin-import": "^2.9.0",
|
||||
"git-branch": "^1.0.0",
|
||||
"git-branch": "^2.0.1",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "^5.0.0",
|
||||
"gulp-better-rollup": "^3.0.0",
|
||||
"gulp-clean-css": "^3.9.2",
|
||||
"gulp-clean-css": "^3.9.3",
|
||||
"gulp-concat": "^2.6.1",
|
||||
"gulp-filter": "^5.1.0",
|
||||
"gulp-open": "^3.0.0",
|
||||
@ -36,13 +36,13 @@
|
||||
"gulp-uglify-es": "^1.0.1",
|
||||
"gulp-util": "^3.0.8",
|
||||
"rollup-plugin-babel": "^3.0.3",
|
||||
"rollup-plugin-commonjs": "^9.0.0",
|
||||
"rollup-plugin-commonjs": "^8.4.1",
|
||||
"rollup-plugin-node-resolve": "^3.2.0",
|
||||
"run-sequence": "^2.2.1",
|
||||
"stylelint": "^9.1.1",
|
||||
"stylelint-config-prettier": "^2.1.0",
|
||||
"stylelint-config-sass-guidelines": "^5.0.0",
|
||||
"stylelint-config-prettier": "^3.0.4",
|
||||
"stylelint-config-recommended": "^2.1.0",
|
||||
"stylelint-config-sass-guidelines": "^5.0.0",
|
||||
"stylelint-order": "^0.8.1",
|
||||
"stylelint-scss": "^2.5.0",
|
||||
"stylelint-selector-bem-pattern": "^2.0.0"
|
||||
|
@ -128,7 +128,7 @@ See [initialising](#initialising) for more information on advanced setups.
|
||||
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript, you can use the following:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.plyr.io/3.0.0-beta.18/plyr.js"></script>
|
||||
<script src="https://cdn.plyr.io/3.0.0-beta.20/plyr.js"></script>
|
||||
```
|
||||
|
||||
_Note_: Be sure to read the [polyfills](#polyfills) section below about browser compatibility
|
||||
@ -144,13 +144,13 @@ Include the `plyr.css` stylsheet into your `<head>`
|
||||
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/3.0.0-beta.18/plyr.css">
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/3.0.0-beta.20/plyr.css">
|
||||
```
|
||||
|
||||
### SVG Sprite
|
||||
|
||||
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
|
||||
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.0.0-beta.18/plyr.svg`.
|
||||
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.0.0-beta.20/plyr.svg`.
|
||||
|
||||
## Advanced
|
||||
|
||||
|
@ -56,7 +56,7 @@ const defaults = {
|
||||
// Sprite (for icons)
|
||||
loadSprite: true,
|
||||
iconPrefix: 'plyr',
|
||||
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.18/plyr.svg',
|
||||
iconUrl: 'https://cdn.plyr.io/3.0.0-beta.20/plyr.svg',
|
||||
|
||||
// Blank video (used to prevent errors on source change)
|
||||
blankVideo: 'https://cdn.plyr.io/static/blank.mp4',
|
||||
|
@ -188,7 +188,7 @@ class Listeners {
|
||||
}
|
||||
|
||||
// Global window & document listeners
|
||||
global(toggle) {
|
||||
global(toggle = true) {
|
||||
// Keyboard shortcuts
|
||||
if (this.player.config.keyboard.global) {
|
||||
utils.toggleListener(window, 'keydown keyup', this.handleKey, toggle, false);
|
||||
@ -585,6 +585,11 @@ class Listeners {
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
// Reset on destroy
|
||||
clear() {
|
||||
this.global(false);
|
||||
}
|
||||
}
|
||||
|
||||
export default Listeners;
|
||||
|
@ -171,7 +171,7 @@ class Ads {
|
||||
*/
|
||||
pollCountdown(start = false) {
|
||||
if (!start) {
|
||||
window.clearInterval(this.countdownTimer);
|
||||
clearInterval(this.countdownTimer);
|
||||
this.elements.container.removeAttribute('data-badge-text');
|
||||
return;
|
||||
}
|
||||
@ -182,7 +182,7 @@ class Ads {
|
||||
this.elements.container.setAttribute('data-badge-text', label);
|
||||
};
|
||||
|
||||
this.countdownTimer = window.setInterval(update, 100);
|
||||
this.countdownTimer = setInterval(update, 100);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -305,10 +305,10 @@ const youtube = {
|
||||
utils.dispatchEvent.call(player, player.media, 'durationchange');
|
||||
|
||||
// Reset timer
|
||||
window.clearInterval(player.timers.buffering);
|
||||
clearInterval(player.timers.buffering);
|
||||
|
||||
// Setup buffering
|
||||
player.timers.buffering = window.setInterval(() => {
|
||||
player.timers.buffering = setInterval(() => {
|
||||
// Get loaded % from YouTube
|
||||
player.media.buffered = instance.getVideoLoadedFraction();
|
||||
|
||||
@ -322,7 +322,7 @@ const youtube = {
|
||||
|
||||
// Bail if we're at 100%
|
||||
if (player.media.buffered === 1) {
|
||||
window.clearInterval(player.timers.buffering);
|
||||
clearInterval(player.timers.buffering);
|
||||
|
||||
// Trigger event
|
||||
utils.dispatchEvent.call(player, player.media, 'canplaythrough');
|
||||
@ -337,7 +337,7 @@ const youtube = {
|
||||
const instance = event.target;
|
||||
|
||||
// Reset timer
|
||||
window.clearInterval(player.timers.playing);
|
||||
clearInterval(player.timers.playing);
|
||||
|
||||
// Handle events
|
||||
// -1 Unstarted
|
||||
@ -377,7 +377,7 @@ const youtube = {
|
||||
utils.dispatchEvent.call(player, player.media, 'playing');
|
||||
|
||||
// Poll to get playback progress
|
||||
player.timers.playing = window.setInterval(() => {
|
||||
player.timers.playing = setInterval(() => {
|
||||
utils.dispatchEvent.call(player, player.media, 'timeupdate');
|
||||
}, 50);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// ==========================================================================
|
||||
// Plyr
|
||||
// plyr.js v3.0.0-beta.18
|
||||
// plyr.js v3.0.0-beta.20
|
||||
// https://github.com/sampotts/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
@ -276,7 +276,7 @@ class Plyr {
|
||||
this.listeners.container();
|
||||
|
||||
// Global listeners
|
||||
this.listeners.global(true);
|
||||
this.listeners.global();
|
||||
|
||||
// Setup fullscreen
|
||||
this.fullscreen = new Fullscreen(this);
|
||||
@ -951,7 +951,7 @@ class Plyr {
|
||||
}
|
||||
|
||||
// Clear timer on every call
|
||||
window.clearTimeout(this.timers.controls);
|
||||
clearTimeout(this.timers.controls);
|
||||
|
||||
// If the mouse is not over the controls, set a timeout to hide them
|
||||
if (show || this.paused || this.loading) {
|
||||
@ -1057,12 +1057,12 @@ class Plyr {
|
||||
callback();
|
||||
}
|
||||
} else {
|
||||
// Unbind listeners
|
||||
this.listeners.clear();
|
||||
|
||||
// Replace the container with the original element provided
|
||||
utils.replaceElement(this.elements.original, this.elements.container);
|
||||
|
||||
// Unbind global listeners
|
||||
this.listeners.global(false);
|
||||
|
||||
// Event
|
||||
utils.dispatchEvent.call(this, this.elements.original, 'destroyed', true);
|
||||
|
||||
@ -1071,15 +1071,24 @@ class Plyr {
|
||||
callback.call(this.elements.original);
|
||||
}
|
||||
|
||||
// Clear for GC
|
||||
this.elements = null;
|
||||
// Clear for garbage collection
|
||||
setTimeout(() => {
|
||||
this.elements = null;
|
||||
this.media = null;
|
||||
}, 200);
|
||||
}
|
||||
};
|
||||
|
||||
// Stop playback
|
||||
this.stop();
|
||||
|
||||
// Type specific stuff
|
||||
switch (`${this.provider}:${this.type}`) {
|
||||
case 'html5:video':
|
||||
case 'html5:audio':
|
||||
// Clear timeout
|
||||
clearTimeout(this.timers.loading);
|
||||
|
||||
// Restore native video controls
|
||||
ui.toggleNativeControls.call(this, true);
|
||||
|
||||
@ -1090,8 +1099,8 @@ class Plyr {
|
||||
|
||||
case 'youtube:video':
|
||||
// Clear timers
|
||||
window.clearInterval(this.timers.buffering);
|
||||
window.clearInterval(this.timers.playing);
|
||||
clearInterval(this.timers.buffering);
|
||||
clearInterval(this.timers.playing);
|
||||
|
||||
// Destroy YouTube API
|
||||
if (this.embed !== null) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// ==========================================================================
|
||||
// Plyr Polyfilled Build
|
||||
// plyr.js v3.0.0-beta.18
|
||||
// plyr.js v3.0.0-beta.20
|
||||
// https://github.com/sampotts/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
direction: ltr;
|
||||
font-family: $plyr-font-family;
|
||||
font-variant-numeric: tabular-nums; // Force monosace-esque number widths
|
||||
font-weight: $plyr-font-weight-regular;
|
||||
line-height: $plyr-line-height;
|
||||
max-width: 100%;
|
||||
|
@ -9,16 +9,17 @@
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: -1; // Hide it.
|
||||
z-index: -1; // Hide it by default
|
||||
|
||||
// Make sure the inner container is big enough for the ad creative.
|
||||
> div,
|
||||
> div iframe {
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
// The countdown label
|
||||
&::after {
|
||||
background: rgba($plyr-color-gunmetal, 0.8);
|
||||
border-radius: 2px;
|
||||
|
84
yarn.lock
84
yarn.lock
@ -953,10 +953,14 @@ browserslist@^3.1.1:
|
||||
caniuse-lite "^1.0.30000809"
|
||||
electron-to-chromium "^1.3.33"
|
||||
|
||||
builtin-modules@^1.0.0, builtin-modules@^1.1.0, builtin-modules@^1.1.1:
|
||||
builtin-modules@^1.0.0, builtin-modules@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f"
|
||||
|
||||
builtin-modules@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-2.0.0.tgz#60b7ef5ae6546bd7deefa74b08b62a43a232648e"
|
||||
|
||||
cache-base@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
|
||||
@ -1125,9 +1129,9 @@ class-utils@^0.3.5:
|
||||
lazy-cache "^2.0.2"
|
||||
static-extend "^0.1.1"
|
||||
|
||||
clean-css@4.1.9:
|
||||
version "4.1.9"
|
||||
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.9.tgz#35cee8ae7687a49b98034f70de00c4edd3826301"
|
||||
clean-css@4.1.11:
|
||||
version "4.1.11"
|
||||
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a"
|
||||
dependencies:
|
||||
source-map "0.5.x"
|
||||
|
||||
@ -2144,9 +2148,11 @@ getpass@^0.1.1:
|
||||
dependencies:
|
||||
assert-plus "^1.0.0"
|
||||
|
||||
git-branch@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/git-branch/-/git-branch-1.0.0.tgz#64cc7dd75da2d81a9d4679087c1f8b56e6bd2d3d"
|
||||
git-branch@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/git-branch/-/git-branch-2.0.1.tgz#442724a97574c66ede4290ded75b7430785da08f"
|
||||
dependencies:
|
||||
findup-sync "^2.0.0"
|
||||
|
||||
glob-base@^0.3.0:
|
||||
version "0.3.0"
|
||||
@ -2347,12 +2353,12 @@ gulp-better-rollup@^3.0.0:
|
||||
vinyl "^2.1.0"
|
||||
vinyl-sourcemaps-apply "^0.2.1"
|
||||
|
||||
gulp-clean-css@^3.9.2:
|
||||
version "3.9.2"
|
||||
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-3.9.2.tgz#b280e6f56bf8bee39e697e77aaa72d3e7e7d3bd5"
|
||||
gulp-clean-css@^3.9.3:
|
||||
version "3.9.3"
|
||||
resolved "https://registry.yarnpkg.com/gulp-clean-css/-/gulp-clean-css-3.9.3.tgz#47bf7ad62f44970f86e4ac4bdeed68ad904e65c5"
|
||||
dependencies:
|
||||
clean-css "4.1.9"
|
||||
plugin-error "0.1.2"
|
||||
clean-css "4.1.11"
|
||||
plugin-error "1.0.1"
|
||||
through2 "2.0.3"
|
||||
vinyl-sourcemaps-apply "0.2.1"
|
||||
|
||||
@ -4178,7 +4184,16 @@ pkg-dir@^1.0.0:
|
||||
dependencies:
|
||||
find-up "^1.0.0"
|
||||
|
||||
plugin-error@0.1.2, plugin-error@^0.1.2:
|
||||
plugin-error@1.0.1, plugin-error@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
|
||||
dependencies:
|
||||
ansi-colors "^1.0.1"
|
||||
arr-diff "^4.0.0"
|
||||
arr-union "^3.1.0"
|
||||
extend-shallow "^3.0.2"
|
||||
|
||||
plugin-error@^0.1.2:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-0.1.2.tgz#3b9bb3335ccf00f425e07437e19276967da47ace"
|
||||
dependencies:
|
||||
@ -4188,15 +4203,6 @@ plugin-error@0.1.2, plugin-error@^0.1.2:
|
||||
arr-union "^2.0.1"
|
||||
extend-shallow "^1.1.2"
|
||||
|
||||
plugin-error@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c"
|
||||
dependencies:
|
||||
ansi-colors "^1.0.1"
|
||||
arr-diff "^4.0.0"
|
||||
arr-union "^3.1.0"
|
||||
extend-shallow "^3.0.2"
|
||||
|
||||
plugin-log@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/plugin-log/-/plugin-log-0.1.0.tgz#86049cf6ab10833398a931f3689cbaee7b5e1333"
|
||||
@ -4721,9 +4727,9 @@ rollup-plugin-babel@^3.0.3:
|
||||
dependencies:
|
||||
rollup-pluginutils "^1.5.0"
|
||||
|
||||
rollup-plugin-commonjs@^8.3.0:
|
||||
version "8.3.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.3.0.tgz#91b4ba18f340951e39ed7b1901f377a80ab3f9c3"
|
||||
rollup-plugin-commonjs@^8.4.1:
|
||||
version "8.4.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz#5c9cea2b2c3de322f5fbccd147e07ed5e502d7a0"
|
||||
dependencies:
|
||||
acorn "^5.2.1"
|
||||
estree-walker "^0.5.0"
|
||||
@ -4731,11 +4737,11 @@ rollup-plugin-commonjs@^8.3.0:
|
||||
resolve "^1.4.0"
|
||||
rollup-pluginutils "^2.0.1"
|
||||
|
||||
rollup-plugin-node-resolve@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.0.3.tgz#8f57b253edd00e5b0ad0aed7b7e9cf5982e98fa4"
|
||||
rollup-plugin-node-resolve@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.2.0.tgz#31534952f3ab21f9473c1d092be7ed43937ea4d4"
|
||||
dependencies:
|
||||
builtin-modules "^1.1.0"
|
||||
builtin-modules "^2.0.0"
|
||||
is-module "^1.0.0"
|
||||
resolve "^1.1.6"
|
||||
|
||||
@ -5153,9 +5159,11 @@ style-search@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
|
||||
|
||||
stylelint-config-prettier@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-prettier/-/stylelint-config-prettier-2.1.0.tgz#395874225ceef02ea8e31c2f4073098f4505b054"
|
||||
stylelint-config-prettier@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-config-prettier/-/stylelint-config-prettier-3.0.4.tgz#1259093c1db2d5e8dfff7d9672f6f41db2101845"
|
||||
dependencies:
|
||||
stylelint "^9.1.1"
|
||||
|
||||
stylelint-config-recommended@^2.1.0:
|
||||
version "2.1.0"
|
||||
@ -5184,7 +5192,7 @@ stylelint-order@^0.8.1:
|
||||
postcss "^6.0.14"
|
||||
postcss-sorting "^3.1.0"
|
||||
|
||||
stylelint-scss@^2.0.0, stylelint-scss@^2.4.0:
|
||||
stylelint-scss@^2.0.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-2.4.0.tgz#2d417688556d64536f435e7a6f77a40dbb89e505"
|
||||
dependencies:
|
||||
@ -5194,6 +5202,16 @@ stylelint-scss@^2.0.0, stylelint-scss@^2.4.0:
|
||||
postcss-selector-parser "^3.1.1"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
stylelint-scss@^2.5.0:
|
||||
version "2.5.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-scss/-/stylelint-scss-2.5.0.tgz#ac4c83474c53b19cc1f9e93d332786cf89c8d217"
|
||||
dependencies:
|
||||
lodash "^4.17.4"
|
||||
postcss-media-query-parser "^0.2.3"
|
||||
postcss-resolve-nested-selector "^0.1.1"
|
||||
postcss-selector-parser "^3.1.1"
|
||||
postcss-value-parser "^3.3.0"
|
||||
|
||||
stylelint-selector-bem-pattern@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/stylelint-selector-bem-pattern/-/stylelint-selector-bem-pattern-2.0.0.tgz#9a6130c9c90963b30e925c917079d6c8fed73f45"
|
||||
|
Reference in New Issue
Block a user