diff options
author | Sam Potts <sam@potts.es> | 2020-11-14 13:24:11 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-14 13:24:11 +1100 |
commit | e8d883edba3ee87ff5fbef043ffa50a1a4ae391b (patch) | |
tree | 02c0ecff98f37ed530512de0b806090c0cdd6c43 /dist/plyr.js | |
parent | 5d2c288721bd8d7be77352cf1f8f81c2592aeed5 (diff) | |
download | plyr-e8d883edba3ee87ff5fbef043ffa50a1a4ae391b.tar.lz plyr-e8d883edba3ee87ff5fbef043ffa50a1a4ae391b.tar.xz plyr-e8d883edba3ee87ff5fbef043ffa50a1a4ae391b.zip |
v3.6.3 (#2016)
* force fullscreen events to trigger on plyr element (media element in iOS) and not fullscreen container
* Fixing "missing code in detail" for PlyrEvent type
When using typescript and listening for youtube statechange event, it is missing the code property definition inside the event (even though it is provided in the code).
By making events a map of key-value, we can add easily custom event type for specific event name. Since YouTube "statechange" event differs from the basic PlyrEvent, I added a new Event Type "PlyrStateChangeEvent" having a code property corresponding to a YoutubeState enum defined by the YouTube API documentation.
This pattern follows how addEventListener in the lib.dom.d.ts is defined.
* Update link to working dash.js demo (was broken)
* Fix PreviewThumbnailsOptions type
According to the docs, the `src` should also accept an array of strings.
* fix issue #1872
* Check if key is a string before attempt --plyr checking
* Fix for Slow loading videos not autoplaying
* Fix for Slow loading videos not autoplaying
* Network requests are not cancelled after the player is destroyed
* Fix for apect ratio problem when using Vimeo player on mobile devices (issue #1940)
* chore: update packages and linting
* Invoke custom listener on triggering fullscreen via double-click
* Fix volume when unmuting from volume 0
* adding a nice Svelte plugin that I found
* Add missing unit to calc in media query
* Assigning player's lastSeekTime on rewind/fast forward to prevent immediate controls hide on mobile
* Fix youtube not working when player is inside shadow dom
* v3.6.2
* ESLint to use common config
* add BitChute to users list
* Fix aspect ratio issue
* Revert noCookie change
* feat: demo radius tweaks
* fix: poster image shouldn’t receive click events
* chore: package updates
* chore: linting
* feat: custom controls option for embedded players
* Package upgrades
* ESLint to use common config
* Linting changes
* Update README.md
* chore: formatting
* fix: revert pointer events change for poster
* fix: hack for Safari 14 not repainting Vimeo embed on entering fullscreen
* fix: demo using custom controls for YouTube
* doc: Add STROLLÿN among the list of Plyr users
* Fixes #2005
* fix: overflowing volume slider
* chore: clean up CSS
* fix: hide poster when not using custom controls
* Package upgrades
* ESLint to use common config
* Linting changes
* chore: revert customControls default option (to prevent breaking change)
* docs: changelog for v3.6.3
Co-authored-by: Som Meaden <som@theprojectsomething.com>
Co-authored-by: akuma06 <demon.akuma06@gmail.com>
Co-authored-by: Jonathan Arbely <dev@jonathanarbely.de>
Co-authored-by: Takeshi <iwatakeshi@users.noreply.github.com>
Co-authored-by: Hex <hex@codeigniter.org.cn>
Co-authored-by: Syed Husain <syed.husain@appspace.com>
Co-authored-by: Danielh112 <Daniel@sbgsportssoftware.com>
Co-authored-by: Danil Stoyanov <d.stoyanov@corp.mail.ru>
Co-authored-by: Guru Prasad Srinivasa <gurupras@buffalo.edu>
Co-authored-by: Stephane Fortin Bouchard <stephane.f.bouchard@gmail.com>
Co-authored-by: Zev Averbach <zev@averba.ch>
Co-authored-by: Vincent Orback <hello@vincentorback.se>
Co-authored-by: trafium <trafium@gmail.com>
Co-authored-by: xansen <27698939+xansen@users.noreply.github.com>
Co-authored-by: zoomerdev <59863739+zoomerdev@users.noreply.github.com>
Co-authored-by: Mikaël Castellani <mikael.castellani@gmail.com>
Co-authored-by: dirkjf <d.j.faber@outlook.com>
Diffstat (limited to 'dist/plyr.js')
-rw-r--r-- | dist/plyr.js | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/dist/plyr.js b/dist/plyr.js index bfa3162c..7a673573 100644 --- a/dist/plyr.js +++ b/dist/plyr.js @@ -1,7 +1,7 @@ typeof navigator === "object" && (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define('Plyr', factory) : - (global = global || self, global.Plyr = factory()); + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Plyr = factory()); }(this, (function () { 'use strict'; function _classCallCheck(instance, Constructor) { @@ -1197,7 +1197,12 @@ typeof navigator === "object" && (function (global, factory) { if (this.isVimeo && !this.config.vimeo.premium && this.supported.ui) { var height = 100 / this.media.offsetWidth * parseInt(window.getComputedStyle(this.media).paddingBottom, 10); var offset = (height - padding) / (height / 50); - this.media.style.transform = "translateY(-".concat(offset, "%)"); + + if (this.fullscreen.active) { + wrapper.style.paddingBottom = null; + } else { + this.media.style.transform = "translateY(-".concat(offset, "%)"); + } } else if (this.isHTML5) { wrapper.classList.toggle(this.config.classNames.videoFixedRatio, ratio !== null); } @@ -4101,10 +4106,12 @@ typeof navigator === "object" && (function (global, factory) { if (is$1.element(button)) { button.pressed = this.active; - } // Trigger an event + } // Always trigger events on the plyr / media element (not a fullscreen container) and let them bubble up + + var target = this.target === this.player.media ? this.target : this.player.elements.container; // Trigger an event - triggerEvent.call(this.player, this.target, this.active ? 'enterfullscreen' : 'exitfullscreen', true); + triggerEvent.call(this.player, target, this.active ? 'enterfullscreen' : 'exitfullscreen', true); } }, { key: "toggleFallback", @@ -4570,7 +4577,7 @@ typeof navigator === "object" && (function (global, factory) { // Loop through values (as they are the keys when the object is spread 🤔) Object.values(_objectSpread2({}, this.media.style)) // We're only fussed about Plyr specific properties .filter(function (key) { - return !is$1.empty(key) && key.startsWith('--plyr'); + return !is$1.empty(key) && is$1.string(key) && key.startsWith('--plyr'); }).forEach(function (key) { // Set on the container _this5.elements.container.style.setProperty(key, _this5.media.style.getPropertyValue(key)); // Clean up from media element @@ -8291,9 +8298,9 @@ typeof navigator === "object" && (function (global, factory) { if (this.isHTML5 && this.config.autoplay) { - setTimeout(function () { + this.once('canplay', function () { return silencePromise(_this.play()); - }, 10); + }); } // Seek time will be recorded (in listeners.js) so we can prevent hiding controls for a few seconds after seek @@ -8582,7 +8589,9 @@ typeof navigator === "object" && (function (global, factory) { } } else { // Unbind listeners - unbindListeners.call(_this3); // Replace the container with the original element provided + unbindListeners.call(_this3); // Cancel current network requests + + html5.cancelRequests.call(_this3); // Replace the container with the original element provided replaceElement(_this3.elements.original, _this3.elements.container); // Event |