aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils
Commit message (Collapse)AuthorAgeFilesLines
* Fix to work inside iframes. (#2069)Andre Gagnon2021-01-241-1/+7
| | | | | | | * Fix to work inside iframes. Right now Plyr fails to load inside iframes because the selectors are not instances of Element (iframes have their own, separate globals). This is an alternative method to check isElement that will work inside iframes. This is battle-tested fallback code used before browsers supported HTMLElement. * Update is.js
* chore: update packages and lintingSam Potts2020-08-309-34/+34
|
* Fix for apect ratio problem when using Vimeo player on mobile devices (issue ↵Danil Stoyanov2020-08-281-1/+5
| | | | #1940)
* Merge branch 'develop' into css-variablesSam Potts2020-04-241-0/+20
|\ | | | | | | | | | | | | | | | | # Conflicts: # src/js/captions.js # src/js/config/defaults.js # src/js/fullscreen.js # src/js/listeners.js # src/js/plyr.js
| * This is a PR to allow for contextual content to be included in fullscreen ↵Som Meaden2020-04-041-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (or fallback) mode. This means arbitrary elements (extensions to the basic player UI) can be overlaid and remain visible when the player switches to fullscreen. Example use-cases include: - display of video title or other metadata (see the included demo) - alternative access to menu items, such as a searchable captions list (in cases where many hundreds of languages are available) - custom share dialogs - integrated playlists with 'playing next' overlays This approach / PR is just an example of how this feature could work and aims to keep Plyr complexity to a minimum (while enabling some fairly interesting integrations). It utilises a single config option, and does away with the need for injecting bespoke APIs or elements into the player context on a per-project basis. Or trying to mess with what is a pretty slick, but tightly coupled system. For the user: A new `fullscreen.container` attribute is used to provide a container selector. The container must be an ancestor of the player, otherwise it's ignored. When toggling fullscreen mode, this container is now used in place of the player. Hovering over any children of the container is the same as hovering over the controls. The exception is where the player and the child share a common ancestor (that's not the fullscreen container) ... sounds complex but it's not. You can also gain pretty fine control this way with pointer events. Under the hood: it adds a `utils/elements/closest` helper method to find the right ancestor. If found this is returned as the fullscreen target in place of the player container. Fullscreen is instantiated slightly earlier in the setup so this container is available for the `listeners.controls` call. In here we add some more 'mouseenter/mouseleave' listeners to any direct descendants of the container, that aren't also ancestors of the player. And that's it. No extra classes, nothing else. There are some style changes to the demo (top margin on the player) but these would be project specific. Thanks for reading.
* | Vimeo ratio fixesSam Potts2020-04-191-2/+3
| |
* | Converted to 2 space indentationSam Potts2020-04-1118-589/+584
| |
* | Formatting fixesSam Potts2020-03-302-2/+2
|/
* Merge branch 'develop' of github.com:sampotts/plyr into developSam Potts2020-03-293-2/+16
|\ | | | | | | | | | | # Conflicts: # package.json # yarn.lock
| * Merge pull request #1739 from ydylla/ignore-internal-play-promisesSam Potts2020-03-291-0/+27
| |\ | | | | | | Ignore internal play promises
| | * silence all internal play promisesydylla2020-03-231-0/+27
| |/ |/|
| * Fix prototype used for selector matcher functionJesper2020-03-101-1/+1
|/
* Speed settings logic improvementsSam Potts2020-02-101-8/+0
|
* Focus trap improvementsSam Potts2020-02-091-35/+0
|
* Clean up speed options logicSam Potts2020-02-081-0/+8
|
* Bail out of focus trap if fullscreen is not activeKimberley Jensen2020-02-071-1/+2
| | | | - detailed in https://github.com/sampotts/plyr/issues/1665
* Merge branch 'develop' of github.com:sampotts/plyr into developSam Potts2020-01-261-1/+1
|\
| * Merge pull request #1655 from laukstein/patch-1Sam Potts2020-01-221-1/+1
| |\ | | | | | | Uncaught RangeError: Maximum call stack size exceeded
| | * Uncaught RangeError: Maximum call stack size exceededBinyamin Laukstein2020-01-221-1/+1
| | | | | | | | | Fix formatTime infinite loop #1621
* | | Audio style fixSam Potts2020-01-261-2/+3
|/ /
* / Fix linting issuesSam Potts2020-01-131-3/+1
|/
* File rename and clean upSam Potts2019-06-213-0/+0
|
* Aspect ratio tweaksSam Potts2019-06-032-14/+4
|
* Repaint clean upSam Potts2019-06-031-6/+10
|
* Linting changesSam Potts2019-06-016-12/+5
|
* Fix merging classSam Potts2019-04-251-7/+8
|
* Ratio improvementsSam Potts2019-04-251-2/+8
|
* Increase speed limitsSam Potts2019-04-151-0/+17
|
* Aspect ratio improvements (fixes #1042, fixes #1366)Sam Potts2019-04-121-14/+53
|
* Jsdoc updatesSam Potts2019-02-231-2/+2
|
* Ads bug fixesSam Potts2019-02-011-0/+2
|
* TweaksSam Potts2019-01-261-4/+4
|
* Fullscreen fixesSam Potts2019-01-142-0/+41
|
* fix: Use Math.trunc instead of parseIntJimmy Jia2018-12-201-3/+3
|
* Prevent scroll on focusSam Potts2018-11-031-1/+1
|
* Allow custom download URL (for streaming, etc)Sam Potts2018-10-241-0/+5
|
* Moved hardcoded resources to i18nSam Potts2018-09-281-0/+13
|
* Clean upSam Potts2018-09-252-4/+2
|
* Moved i18n to utilsSam Potts2018-08-131-0/+34
|
* Fix issue where enter key wasn’t setting focus correctlySam Potts2018-08-051-18/+4
|
* Escape closes menuSam Potts2018-08-011-0/+2
|
* LintingSam Potts2018-08-011-71/+10
|
* Click to play fix, poster fix, iOS controls fixesSam Potts2018-07-301-4/+10
|
* Keyboard and focus improvementsSam Potts2018-07-152-28/+94
|
* Merge branch 'develop' into a11y-improvementsSam Potts2018-07-021-1/+1
|\
| * Linting, housekeeping, duration fix (fixes #1074)Sam Potts2018-06-291-1/+1
| |
* | Work on key bindings for menuSam Potts2018-06-281-0/+15
| |
* | Merge branch 'develop' into a11y-improvementsSam Potts2018-06-251-58/+54
|\| | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # dist/plyr.js # dist/plyr.js.map # dist/plyr.min.js # dist/plyr.min.js.map # dist/plyr.polyfilled.js # dist/plyr.polyfilled.js.map # dist/plyr.polyfilled.min.js # dist/plyr.polyfilled.min.js.map # src/js/listeners.js
| * Ads only on HTML5 and .is cleanupSam Potts2018-06-211-58/+54
| |
* | Merge branch 'develop' into a11y-improvementsSam Potts2018-06-182-1/+2
|\| | | | | | | | | | | | | # Conflicts: # dist/plyr.js.map # dist/plyr.min.js # dist/plyr.min.js.map