Commit Graph

79 Commits

Author SHA1 Message Date
11214caf77 revert demo
feature demo is available here: https://codepen.io/theprojectsomething/full/bGdyJmv
2020-04-04 19:57:38 +10:00
a55bf00d0f minor demo fix for fallback mode (inline style was overriding plyr stylesheet) 2020-04-04 14:00:03 +10:00
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
ea350f9d1d Update demo video 2020-02-10 11:25:48 +00:00
a28685536a Update index.html 2019-07-11 23:18:35 +02:00
d9d2c4a219 Demo tweaks 2019-06-03 00:26:08 +10:00
ac88e6e190 Demo clean up 2019-06-02 23:16:29 +10:00
9c717275d2 Packages for demo separated 2019-06-02 22:24:41 +10:00
c9055f391b Linting changes 2019-06-01 18:45:07 +10:00
b694e7d3ab Use polyfill.io v3 2019-04-22 12:28:26 +10:00
153b8dc6bb Added RangeTouch, updated Shr lib in demo 2019-02-19 00:19:25 +11:00
fa4868a26d Fix listeners for preview thumbs when changing source 2019-01-29 21:33:16 +11:00
c125c1a2c0 Added ES builds 2019-01-27 01:08:39 +11:00
a64a84f2fe Fix merge 2019-01-26 16:54:04 +11:00
44739a17d0 Merge branch 'master' into develop
# Conflicts:
#	changelog.md
#	demo/dist/demo.js.map
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	demo/index.html
#	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
#	package.json
#	readme.md
#	yarn.lock
2019-01-26 16:50:37 +11:00
ad72ebd4bb Fix analytics 2019-01-17 18:50:26 +11:00
f927d26ce7 v3.4.8
- Calling customized controls function with proper arguments (thanks @a60814billy)
2019-01-17 11:37:19 +11:00
6782737009 Fullscreen fixes 2019-01-14 00:33:48 +11:00
e63ad7c74b Keyboard and focus improvements 2018-07-15 19:23:28 +10:00
1f1d74ba50 Work on menus 2018-06-21 09:01:16 +10:00
22d524ac9d Removed 1440p so I can afford to eat 2018-06-18 22:16:12 +10:00
9ebc2719d3 v3.3.0 2018-05-06 00:49:12 +10:00
a97b08e8ea ARIA and Vimeo fixes 2018-04-18 18:29:43 +10:00
5ed3ff9084 Restore paused state after seek 2018-04-11 21:52:31 +10:00
384010a2c0 Style fixes 2018-04-04 16:50:00 +10:00
3395e8df90 HTML5 quality selection 2018-04-02 22:40:03 +10:00
d593005b32 Muted and autoplay fixes, small bug fixes 2018-03-30 23:09:17 +11:00
bb7eea27e5 v3.0.2 2018-03-18 22:46:36 +11:00
c7ea13c0c7 Sentry in live only 2018-03-18 01:08:05 +11:00
0f8c6e147b Added Sentry 2018-03-18 00:21:23 +11:00
e206edc1f6 Event listener fixes, loadScript promise, ads tweaks 2018-03-11 02:03:35 +11:00
211db12a3d Readme merge 2018-02-06 11:06:46 +11:00
70c9fbdde3 Removed fetch dependency 2018-02-05 21:43:32 +11:00
d76ef3ff91 Small UI tweaks and fix for instanceof issue 2018-01-31 19:33:00 +11:00
5e68f8c8dd Attempt to fix YouTube message error, added ads references, changes to bool 2018-01-25 22:41:30 +11:00
ebf53d14b1 Small tweaks 2018-01-22 23:39:09 +11:00
2e5d06ad85 Publish script tweaks 2018-01-09 20:43:58 +11:00
6fd7b26bb2 Beta version up on https://plyr.io/beta and CDN 2018-01-09 20:25:46 +11:00
423f67b4f4 Copy 2017-12-08 15:55:12 +00:00
82f81f4f73 More Edge fixes and small UI bugs 2017-12-08 15:54:08 +00:00
7382553a78 Work on touch controls 2017-11-22 00:04:11 +11:00
edfc6cd475 Play button as toggle button, tooltip changes, docs updated, fullscreen fix 2017-11-21 13:12:36 +11:00
92cd67effb Docs to build custom CSS for plyr 2017-11-20 23:53:54 +11:00
da1e987444 WIP on docs example 2017-11-20 21:23:49 +11:00
feae00224e Added ended and playing getters 2017-11-20 10:48:28 +11:00
6984d6fb16 Controls cleanup, work on captions bug, click to invert time 2017-11-18 19:30:26 +11:00
d7a1c44281 Using fetch instead of xhr, grabbing title for YouTube 2017-11-16 11:38:06 +01:00
3930ebb339 Menu design tweaks, moved logic into plugins 2017-11-05 01:02:10 +11:00
13d3037a53 Meta data and icons updated 2017-11-05 00:29:21 +11:00
d920de2a25 Small tweaks 2017-11-04 21:19:02 +11:00