136 Commits

Author SHA1 Message Date
Benny739
ff2c224254
Added preview thumbnails setter & fixed cannot set property 'hover' of null (#2256)
* added iPad to isIos

* elements.controls can be null

* elements.controls can be null

* added previewThumbnails setter

* fixed readme formatting

* previewThumbnails setter to method
2021-09-29 21:07:15 +10:00
Sam Potts
5fd4391cd9 fix: fullscreen issues with Vimeo (fixes #2175) 2021-05-12 23:37:05 +10:00
Sam Potts
ba09bc32d3 fix: use bound arrow functions in classes 2020-12-20 20:12:21 +11:00
Sam Potts
e8d883edba
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>
2020-11-14 13:24:11 +11:00
Sam Potts
2458eaa11b Merge branch 'develop' into css-variables
# Conflicts:
#	src/js/captions.js
#	src/js/config/defaults.js
#	src/js/fullscreen.js
#	src/js/listeners.js
#	src/js/plyr.js
2020-04-24 00:22:17 +10:00
Sam Potts
9c7e429b48 Vimeo ratio fixes 2020-04-19 19:51:06 +10:00
Sam Potts
502d5977d7 Converted to 2 space indentation 2020-04-11 16:23:14 +10:00
Som Meaden
12ab1ed144 convert fullscreen children listeners logic to ~ES6
remove gulp serve shortcut
2020-04-04 20:00:43 +10:00
Som Meaden
49ed2cac4e This is a PR to allow for contextual content to be included in fullscreen (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.
2020-04-04 13:43:51 +10:00
Sam Potts
ad63af5096 Added prettier script 2020-03-29 12:13:24 +11:00
ydylla
71928443f3 silence all internal play promises 2020-03-23 22:56:32 +01:00
Sam Potts
e1cb2f24f5
Merge pull request #1490 from antonyoneill/develop
Prevent default on settings control click
2020-02-09 10:30:33 +00:00
ydylla
9075ea189a fix scrubbing for chrome android & hide thumb preview on touchend
Chrome android sends TouchEvent which does not have a button property.
2020-02-08 19:14:06 +01:00
Sam Potts
a77d2d56f6 Fix build 2020-01-14 07:50:48 +00:00
Sam Potts
53a400027f Remove logic to hide/show volume controls based on audio track 2020-01-14 07:45:24 +00:00
Sam Potts
166a27d094 Comment clean up 2020-01-13 16:22:49 +00:00
Sam Potts
4f06e2eb71
Merge pull request #1570 from felipedeboni/ie11-resetonend-fix
Prevents IE11 with resetOnEnd option set to true to play video again
2020-01-13 16:21:46 +00:00
Jimmy Jia
72afffbc8d
fix: Fix handling listener return value 2019-09-25 14:21:13 -04:00
Felipe K. De Boni
bb43ef15fe Prevents IE11 with resetOnEnd option set to true to play video again 2019-09-16 11:53:07 -03:00
Antony O'Neill
400fd77d0a Prevent default on settings icon click 2019-07-04 19:02:22 +01:00
Sam Potts
97d9228bed Aspect ratio tweaks 2019-06-03 20:13:16 +10:00
Sam Potts
15cbae8a19 Removed commented out code for Edge 2019-06-02 22:25:44 +10:00
Sam Potts
0249772f01 Clean up 2019-06-01 19:50:29 +10:00
Sam Potts
c9055f391b Linting changes 2019-06-01 18:45:07 +10:00
Sam Potts
7a4a7dece8 Ratio improvements 2019-04-25 12:02:37 +10:00
Sam Potts
b675ba1f35 Fix issue with setGutter call 2019-04-13 12:55:48 +10:00
Sam Potts
cdacae6697 Set download URL via setter 2019-04-12 19:00:17 +10:00
Sam Potts
b247093495 Aspect ratio improvements (fixes #1042, fixes #1366) 2019-04-12 12:19:48 +10:00
Sam Potts
eb628c8e4f Ads bug fixes 2019-02-01 00:24:48 +11:00
Sam Potts
fa4868a26d Fix listeners for preview thumbs when changing source 2019-01-29 21:33:16 +11:00
Sam Potts
6782737009 Fullscreen fixes 2019-01-14 00:33:48 +11:00
Guru Prasad Srinivasa
3fb85664d2 Updated restart logic to call play instead of togglePlay 2018-12-08 00:57:47 -05:00
Guru Prasad Srinivasa
80813b0406 Replaced calls to player.restart() and player.togglePlay() with proxy(...) to ensure that custom handlers are called 2018-11-19 23:06:23 -05:00
Sam Potts
37c3f7109d Additional listener for checking for audio tracks 2018-11-08 23:17:44 +11:00
Sam Potts
5d5a6eabaa Merge branch 'develop' of github.com:sampotts/plyr into develop 2018-10-24 22:31:47 +11:00
Sam Potts
03c9b53232 Allow custom download URL (for streaming, etc) 2018-10-24 22:31:35 +11:00
James
69d0d6d7ee Prevent immediate hiding of controls on mobile 2018-10-23 10:08:46 +11:00
Sam Potts
fac134dd95 Added download button 2018-09-28 00:42:42 +10:00
James
8bdd90a2a8 Don't hide controls on focusout event
It was immediately hiding controls on some touch-enabled devices. It will now also wait 4s to close after tabbing out, instead of immediately.
2018-09-26 14:48:10 +10:00
Sam Potts
5536e97482 Typo 2018-09-25 23:48:33 +10:00
Sam Potts
87072cb690 Clean up 2018-09-25 23:29:43 +10:00
Sam Potts
62d80e6b76 Fix touch vs click issue 2018-09-25 20:43:09 +10:00
Sam Potts
95f6fa2731 Fix for setting pressed property of undefined (Fixes #1102) 2018-08-13 23:46:58 +10:00
Sam Potts
211ad6c8f5 Removed YouTube quality controls 2018-08-13 23:43:08 +10:00
Sam Potts
0bc6b1f1b3 Fix issue where enter key wasn’t setting focus correctly 2018-08-05 22:41:21 +10:00
Sam Potts
c8db1e55dd Escape closes menu 2018-08-01 01:26:15 +10:00
Sam Potts
2371619486 Linting 2018-08-01 00:56:44 +10:00
Sam Potts
748aa5179f Comments about keydown vs keyup for Firefox 2018-08-01 00:38:19 +10:00
Sam Potts
56a485bac6 Fix Firefox spacebar issue 2018-08-01 00:37:55 +10:00
Sam Potts
3a3358e2b4 Make iOS range fix more universal 2018-07-30 23:29:14 +10:00