86 Commits

Author SHA1 Message Date
Sam Potts
dca2ff8cfd chore: linting 2021-10-13 21:45:30 +11:00
Frosch
b256c102e8 Vimeo private videos: check for hash in src and add as a param (#2322)
* check for hash in src and add as a param

* Enable different methods of passing hash
2021-09-29 21:14:43 +10:00
Sam Potts
438e425838
fix: aspect ratio improvements (#2171)
- Use CSS aspect-ratio (retain fallback for legacy browsers)
- Round aspect ratios (fixes YouTube black border issue)
2021-04-18 16:58:44 +10:00
Sam Potts
8c74396459 chore: linting 2021-04-17 00:27:07 +10:00
didrip
711fc5835f add all required props to vimeo iframe allow attribute - fixes #2151 2021-03-24 14:06:50 +01:00
Sam Potts
aa3378fd73
v3.6.4 (#2089)
* 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

* Remove unnecessary calc from media query (#2049)

* Enhance types (#1841)

* 🏷️(type) enhance QualityOptions type

Some optional properties in the QualityOptions were missing. The forced
and onChange property allwoing to use an external handler.

* ♻️(type) use Plyr.Provider for the readonly provider property

A type exists to define all available providers. This type isn't used in
the Plyr class definition and the same provider list is also defined.
This code is refactored to use the Plyr.Provider type

* 🏷️(type) add missing elements property in Plyr class

In Plyr class, you can access elements set in cache. This property is
missing in the class definition. The Plyr.Elements is for now
incomplete.

* FIX - object values for the providers must be used (#2053)

To make use of the provider configuration, the objects values must be used.

* Fix to work inside iframes. (#2069)

* 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

* Added --plyr-video-background for having control over the background of a video with alpha channel (webm) or a poster image with alpha channel. (#2076)

* Fix issue with not entering iosfullscreen of vimeo videos with playsi… (#2038)

* Fix issue with not entering iosfullscreen of vimeo videos with playsinline=true

* Use isVimeo-function instead of hardcoded value

Co-authored-by: Julian Frosch <julian.frosch@gmail.com>

* fix: use new syntax for iframe allow attribute

* Bump ini from 1.3.5 to 1.3.7 (#2044)

Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: package updates

* chore: add @babel/plugin-proposal-class-properties

* fix: use bound arrow functions in classes

* chore: cleanup commented out code

* chore: release

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>
Co-authored-by: Naomi <naomizuiverloon@gmail.com>
Co-authored-by: Manuel Raynaud <manu@raynaud.io>
Co-authored-by: syteknet-core <github.core@sytek.net>
Co-authored-by: Andre Gagnon <ajgagnon@uwalumni.com>
Co-authored-by: Nepomuk Leutschacher <864660+nepomuc@users.noreply.github.com>
Co-authored-by: Elias Saalmann <lordon@users.noreply.github.com>
Co-authored-by: Julian Frosch <julian.frosch@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-29 23:14:02 +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
Benny739
e646207ed6 vimeo oembed api 2020-09-23 01:24:11 +02:00
Sam Potts
145f2ae24f Poster image fix (fixes #1763) 2020-04-19 20:06:58 +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
Sam Potts
d06881783d Formatting fixes 2020-03-30 17:04:43 +11:00
Hugues
0cf5d25a7f catch error in setPlaybackRate on Vimeo 2020-02-20 12:57:47 +00:00
Sam Potts
1619510dcf Speed settings logic improvements 2020-02-10 18:34:05 +00:00
Sam Potts
7ca74f48bc Added vimeo options to hide controls and set referrerPolicy 2020-02-10 11:24:38 +00:00
Sam Potts
90dc985657 Clean up speed options logic 2020-02-08 23:09:41 +00:00
Dustin Harrell
627df20b6d #615: updates to vimeo and youtube plugins to ensure that loading classes are added as content is buffering 2019-09-23 18:26:49 -04:00
Sam Potts
8fc6c2ba52 File rename and clean up 2019-06-21 00:19:37 +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
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
1d51b28701 Tweaks 2019-01-26 22:45:47 +11:00
Christian Gambardella
052e426810 Adds options for vimeo plugin #1316
This adds replaces hard coded vimeo options with options that can be passed to the Plyr instance when initializing.
2019-01-24 12:07:01 +01:00
Sam Potts
6782737009 Fullscreen fixes 2019-01-14 00:33:48 +11:00
Sam Potts
a19ad69038 Fix for Vimeo fullscreen with non 16:9 aspect ratios 2018-11-08 23:19:11 +11:00
Sam Potts
fac134dd95 Added download button 2018-09-28 00:42:42 +10:00
Sam Potts
c99607c85a Linting, housekeeping, duration fix (fixes #1074) 2018-06-29 00:21:22 +10:00
Albin Larsson
115f352ade Respect call order and prioritize public API calls for setting poster, in order to avoid race conditions 2018-06-15 23:56:47 +02:00
Albin Larsson
aab2817ddc Copy poster when creating new media element for YouTube and Vimeo (needed for #1018) 2018-06-15 22:57:16 +02:00
Albin Larsson
6bff6b317d Remove line breaks in arrays 2018-06-13 23:27:35 +02:00
Sam Potts
aae1092bac Merge branch 'develop' of github.com:sampotts/plyr into develop
# Conflicts:
#	src/js/captions.js
#	src/js/controls.js
#	src/js/fullscreen.js
#	src/js/html5.js
#	src/js/listeners.js
#	src/js/plugins/youtube.js
#	src/js/plyr.js
#	src/js/utils.js
2018-06-13 00:41:30 +10:00
Sam Potts
392dfd024c Utils broken down into seperate files and exports 2018-06-13 00:02:55 +10:00
Sam Potts
7d26f41d64
Merge pull request #1015 from friday/captions-fixes-again
Captions rewrite (use index internally to support missing or duplicate languages)
2018-06-11 13:21:05 +10:00
Sam Potts
f37f465ce4
Merge pull request #1020 from friday/1016
Vimeo: Update playback state and assure events are triggered on load
2018-06-11 11:48:03 +10:00
Albin Larsson
94699f3255 Fix problem with YouTube and Vimeo seeking while playing 2018-06-11 02:21:00 +02:00
Albin Larsson
d3e98eb27e Vimeo: Assure state is updated with autoplay (fixes #1016) 2018-06-11 00:00:16 +02:00
Albin Larsson
b12eeb0eb7 Merge captions setText and setCue into updateCues (fixes #998 and vimeo cuechange event) 2018-06-08 11:44:15 +02:00
Albin Larsson
f8c89e3e95 Fix #876: YouTube and Vimeo autoplays on seek 2018-05-19 04:18:27 +02:00
Albin Larsson
333435a9c2 Fix playback state (paused) and events (play/pause) 2018-05-19 04:18:27 +02:00
Albin Larsson
16c3a7d9e5 Rewrite ui.setPoster to check that images arent broken or youtube fallback images. Only show poster element when valid 2018-05-15 16:21:36 +02:00
Sam Potts
bbb11e611e Vimeo options, docs for multiple players 2018-05-08 13:12:39 +10:00
Sam Potts
90919411e9 Use div for poster, Vimeo fixes, Tooltip fixes 2018-05-08 12:57:24 +10:00
Sam Potts
9ebc2719d3 v3.3.0 2018-05-06 00:49:12 +10:00
Sam Potts
a97b08e8ea ARIA and Vimeo fixes 2018-04-18 18:29:43 +10:00
Sam Potts
119b471b84 More bug fixes 2018-04-17 23:51:23 +10:00
Sam Potts
1c06f6d06d Vimeo hotfix 2018-03-29 19:35:02 +11:00
Sam Potts
c4e2e24643 Bug fixes 2018-03-28 22:45:11 +11:00
Sam Potts
5eafe9baff Vimeo offset tweak (fixes #826) 2018-03-22 01:08:08 +11:00
Sam Potts
c251c94131 Fix for .stop() method (fixes #819) 2018-03-22 01:02:38 +11:00