Commit Graph

1281 Commits

Author SHA1 Message Date
502d5977d7 Converted to 2 space indentation 2020-04-11 16:23:14 +10:00
12ab1ed144 convert fullscreen children listeners logic to ~ES6
remove gulp serve shortcut
2020-04-04 20:00:43 +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
d06881783d Formatting fixes 2020-03-30 17:04:43 +11:00
da943b384c Merge branch 'develop' into css-variables
# Conflicts:
#	demo/dist/demo.css
#	demo/dist/demo.min.js.map
#	demo/index.html
#	dist/plyr.css
#	dist/plyr.min.js.map
#	dist/plyr.min.mjs.map
#	dist/plyr.polyfilled.min.js.map
#	dist/plyr.polyfilled.min.mjs.map
#	gulpfile.js
#	src/sass/base.scss
#	src/sass/components/control.scss
#	src/sass/settings/colors.scss
#	src/sass/settings/controls.scss
2020-03-30 10:45:57 +11:00
ad63af5096 Added prettier script 2020-03-29 12:13:24 +11:00
09598f07bf Merge branch 'develop' of github.com:sampotts/plyr into develop
# Conflicts:
#	package.json
#	yarn.lock
2020-03-29 12:02:59 +11:00
155add66bd Merge pull request #1686 from lawchihon/master
Added missing full screen options for type definition
2020-03-29 11:22:51 +11:00
4935c92b63 Merge pull request #1697 from hug963/fix-vimeo-playback-rate
Fix vimeo playback rate
2020-03-29 11:21:01 +11:00
66f1f28646 Merge pull request #1724 from Steejo/ads-plugin-fixes
Ads plugin fixes to allow multiple VAST requests
2020-03-29 11:20:17 +11:00
48758bd5f0 Merge pull request #1705 from doublex/master
preview-thumbnails via src:callback()
2020-03-29 11:19:38 +11:00
2f26c80c88 Merge pull request #1739 from ydylla/ignore-internal-play-promises
Ignore internal play promises
2020-03-29 11:18:08 +11:00
be3ffc1f96 Merge pull request #1727 from jnoordsij/fix_shadowroot
Fix shadowroot
2020-03-29 11:17:33 +11:00
71928443f3 silence all internal play promises 2020-03-23 22:56:32 +01:00
99ae4eb3c5 Compare fullscreenElement with shadowroot host if player is in shadow DOM 2020-03-10 09:30:42 +01:00
c7bf0c5c03 Fix prototype used for selector matcher function 2020-03-10 09:19:34 +01:00
fd353225c2 Ads plugin fixes to allow multiple VAST requests 2020-03-09 23:18:19 +00:00
max
ace682abbd Fixes2 2020-02-26 10:41:26 +01:00
max
b212b25a9e Fixes 2020-02-26 10:35:08 +01:00
3c127afeb9 Merge pull request #1706 from sampotts/master
Merge back
2020-02-26 12:33:37 +11:00
8a0086397f Merge pull request #1704 from hug963/add-missing-ts-types
Add missing Typescripts types and options
2020-02-26 12:32:08 +11:00
max
81b41be750 preview-thumbnails via src:callback() 2020-02-25 17:53:44 +01:00
6020f95e50 Add missing Typescripts types and options 2020-02-25 11:10:06 +00:00
bc8a25d0da Completely hide SVG icons to screen readers
SVG icons should be ignored by screen readers since they have complimentary labels (aria-label or plyr__sr-only). The current « presentation » role simply makes the element behave like a « span » which is incorrect, aria-hidden prevents screen readers from taking care of these elements at all.
2020-02-25 10:46:31 +01:00
fea5e76b76 Use number instead of string in TS quality definitions
Using strings for the quality doesn't work, plyr expects numbers, so this fixes the definitions.
2020-02-24 11:33:50 -08:00
0cf5d25a7f catch error in setPlaybackRate on Vimeo 2020-02-20 12:57:47 +00:00
70470ae8d2 Fix issue when controls config is string or element 2020-02-17 18:02:39 +08:00
206e3b57d1 v3.5.10 2020-02-14 17:37:32 +00:00
6350b7b9e4 v3.5.10
- iOS volume display fix
2020-02-14 17:33:09 +00:00
04d06f2242 v3.5.9 deployed 2020-02-14 17:00:33 +00:00
7954c92c0b Merge branch 'master' into develop 2020-02-14 16:53:55 +00:00
5afb14283a Fix for regression with volume control width 2020-02-14 16:53:31 +00:00
bfc541b880 Ensure poster image is not downloaded again for HTML5 videos 2020-02-14 16:53:23 +00:00
cddd9c30db More styles clean up 2020-02-12 14:36:30 +00:00
550bd543e3 Added missing full screen options for type definition 2020-02-12 00:06:28 -08:00
a6ff0274a9 v3.5.8 deployed 2020-02-10 18:38:54 +00:00
1619510dcf Speed settings logic improvements 2020-02-10 18:34:05 +00:00
ff8dedd4ec Menu border color tweak 2020-02-10 17:53:23 +00:00
01219be817 Comment clean up 2020-02-10 11:31:18 +00:00
59e3afba03 Merge branch 'develop' of github.com:sampotts/plyr into develop 2020-02-10 11:28:59 +00:00
db05322ba2 Merge pull request #1670 from ydylla/previewThumbnails-setter
Add previewThumbnails source setter
2020-02-10 11:28:20 +00:00
74e5c78b3f Merge pull request #1678 from ydylla/fix-thumb-size-per-css
Improve thumbnail size calculations when size is set per css
2020-02-10 11:26:53 +00:00
7ca74f48bc Added vimeo options to hide controls and set referrerPolicy 2020-02-10 11:24:38 +00:00
5837c2d5f0 SASS orginasation clean up and flex-direction added 2020-02-10 11:23:57 +00:00
bb7f7d5e2a 3.5.7 2020-02-09 21:59:40 +00:00
93e3f8946a Docs updates 2020-02-09 21:52:34 +00:00
95431639a0 Merge branch 'develop' of github.com:sampotts/plyr into develop 2020-02-09 21:42:54 +00:00
2d13ad3d39 Focus trap improvements 2020-02-09 21:42:12 +00:00
74ba6a96fc Set download attribute for HTML5 only 2020-02-09 10:36:32 +00:00
e1cb2f24f5 Merge pull request #1490 from antonyoneill/develop
Prevent default on settings control click
2020-02-09 10:30:33 +00:00