Compare commits

...

1872 Commits

Author SHA1 Message Date
Sam Potts
d434c9af16 v3.7.0
- Feat: Add markers support (🚨 Requires a SCSS/CSS update 🚨) (thanks @ForeverSc and @fengshuo!)
- Feat: Add support for MediaMetadata (thanks @Hashen110!)
- Fix: Pass this context to captions.setup (fixes #2352) (thanks @WilliamMHerring, @willherring and @zenyr!)
- Fix: Modify vimeo parseHash to use non-named capture groups (fixes #2396) (thanks @fekle!)
- Fix: Replace deprecated String.prototype.substr() (thanks @CommanderRoot!)
- Docs: Update speed option default to match the source (thanks @ozgurg!)
- Docs: SASS → Sass (thanks @toastal!)
2022-04-18 21:02:28 +10:00
Sam Potts
9ce1dd6808 docs: added more docs for markers 2022-04-18 20:47:10 +10:00
Sam Potts
28347a0d7e chore: remove travis config 2022-04-18 20:28:21 +10:00
Sam Potts
5f9d090c13 chore: configure spellcheck via cspell 2022-04-18 20:28:12 +10:00
Sam Potts
1d4869beee feat: tweaks to markers logic and design 2022-04-18 20:15:30 +10:00
Sam Potts
565b68a5e2 chore: package upgrades 2022-04-18 20:15:30 +10:00
dependabot[bot]
285282f366 chore(deps): bump minimist from 1.2.5 to 1.2.6 (#2457)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 12:53:56 +10:00
Sam Potts
02456d6ba3 Merge branch 'develop' 2022-04-18 11:44:11 +10:00
Sam Potts
1d920a2e58 chore: add cspell configuration 2022-04-18 11:43:57 +10:00
Jinhyeok Lee
ba67920025 Fix 'this' while switching subtitle tracks (#2441)
When you switch a subtitle track you'll get

`TypeError: Cannot read properties of undefined (reading 'ui')` in `captions.js`'s `captions.setup`,

Because `captions.setup` is being called without proper `this` binding.
2022-04-18 11:43:44 +10:00
Hashen
b7953ff0fc Add markers docs (#2439)
* change browserslist to cover 100% not dead browsers

* feat: add MediaMetadata

* Revert browserslist change

* add markers docs

Co-authored-by: Sam Potts <sam@potts.es>
2022-04-18 11:43:24 +10:00
CommanderRoot
6b8e0f25d6 Replace deprecated String.prototype.substr() (#2427)
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-18 11:42:45 +10:00
Felix Klein
895299a4b3 modify vimeo parseHash to use non-named capture groups (#2426) 2022-04-18 11:40:19 +10:00
dependabot[bot]
2d7638a230 chore(deps): bump follow-redirects from 1.14.7 to 1.14.8 (#2422)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 11:39:32 +10:00
dependabot[bot]
ab028ea475 chore(deps): bump nanoid from 3.1.30 to 3.2.0 (#2407)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.30 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ai/nanoid/compare/3.1.30...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 11:39:13 +10:00
Will Herring
9157ac09ed pass this context to captions.setup (#2399)
Co-authored-by: Will Herring <will.herring@eventcore.com>
2022-04-18 11:38:54 +10:00
Özgür Görgülü
da7524438b Update speed option default to match the source (#2387)
Update speed option default value to match the source in README.md
2022-04-18 11:38:05 +10:00
Sam Potts
c64c8ac6c0 Merge branch 'master' into develop 2022-04-18 11:37:12 +10:00
Sam Potts
d700bb9f02 chore: add cspell configuration 2022-04-18 11:37:01 +10:00
toastal
2b6208565f SASS → Sass (#2436)
Sass is neither an acronym nor initialism. Sass also was never stylized
as SASS such as Less being stylized as both LESS and {less}.

http://www.sassnotsass.com/
2022-03-01 15:32:05 +11:00
Hashen
6bc447b916 feat: add MediaMetadata (#2410)
* change browserslist to cover 100% not dead browsers

* feat: add MediaMetadata

* Revert browserslist change

Co-authored-by: Sam Potts <sam@potts.es>
2022-02-24 23:42:58 +11:00
ForeverSc
4632614ced feat: add markers (#2386)
Co-authored-by: fengshuo <fengshuo@bilibili.com>
2022-02-12 20:35:52 +11:00
Sam Potts
01c5428fc4 Update README.md 2022-01-24 21:30:08 +11:00
dependabot[bot]
591c045c20 chore(deps): bump copy-props from 2.0.4 to 2.0.5 (#2401)
Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/gulpjs/copy-props/releases)
- [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5)

---
updated-dependencies:
- dependency-name: copy-props
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-15 17:20:19 +11:00
dependabot[bot]
1d7ea197f3 chore(deps): bump follow-redirects from 1.13.2 to 1.14.7 (#2400)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.2 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.2...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-15 17:19:00 +11:00
Sam Potts
1d0d6a3a92 v3.6.12
- Fix: remove division logic from ads.scss (fixes #2370)
2021-12-17 07:45:19 +11:00
Sam Potts
6a92e60a67 fix: remove division logic from ads.scss (fixes #2370) 2021-12-17 07:39:58 +11:00
Sam Potts
40395a1ff5 v3.6.11
- Fix: Replace `list.slash` added in 3.6.10 with `calc`
- Chore: Package upgrades
- Chore: SASS clean up
- Chore: Improvements to style linting
2021-12-16 23:03:29 +11:00
Sam Potts
9ea3a6923d fix: use calc instead of list.slash 2021-12-16 22:59:44 +11:00
Sam Potts
675a853e2e chore: SASS clean up 2021-12-16 22:59:25 +11:00
Sam Potts
950786b117 chore: npm script syntax tweak 2021-12-16 22:58:58 +11:00
Sam Potts
626e1dba64 docs: fix typos 2021-12-16 22:56:46 +11:00
Sam Potts
cbd1596af4 chore: stylelint config changes 2021-12-16 22:56:31 +11:00
Sam Potts
6ea510c36e chore: package upgrades 2021-12-16 22:56:13 +11:00
Sam Potts
0acf228dcd v3.6.10
- Fix: Use `list.slash` instead of deprecated syntax
- Chore: Clean up demo
2021-12-16 20:51:31 +11:00
Sam Potts
91b19baf44 fix: use list.slash instead of deprecated syntax 2021-12-16 20:29:36 +11:00
Sam Potts
990d636019 chore: clean up demo 2021-12-16 20:29:36 +11:00
Goodness Ezeh
b9c792b377 Fix repeated "an" (#2371) 2021-11-28 22:51:21 +11:00
Sam Potts
1b835cb657 Merge branch 'master' into develop
# Conflicts:
#	src/js/plugins/vimeo.js
2021-10-13 21:53:13 +11:00
Sam Potts
d9f9dc770b 3.6.9 2021-10-13 21:48:22 +11:00
Sam Potts
dca2ff8cfd chore: linting 2021-10-13 21:45:30 +11:00
Sam Potts
cf8e9341f2 fix: revert math.div SASS fallback 2021-09-29 22:07:42 +10:00
Sam Potts
5d1d247491 chore: minor code style tweak 2021-09-29 21:44:15 +10:00
Sam Potts
fbf4d27cd4 chore: fix SASS build 2021-09-29 21:44:02 +10:00
Sam Potts
e0b70d53cd fix: wrap localStorage sets in try/catch 2021-09-29 21:43:52 +10:00
Sam Potts
9f7725cec1 chore: package upgrades 2021-09-29 21:43:09 +10:00
Sam Potts
720cddff21 fix: add SASS div method fallback 2021-09-29 21:42:41 +10:00
Denis
1c33098c42 (fix): youtube videos duration (ref #2223). (#2224)
Co-authored-by: Denis Semionov <denis.semionov@prewise.com>
2021-09-29 21:14:43 +10: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
a3716fc491 chore: update node version 2021-09-29 21:14:43 +10:00
Sam Potts
14e276a11d fix: video height issue 2021-09-29 21:14:43 +10:00
Björn Brändewall
fc85a63af4 Fix invalid CSS selector syntax (#2303)
https://jigsaw.w3.org/css-validator/ complains that "The selector :empty can't appear after the pseudo-element selector ::after". Switching their places, however, will validate.
2021-09-29 21:14:43 +10:00
Emilis (Idea IT)
f016a367b5 Fixed errors when Plyr instance is destroyed before constructor setTimeout() functions execute. (#2108)
Co-authored-by: Emilis Dambauskas <emilis.dambauskas@mps.fi>
2021-09-29 21:14:43 +10:00
Sam Potts
d41a90f0dd change fullscreen element to player rootnode (#2204)
Co-authored-by: Walter van den Houten <63712489+wdfvdhouten@users.noreply.github.com>
2021-09-29 21:10:54 +10:00
Denis
b4f24f90da (fix): youtube videos duration (ref #2223). (#2224)
Co-authored-by: Denis Semionov <denis.semionov@prewise.com>
2021-09-29 21:08:12 +10:00
Tony Narlock
9d751f4265 README: Link to svelte project (#2242) 2021-09-29 21:07:45 +10:00
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
AntLevin
1135b1acac Fix types - add tagUrl in ads option with custom VAST (#2319) 2021-09-29 21:05:56 +10:00
Hemratna Bhimani
30ffb30a97 Fixes iOS fullscreen not centered issue. (#2284) 2021-09-29 21:05:15 +10:00
Frosch
e4a18a5c99 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:04:56 +10:00
dependabot[bot]
d1a10386c0 chore(deps): bump ws from 7.4.3 to 7.4.6 (#2226)
Bumps [ws](https://github.com/websockets/ws) from 7.4.3 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.3...7.4.6)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-25 00:13:41 +10:00
Lynn
4d6ac4ade1 chore: update plyr.d.ts for right ts check (#2245) 2021-08-24 23:18:09 +10:00
Andre Gagnon
c2bfe489ea Let icons load in iframes without a location (#2259)
Currently, icons will fail to load if the player is placed inside an iframe without a window.location. This adds an additional check to use `window.top.location` if the window does not have a location.
2021-08-24 23:16:30 +10:00
Jack G
882952bba6 fix: fixed captions when switching source (#2261) 2021-08-24 23:15:45 +10:00
Roland
784f36921b Update video.scss (#2296) 2021-08-24 22:30:13 +10:00
dependabot[bot]
b7dbdc133e chore(deps): bump path-parse from 1.0.6 to 1.0.7 (#2301)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-24 22:28:42 +10:00
Björn Brändewall
02d06c464c Fix invalid CSS selector syntax (#2303)
https://jigsaw.w3.org/css-validator/ complains that "The selector :empty can't appear after the pseudo-element selector ::after". Switching their places, however, will validate.
2021-08-24 22:28:02 +10:00
Emilis (Idea IT)
cec2474295 Fixed errors when Plyr instance is destroyed before constructor setTimeout() functions execute. (#2108)
Co-authored-by: Emilis Dambauskas <emilis.dambauskas@mps.fi>
2021-08-24 22:24:50 +10:00
dependabot[bot]
6caa2f3fed chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#2268)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-06 08:23:00 +10:00
Sam Potts
3a01837561 fix: allow local builds without git 2021-07-06 08:12:51 +10:00
Sam Potts
ba4bdb335a docs: update placehold.it references 2021-07-06 08:11:23 +10:00
Sam Potts
ba236c4753 v3.6.8 2021-05-12 23:40:37 +10:00
Sam Potts
a204f7c1dd Merge branch 'develop' 2021-05-12 23:37:34 +10:00
Sam Potts
bacf9122de chore: update nvmrc to 14 2021-05-12 23:37:05 +10:00
Sam Potts
2fdc1eac94 chore: lock file 2021-05-12 23:37:05 +10:00
Sam Potts
5fd4391cd9 fix: fullscreen issues with Vimeo (fixes #2175) 2021-05-12 23:37:05 +10:00
megumin
6991358428 Add container to FullscreenOptions (#2161) 2021-05-12 23:35:01 +10:00
Benny739
b050fde276 added iPad to isIos (#2191) 2021-05-12 23:33:48 +10:00
Sam Potts
32444c9851 v3.6.7
- Fix: remove regression caused by optional chaining and nullish coalescing in check for `window.CSS` check for aspect-ratio (fixes #2174)
2021-04-20 08:28:23 +10:00
Sam Potts
b93dcc43ad fix: minor syntax tweak 2021-04-19 21:16:30 +10:00
Sam Potts
6ff6ff1673 fix: syntax fix (#2176) 2021-04-19 21:13:06 +10:00
Sam Potts
e1ff86820c v3.6.6
- Improvements to how aspect ratio is handled. Use `aspect-ratio` CSS property instead of the legacy method (still used as fallback). Also automatically determined aspect ratios are rounded to the nearast standard ratio. This fixes issues with the YouTube embeds showing a 1-2px black bar.
- Hide the YouTube poster image container when paused so that the controls underneath can be used.
2021-04-18 17:49:23 +10:00
Sam Potts
7d22c361d1 chore: remove fastly purging logic (#2173) 2021-04-18 17:41:58 +10:00
Sam Potts
951cccb6b0 fix: youtube poster allow clickthrough while paused (#2172) 2021-04-18 16:59:00 +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
ddb5ad071e chore: deploy 2021-04-17 00:30:30 +10:00
Sam Potts
38060d986c chore: release 2021-04-17 00:27:07 +10:00
Sam Potts
8c74396459 chore: linting 2021-04-17 00:27:07 +10:00
dependabot[bot]
a09d63e8f8 chore(deps): bump is-svg from 4.2.1 to 4.3.1 (#2148)
Bumps [is-svg](https://github.com/sindresorhus/is-svg) from 4.2.1 to 4.3.1.
- [Release notes](https://github.com/sindresorhus/is-svg/releases)
- [Commits](https://github.com/sindresorhus/is-svg/compare/v4.2.1...v4.3.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-17 00:23:18 +10:00
Sam Potts
d74af9a73d fix: regression regarding poster image 2021-04-17 00:19:57 +10:00
Sam Potts
60310693d3 chore: packge updates, switch to cssnano 2021-04-17 00:19:41 +10:00
Sam Potts
5d08821c9b fix: missing styles for embeds 2021-04-17 00:19:05 +10:00
Sam Potts
3316e40e7b fix: issue with IE detection 2021-04-17 00:17:53 +10:00
Jürgen Genser
dfe5985326 added Runway360 to list of sites using plyr (#2117) 2021-03-27 19:48:11 +11:00
Jorge Bucaran
b27ad17c59 Migrate color formatting to colorette (#2124) 2021-03-27 19:46:41 +11:00
Sam Potts
14b8b24e14 Merge pull request #2152 from didrip/fix-vimeo-video-play-chrome-89
add all required props to vimeo iframe allow attribute - fixes #2151
2021-03-26 20:50:53 +11:00
didrip
711fc5835f add all required props to vimeo iframe allow attribute - fixes #2151 2021-03-24 14:06:50 +01:00
Sam Potts
028be22dec chore: removed dist directories from git 2021-01-30 00:06:48 +11:00
Sam Potts
3b5dc09285 Merge pull request #2093 from sampotts/develop
Develop
2021-01-29 23:54:46 +11:00
Sam Potts
8596e05df3 Merge branch 'master' into develop
# Conflicts:
#	src/js/utils/is.js
2021-01-29 23:43:10 +11:00
Sam Potts
1aee8f53a7 chore: publish 3.6.4 2021-01-29 23:40:34 +11:00
Sam Potts
a187d07807 chore: linting fix 2021-01-29 23:28:02 +11:00
Sam Potts
3096dd9513 Update pull_request_template.md 2021-01-29 23:18:47 +11:00
Sam Potts
150b07f3ef Update .travis.yml 2021-01-29 23:17:08 +11:00
Sam Potts
ad7778e78d Delete .travis directory 2021-01-29 23:16:52 +11:00
Sam Potts
c8e776bbea Delete prevent-base-master.sh 2021-01-29 23:16:33 +11:00
Sam Potts
c66dc8bf95 Update .travis.yml 2021-01-29 23:16:15 +11:00
Sam Potts
ea87b9c788 Update CONTRIBUTING.md 2021-01-29 23:15:44 +11: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
2cebf9b8a3 chore: release 2021-01-29 23:07:14 +11:00
Sam Potts
572aeacf5b chore: cleanup commented out code 2021-01-29 23:06:57 +11:00
Sam Potts
b5592b0fb5 fix: use bound arrow functions in classes 2021-01-29 22:47:27 +11:00
Sam Potts
9adf35a444 chore: add @babel/plugin-proposal-class-properties 2021-01-29 22:47:27 +11:00
Sam Potts
39ff31e3e3 chore: package updates 2021-01-29 22:47:27 +11:00
dependabot[bot]
7e82ec6d70 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>
2021-01-29 22:47:27 +11:00
Sam Potts
f4d6a243cd fix: use new syntax for iframe allow attribute 2021-01-29 22:47:27 +11:00
Elias Saalmann
31b5027b1e 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>
2021-01-29 22:38:26 +11:00
Nepomuk Leutschacher
7750314058 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) 2021-01-24 16:43:36 +11:00
Andre Gagnon
16c134fc1e 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
2021-01-24 10:32:45 +11:00
syteknet-core
f00e81a976 FIX - object values for the providers must be used (#2053)
To make use of the provider configuration, the objects values must be used.
2020-12-23 09:30:23 +11:00
Manuel Raynaud
32a4039f7c 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.
2020-12-20 20:18:53 +11:00
Sam Potts
ba09bc32d3 fix: use bound arrow functions in classes 2020-12-20 20:12:21 +11:00
Sam Potts
d7195d5276 chore: add @babel/plugin-proposal-class-properties 2020-12-20 20:12:21 +11:00
Sam Potts
6a6fb8d41a chore: package updates 2020-12-20 20:12:21 +11:00
Naomi
c853adc760 Remove unnecessary calc from media query (#2049) 2020-12-20 19:10:50 +11:00
dependabot[bot]
ca041f2e0d 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>
2020-12-20 19:05:31 +11:00
Sam Potts
87078d7a44 Merge branch 'master' into develop
# Conflicts:
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.min.mjs
#	dist/plyr.min.mjs.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	dist/plyr.polyfilled.min.mjs
#	dist/plyr.polyfilled.min.mjs.map
#	yarn.lock
2020-11-14 13:35:22 +11:00
Sam Potts
c300df5742 chore: fix node version 2020-11-14 13:34:29 +11:00
dependabot[bot]
2ba56fda15 Bump bl from 1.2.2 to 1.2.3 (#2017)
Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-14 13:34:04 +11:00
Sam Potts
b444aa3a98 pkg: deploy v3.6.3 2020-11-14 13:29:47 +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
36b53d2cf0 docs: changelog for v3.6.3 2020-11-14 13:22:24 +11:00
Sam Potts
2d4686a5f3 chore: revert customControls default option (to prevent breaking change) 2020-11-14 13:22:05 +11:00
Sam Potts
31861bd475 Merge branch 'master' into develop
# Conflicts:
#	package.json
#	src/js/plugins/vimeo.js
#	src/js/plugins/youtube.js
#	src/js/ui.js
#	yarn.lock
2020-11-14 13:11:24 +11:00
Sam Potts
c3e163741f Linting changes 2020-11-14 13:01:36 +11:00
Sam Potts
1c715bc889 ESLint to use common config 2020-11-14 12:55:06 +11:00
Sam Potts
35ef42246b Package upgrades 2020-11-14 12:55:06 +11:00
Sam Potts
cd3962ca32 fix: hide poster when not using custom controls 2020-11-14 12:50:49 +11:00
Sam Potts
da16c55427 chore: clean up CSS 2020-11-14 12:50:35 +11:00
Sam Potts
bd8bacb6d5 fix: overflowing volume slider 2020-11-14 00:22:40 +11:00
Sam Potts
0d393a5c92 Merge pull request #2008 from dirkjf/firefox-volume-fix
Fixes #2005
2020-11-14 00:22:18 +11:00
dirkjf
136bb525a5 Fixes #2005 2020-11-09 16:33:28 +01:00
Sam Potts
e85737d855 Merge pull request #1992 from micaste/patch-2
doc: Add STROLLÿN among the list of Plyr users
2020-11-05 10:03:34 +11:00
Mikaël Castellani
8882317080 doc: Add STROLLÿN among the list of Plyr users 2020-10-25 07:39:43 +01:00
Sam Potts
5c02205a4f fix: demo using custom controls for YouTube 2020-10-19 23:10:00 +11:00
Sam Potts
45f7e20233 fix: hack for Safari 14 not repainting Vimeo embed on entering fullscreen 2020-10-19 23:09:46 +11:00
Sam Potts
b116e62f37 fix: revert pointer events change for poster 2020-10-19 23:09:18 +11:00
Sam Potts
fa6282d0e2 chore: formatting 2020-10-19 22:43:53 +11:00
Sam Potts
80bdf04fde Merge pull request #1963 from gurupras/dblclick-fullscreen-custom-listener
Invoke custom listener on double-clicking on video (fullscreen)
2020-10-19 22:41:34 +11:00
Sam Potts
5d2c288721 Merge pull request #1961 from Benny739/master
fixed #1181 vimeo oembed api
2020-10-19 22:41:09 +11:00
Sam Potts
3caa37fdf2 Merge pull request #1867 from jonathanarbely/patch-1
Update link to working dash.js demo (was broken)
2020-10-19 22:39:42 +11:00
Sam Potts
807efcbc46 Update README.md 2020-10-19 22:39:31 +11:00
Sam Potts
03d1e3d3e8 Merge pull request #1972 from zevaverbach/patch-2
adding a nice Svelte plugin that I found
2020-10-19 22:36:06 +11:00
Sam Potts
664e2b4893 Merge pull request #1974 from vincentorback/patch-1
Add missing unit to calc in media query
2020-10-19 22:35:51 +11:00
Sam Potts
4cf36bf203 Merge pull request #1967 from airtimemedia/1934-Youtube-unmute-volume-0
Fix volume when unmuting from volume 0
2020-10-19 22:35:12 +11:00
Sam Potts
92f3728d80 Merge pull request #1977 from trafium/prevent-mobile-control-hiding-on-rewind-and-fast-forward
Prevent immediate hiding of controls on mobile when using rewind and fast forward
2020-10-19 22:34:30 +11:00
Sam Potts
29d3ae0b67 Merge pull request #1984 from xansen/develop
Fix youtube not working when player is inside shadow dom
2020-10-19 22:33:52 +11:00
Sam Potts
df91f7faac Merge branch 'master' into develop
# Conflicts:
#	README.md
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.min.mjs
#	dist/plyr.min.mjs.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	dist/plyr.polyfilled.min.mjs
#	dist/plyr.polyfilled.min.mjs.map
#	package.json
#	src/js/plugins/vimeo.js
#	src/js/plugins/youtube.js
#	src/js/ui.js
#	yarn.lock
2020-10-19 22:31:31 +11:00
Sam Potts
9a69ae2599 Linting changes 2020-10-19 22:27:16 +11:00
Sam Potts
02321c35bc ESLint to use common config 2020-10-19 22:27:16 +11:00
Sam Potts
7c6316d824 Package upgrades 2020-10-19 22:27:16 +11:00
Sam Potts
776b0c4036 feat: custom controls option for embedded players 2020-10-19 22:26:33 +11:00
Sam Potts
fa653a8859 chore: linting 2020-10-19 22:25:46 +11:00
Sam Potts
b6b7db7327 chore: package updates 2020-10-19 22:25:10 +11:00
Sam Potts
d4b4303b8e fix: poster image shouldn’t receive click events 2020-10-19 21:43:20 +11:00
Sam Potts
102fb1a32f feat: demo radius tweaks 2020-10-19 21:43:20 +11:00
Sam Potts
c77ba3ecf0 Revert noCookie change 2020-10-19 21:43:20 +11:00
Sam Potts
760f5f9469 Fix aspect ratio issue 2020-10-19 21:43:20 +11:00
zoomerdev
0135e9c7f4 add BitChute to users list 2020-10-19 21:43:20 +11:00
Sam Potts
2426c256cc ESLint to use common config 2020-10-19 21:43:05 +11:00
Sam Potts
93eed08d14 v3.6.2 2020-10-19 21:42:19 +11:00
xansen
5a164780d8 Fix youtube not working when player is inside shadow dom 2020-10-19 01:38:42 +06:00
Sam Potts
30989e4dbc Merge pull request #1982 from tbntdima/feat/fix-fulscreen-type
fix(plyr.d.ts): add force to FullScreenOptions
2020-10-15 09:09:49 +11:00
Dima An
967206c695 fix(plyr.d.ts): add force to FullScreenOptions 2020-10-14 17:09:14 +02:00
trafium
272d39c1d1 Assigning player's lastSeekTime on rewind/fast forward to prevent immediate controls hide on mobile 2020-10-12 10:28:57 +03:00
Vincent Orback
828abc8308 Add missing unit to calc in media query 2020-10-08 12:03:25 +02:00
Zev Averbach
6455a6acc0 adding a nice Svelte plugin that I found 2020-10-02 10:35:29 +02:00
Stephane Fortin Bouchard
51cb03dc32 Fix volume when unmuting from volume 0 2020-09-28 21:39:02 -04:00
Guru Prasad Srinivasa
4d25a33cb0 Invoke custom listener on triggering fullscreen via double-click 2020-09-23 18:24:53 -04:00
Benny739
e646207ed6 vimeo oembed api 2020-09-23 01:24:11 +02:00
Sam Potts
18b3f23c69 chore: update packages and linting 2020-08-30 16:10:25 +10:00
Sam Potts
98dbb2e43f Merge pull request #1885 from mercuryseries/patch-1
Fix small typo
2020-08-30 15:52:19 +10:00
Sam Potts
11e48b0181 Merge pull request #1824 from akuma06/patch-2
Fixing "missing code in detail" for PlyrEvent type
2020-08-30 15:48:50 +10:00
Sam Potts
3a07669e30 Merge pull request #1916 from syedhusain-appspace/develop
Check if key is a string before attempt --plyr checking
2020-08-30 15:47:25 +10:00
Sam Potts
3e70f32555 Merge pull request #1904 from sampotts/dependabot/npm_and_yarn/lodash-4.17.19
Bump lodash from 4.17.15 to 4.17.19
2020-08-30 15:47:00 +10:00
Sam Potts
b3d390076b Merge pull request #1914 from hex-ci/develop
fix issue #1872
2020-08-30 15:46:35 +10:00
Sam Potts
80fbeeb415 Merge pull request #1920 from Kithaitaa/Kithaitaa-patch-2
Please add our website to the "Used by" list
2020-08-30 15:46:11 +10:00
Sam Potts
8261ebd502 Merge pull request #1928 from ethanve/patch-1
fix: blankVideo type
2020-08-30 15:45:57 +10:00
Sam Potts
f75820fbd3 Merge pull request #1931 from SBGSports/Autoplay-issue
Fix for Slow loading videos not autoplaying
2020-08-30 15:45:24 +10:00
Sam Potts
8b0d84a9a4 Merge pull request #1935 from SBGSports/Cancel-network-requests-once-player-is-destroyed
Network requests are not cancelled after the player is destroyed
2020-08-30 15:44:55 +10:00
Sam Potts
d582e43413 Merge pull request #1941 from danilstoyanov/vimeo-aspect-ratio-mobile
Fix for apect ratio problem when using Vimeo player on mobile devices…
2020-08-30 15:44:19 +10:00
Danil Stoyanov
75082bc73f Fix for apect ratio problem when using Vimeo player on mobile devices (issue #1940) 2020-08-28 23:07:12 +03:00
Danielh112
f7e9ee56d2 Fix merge conflicts 2020-08-18 11:29:25 +01:00
Danielh112
22af7f16ea Network requests are not cancelled after the player is destroyed 2020-08-18 11:15:58 +01:00
Danielh112
9076d054b9 Fix for Slow loading videos not autoplaying 2020-08-14 10:34:48 +01:00
Danielh112
4eaa1a72b5 Fix for Slow loading videos not autoplaying 2020-08-14 10:29:46 +01:00
Ethan Veres
6f77e21e51 chore: fix blankVideo types 2020-08-12 10:11:45 -04:00
Kith
7910fea011 Please add our website to the "Used by" list
I would be happy if you could add our website to the "used by" list. We are a video game magazine that has been using Plyr for some time now for. Thx in advance.

Besides that i send you a donation through PayPal a few days ago =)
2020-08-05 10:44:41 +02:00
Syed Husain
4c1ae8f3ce Check if key is a string before attempt --plyr checking 2020-07-30 19:43:04 +08:00
Hex
0733133510 fix issue #1872 2020-07-29 17:01:21 +08:00
dependabot[bot]
8e0cde2949 Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-16 18:00:08 +00:00
Sam Potts
423b7b276f Merge pull request #1900 from iwatakeshi/patch-1
Fix PreviewThumbnailsOptions type
2020-07-14 09:03:36 +10:00
Takeshi
cbd4a7cef4 Fix PreviewThumbnailsOptions type
According to the docs, the `src` should also accept an array of strings.
2020-07-13 13:00:16 -06:00
Sam Potts
391afe2814 Merge pull request #1889 from rutheneum-bote/patch-1
Add us to the "Used by" list
2020-06-30 22:08:25 +10:00
Rutheneum-Bote
68e3944bb8 Add us to the "Used by" list
We're the students' newspaper of the Goethe Grammar School/Rutheneum since 1608 and we use Plyr in order to present the students' songs that were submitted to our school's creativity contest.
2020-06-30 11:47:09 +00:00
Honoré Hounwanou
2ee6ae16b2 Fix small typo
Add missing "d" in video.
2020-06-27 10:18:49 -04:00
Jonathan Arbely
8ce7425f73 Update link to working dash.js demo (was broken) 2020-06-09 20:13:41 +02:00
akuma06
1f63806c3f 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.
2020-05-05 15:34:41 +02:00
Sam Potts
6cb822d56f Merge pull request #1823 from theprojectsomething/features/fullscreen-container
force fullscreen events to trigger on plyr element
2020-05-05 17:07:00 +10:00
Som Meaden
9dee5acec6 force fullscreen events to trigger on plyr element (media element in iOS) and not fullscreen container 2020-05-05 16:35:36 +10:00
Sam Potts
ef85cb6195 Merge pull request #1822 from zoomerdev/patch-1
Add BitChute to users list
2020-05-05 15:26:29 +10:00
zoomerdev
dc8612fcd0 add BitChute to users list 2020-05-05 01:19:42 -04:00
Sam Potts
86c3cf648f v3.6.2 2020-05-04 21:38:10 +10:00
Sam Potts
37be1336fb v3.6.2 2020-05-04 21:33:16 +10:00
Sam Potts
3d7f80737b Package upgrades 2020-05-04 21:32:30 +10:00
Sam Potts
58a9321764 Merge pull request #1818 from Bashev/patch-1
Update tooltips.scss
2020-05-04 21:22:21 +10:00
Sam Potts
b600f387f0 Merge pull request #1819 from Bashev/patch-2
Update controls.scss
2020-05-04 21:22:05 +10:00
Kostadin Bashev
2a97adbec6 Update controls.scss 2020-05-01 18:17:49 +03:00
Kostadin Bashev
853753a3da Update tooltips.scss 2020-05-01 18:16:59 +03:00
Sam Potts
405bf9ce37 Merge pull request #1815 from taylorchu/progbar
add missing previewThumbnails options
2020-04-29 10:10:39 +10:00
taylorchu
d5ea881729 add missing previewThumbnails options 2020-04-28 17:03:10 -07:00
Sam Potts
391b9acd98 Merge pull request #1811 from taylorchu/better-control-2
allow custom control as element
2020-04-29 09:39:50 +10:00
Sam Potts
dda2d072aa Merge pull request #1813 from sampotts/master
Merge back
2020-04-29 09:21:32 +10:00
taylorchu
3c1ba2397b allow custom control as element 2020-04-28 15:28:36 -07:00
Sam Potts
adb3f35920 v3.6.1 2020-04-28 23:17:54 +10:00
Sam Potts
a58b8bf4bb 2 spaces 2020-04-28 22:22:17 +10:00
Sam Potts
99a26d65cf Merge pull request #1796 from sampotts/develop
v3.6.0
2020-04-28 22:20:49 +10:00
Sam Potts
4915cf0120 Use new feature to set thumbnails on source change in the demo 2020-04-24 01:15:54 +10:00
Sam Potts
66c5780616 v3.6.0 2020-04-24 01:05:58 +10:00
Sam Potts
e48b1d11ce Housekeeping 2020-04-24 00:47:41 +10:00
Sam Potts
ba91f23c50 Fix linting issues 2020-04-24 00:39:26 +10:00
Sam Potts
ad4f303aa0 Merge branch 'master' into develop
# Conflicts:
#	readme.md
2020-04-24 00:34:44 +10:00
Sam Potts
3b521f73bd Merge branch 'develop' of github.com:sampotts/plyr into develop
# Conflicts:
#	package.json
#	yarn.lock
2020-04-24 00:32:16 +10:00
Sam Potts
27126b20bc Merge 2020-04-24 00:31:50 +10:00
Sam Potts
68137aa789 Merge pull request #1770 from sampotts/css-variables
Allow customization via CSS Custom Properties
2020-04-24 00:22:39 +10: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
a97008aeeb More work on custom properties and documentation 2020-04-24 00:14:50 +10:00
Sam Potts
a9b24f5e1f Use custom properties in demo 2020-04-23 22:07:32 +10:00
Sam Potts
a9c4e77d1b Migrate custom properties from media to parent 2020-04-23 22:06:36 +10:00
Sam Potts
dbe618c644 Merge pull request #1793 from theprojectsomething/features/postload-captions
Preload TextTracks as per default video element
2020-04-23 22:03:45 +10:00
Som Meaden
40f06e0b4c This commit addresses preloading TextTracks as outlined in feature request #1791
These changes bring Plyr captions download behaviour in line with that of the default video element in major browsers. Specifically text tracks only download as they are required for display. Previously all text tracks would download when the Plyr instance was instantiated - which could become an issue when e.g. many translations are available.

For a track to be downloaded it must either be the default track, the active track when captions are toggled on, or selected from the captions menu.
2020-04-23 17:01:49 +10:00
Sam Potts
6aa21c1fae Merge pull request #1789 from likev/patch-1
Update readme.md
2020-04-22 08:31:23 +10:00
Sam Potts
8015a961cb Merge pull request #1790 from likev/patch-2
Update readme.md
2020-04-22 08:30:23 +10:00
xufanglu
d2fa69bca6 Update readme.md
fixed code logic error
2020-04-21 23:25:00 +08:00
xufanglu
d63182ecd5 Update readme.md
There is another same Note below
2020-04-21 23:06:06 +08: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
6f1366bd19 Merge pull request #1759 from theprojectsomething/features/fullscreen-container
Features/fullscreen container
2020-04-19 16:51:31 +10:00
Sam Potts
502d5977d7 Converted to 2 space indentation 2020-04-11 16:23:14 +10:00
Som Meaden
353e19e746 revert dist (brain fart earlier .. deleted instead of reverting) 2020-04-05 12:32:17 +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
11214caf77 revert demo
feature demo is available here: https://codepen.io/theprojectsomething/full/bGdyJmv
2020-04-04 19:57:38 +10:00
Som Meaden
c23b4576df remove dist 2020-04-04 14:21:59 +10:00
Som Meaden
a55bf00d0f minor demo fix for fallback mode (inline style was overriding plyr stylesheet) 2020-04-04 14:00:03 +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
Som Meaden
44ef0bbc87 include npm run serve shortcut for gulp serve (useful where gulp isn't installed globally) 2020-04-04 13:02:17 +10:00
Sam Potts
8f5b59c18c Sentry upgrade for demo 2020-03-30 23:39:01 +11:00
Sam Potts
d06881783d Formatting fixes 2020-03-30 17:04:43 +11:00
Sam Potts
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
Sam Potts
ad63af5096 Added prettier script 2020-03-29 12:13:24 +11:00
Sam Potts
09598f07bf Merge branch 'develop' of github.com:sampotts/plyr into develop
# Conflicts:
#	package.json
#	yarn.lock
2020-03-29 12:02:59 +11:00
Sam Potts
ef7b30c1b8 Package upgrades 2020-03-29 11:36:51 +11:00
Sam Potts
5516db22c3 Gulp file broken down 2020-03-29 11:36:44 +11:00
Sam Potts
155add66bd Merge pull request #1686 from lawchihon/master
Added missing full screen options for type definition
2020-03-29 11:22:51 +11:00
Sam Potts
39558cbabc Merge pull request #1731 from nisarhassan12/master
update the gitpod setup description to be more precise.
2020-03-29 11:22:20 +11:00
Sam Potts
4935c92b63 Merge pull request #1697 from hug963/fix-vimeo-playback-rate
Fix vimeo playback rate
2020-03-29 11:21:01 +11:00
Sam Potts
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
Sam Potts
48758bd5f0 Merge pull request #1705 from doublex/master
preview-thumbnails via src:callback()
2020-03-29 11:19:38 +11:00
Sam Potts
2f26c80c88 Merge pull request #1739 from ydylla/ignore-internal-play-promises
Ignore internal play promises
2020-03-29 11:18:08 +11:00
Sam Potts
be3ffc1f96 Merge pull request #1727 from jnoordsij/fix_shadowroot
Fix shadowroot
2020-03-29 11:17:33 +11:00
Sam Potts
3509995756 Build 2020-03-27 23:50:40 +11:00
Sam Potts
88dc981f4b Package upgrades 2020-03-27 23:50:36 +11:00
Sam Potts
a65acbe43f Merge branch 'master' into develop 2020-03-27 23:37:57 +11:00
ydylla
6a1d6f13a2 add promise footnote to togglePlay 2020-03-23 22:56:37 +01:00
ydylla
71928443f3 silence all internal play promises 2020-03-23 22:56:32 +01:00
Nisar Hassan Naqvi
10f366fe32 update the gitpod setup description to be more precise. 2020-03-16 07:16:22 +00:00
Sam Potts
fcd82088a5 Update readme.md 2020-03-14 12:46:33 +11:00
Sam Potts
c9b6d9685c Update readme.md 2020-03-14 12:46:05 +11:00
Sam Potts
3069d77b74 Merge pull request #1729 from opencollective/opencollective
Add financial contributors for Open Collective
2020-03-14 12:45:17 +11:00
jess
b7367d8275 Add financial contributors for Open Collective
Hi, I'm making updates for Open Collective. Either you or another core contributor signed this repository up for Open Collective. This pull request adds financial contributors from your Open Collective https://opencollective.com/plyr ❤️

  What it does:
  - adds a badge to show the latest number of financial contributors
  - adds a banner displaying contributors to the project on GitHub
  - adds a banner displaying all individuals contributing financially on Open Collective
  - adds a section displaying all organizations contributing financially on Open Collective, with their logo and a link to their website

P.S: As with any pull request, feel free to comment or suggest changes.

  Thank you for your great contribution to the Open Source community. You are awesome! 🙌
  And welcome to the Open Collective community! 😊

  Come chat with us in the #opensource channel on https://slack.opencollective.com - great place to ask questions and share best practices with other Open Source sustainers!
2020-03-13 18:25:13 -07:00
Jesper
99ae4eb3c5 Compare fullscreenElement with shadowroot host if player is in shadow DOM 2020-03-10 09:30:42 +01:00
Jesper
c7bf0c5c03 Fix prototype used for selector matcher function 2020-03-10 09:19:34 +01:00
Steejo
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
Sam Potts
3c127afeb9 Merge pull request #1706 from sampotts/master
Merge back
2020-02-26 12:33:37 +11:00
Sam Potts
84eef1d747 Merge pull request #1701 from mogzol/patch-1
Use number instead of string in TS quality definitions
2020-02-26 12:33:07 +11:00
Sam Potts
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
Sam Potts
75327f2242 Merge pull request #1703 from LeBenLeBen/develop
Completely hide SVG icons to screen readers
2020-02-26 12:31:34 +11:00
max
81b41be750 preview-thumbnails via src:callback() 2020-02-25 17:53:44 +01:00
Hugues
6020f95e50 Add missing Typescripts types and options 2020-02-25 11:10:06 +00:00
Benoît Burgener
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
Sam Potts
29e62a1e4f Merge pull request #1702 from sampotts/master
Merge back
2020-02-25 09:21:31 +11:00
Sam Potts
b12ec094c5 Update contributing.md 2020-02-25 09:20:40 +11:00
Morgan Zolob
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
Hugues
0cf5d25a7f catch error in setPlaybackRate on Vimeo 2020-02-20 12:57:47 +00:00
Sam Potts
977a8393f8 Merge pull request #1695 from CzBiX/patch-2
Fix issue when controls config is string or element
2020-02-19 08:57:26 +11:00
Sam Potts
302fd93e86 Merge pull request #1694 from nisarhassan12/master
simplify contributions by fully automating the dev setup with gitpod
2020-02-19 08:55:50 +11:00
CzBiX
70470ae8d2 Fix issue when controls config is string or element 2020-02-17 18:02:39 +08:00
Nisar Hassan Naqvi
425b39a762 simplify code contributions by fully automating the dev setup with gitpod 2020-02-17 04:21:35 +00:00
Sam Potts
206e3b57d1 v3.5.10 2020-02-14 17:37:32 +00:00
Sam Potts
a34bc3ef29 Merge pull request #1692 from sampotts/develop
v3.5.10
2020-02-14 17:33:41 +00:00
Sam Potts
6350b7b9e4 v3.5.10
- iOS volume display fix
2020-02-14 17:33:09 +00:00
Sam Potts
04d06f2242 v3.5.9 deployed 2020-02-14 17:00:33 +00:00
Sam Potts
924049aa14 Merge pull request #1691 from sampotts/develop
v3.5.9
2020-02-14 16:55:56 +00:00
Sam Potts
442427ebd5 v3.5.9
-   Fix for regression with volume control width
-   Ensure poster image is not downloaded again for HTML5 videos
2020-02-14 16:54:22 +00:00
Sam Potts
7954c92c0b Merge branch 'master' into develop 2020-02-14 16:53:55 +00:00
Sam Potts
5afb14283a Fix for regression with volume control width 2020-02-14 16:53:31 +00:00
Sam Potts
bfc541b880 Ensure poster image is not downloaded again for HTML5 videos 2020-02-14 16:53:23 +00:00
Sam Potts
426280f90c Merge branch 'master' into develop 2020-02-13 15:06:57 +00:00
Sam Potts
2e2c5ad72a Styles 2020-02-13 15:06:38 +00:00
Sam Potts
ecb091af6b Fix syntax with funding.yml 2020-02-13 12:40:08 +00:00
Sam Potts
ecb882b719 Added Open Collective as funding option 2020-02-13 12:39:30 +00:00
Sam Potts
cddd9c30db More styles clean up 2020-02-12 14:36:30 +00:00
Sam Potts
f6a4625495 Removed redundant keys property 2020-02-12 11:35:47 +00:00
John Law
550bd543e3 Added missing full screen options for type definition 2020-02-12 00:06:28 -08:00
Sam Potts
a6ff0274a9 v3.5.8 deployed 2020-02-10 18:38:54 +00:00
Sam Potts
841746210a Merge pull request #1684 from sampotts/develop
v3.5.8
2020-02-10 18:35:42 +00:00
Sam Potts
156abda66a Changelog update 2020-02-10 18:34:26 +00:00
Sam Potts
1619510dcf Speed settings logic improvements 2020-02-10 18:34:05 +00:00
Sam Potts
ff8dedd4ec Menu border color tweak 2020-02-10 17:53:23 +00:00
Sam Potts
637823c8ce Started on v3.5.8 changelog 2020-02-10 11:31:39 +00:00
Sam Potts
01219be817 Comment clean up 2020-02-10 11:31:18 +00:00
Sam Potts
59e3afba03 Merge branch 'develop' of github.com:sampotts/plyr into develop 2020-02-10 11:28:59 +00:00
Sam Potts
db05322ba2 Merge pull request #1670 from ydylla/previewThumbnails-setter
Add previewThumbnails source setter
2020-02-10 11:28:20 +00:00
Sam Potts
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
Sam Potts
ea350f9d1d Update demo video 2020-02-10 11:25:48 +00:00
Sam Potts
eda192639d Demo packages updated 2020-02-10 11:25:39 +00:00
Sam Potts
0f16a018ff Set referrerPolicy in the demo 2020-02-10 11:25:25 +00:00
Sam Potts
7ca74f48bc Added vimeo options to hide controls and set referrerPolicy 2020-02-10 11:24:38 +00:00
Sam Potts
5837c2d5f0 SASS orginasation clean up and flex-direction added 2020-02-10 11:23:57 +00:00
Sam Potts
e50b35d195 Merge pull request #1554 from sampotts/dependabot/npm_and_yarn/mixin-deep-1.3.2
Bump mixin-deep from 1.3.1 to 1.3.2
2020-02-09 22:17:19 +00:00
Sam Potts
433b729c45 Merge pull request #1575 from sampotts/dependabot/npm_and_yarn/lodash.merge-4.6.2
Bump lodash.merge from 4.6.1 to 4.6.2
2020-02-09 22:17:10 +00:00
Sam Potts
bb7f7d5e2a 3.5.7 2020-02-09 21:59:40 +00:00
Sam Potts
8c44425665 Merge pull request #1679 from sampotts/develop
3.5.7
2020-02-09 21:53:24 +00:00
Sam Potts
93e3f8946a Docs updates 2020-02-09 21:52:34 +00:00
Sam Potts
95431639a0 Merge branch 'develop' of github.com:sampotts/plyr into develop 2020-02-09 21:42:54 +00:00
Sam Potts
3e3186cfeb Update docs for speed options tweaks 2020-02-09 21:42:27 +00:00
Sam Potts
2d13ad3d39 Focus trap improvements 2020-02-09 21:42:12 +00:00
ydylla
d7d0f5fca0 add previewThumbnails to source setter docs 2020-02-09 17:03:31 +01:00
Sam Potts
74ba6a96fc Set download attribute for HTML5 only 2020-02-09 10:36:32 +00: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
Sam Potts
59e3ef7248 Comments 2020-02-09 10:20:40 +00:00
Sam Potts
0b1c480729 Package upgrades 2020-02-08 23:09:50 +00:00
Sam Potts
90dc985657 Clean up speed options logic 2020-02-08 23:09:41 +00:00
Sam Potts
b5456e1de7 Merge pull request #1671 from ydylla/improve-speed-options
Use the configured speed options
2020-02-08 22:29:49 +00:00
Sam Potts
976eebc2a2 Merge pull request #1672 from ydylla/improve-quality-change
Improve/fix quality change state restoring
2020-02-08 22:19:44 +00:00
Sam Potts
f00c279366 Merge pull request #1675 from Laerdal/focus-trap-only-fullscreen
Trap keyboard focus only when fullscreen
2020-02-08 22:18:59 +00:00
Sam Potts
b651d6f027 Merge pull request #1676 from Code1110/develop
Add download attribute to download button
2020-02-08 22:18:14 +00:00
Sam Potts
b63b62f6dc Merge pull request #1677 from ydylla/fix-scrubbing-chrome-android
Fix preview thumbnail scrubbing not working on mobile touch devices
2020-02-08 22:17:41 +00:00
Sam Potts
0f08c7c13a Ignore quality change if it matches existing 2020-02-08 21:48:51 +00:00
ydylla
97f8093a8d allows to set only width or height for thumb css size
Also fixes sprites when css thumb size is used
2020-02-08 19:15:02 +01: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
Code1110
c33f0995f9 add download attribute to download button 2020-02-07 18:15:56 +01:00
Kimberley Jensen
e17da7dfd4 Bail out of focus trap if fullscreen is not active
- detailed in https://github.com/sampotts/plyr/issues/1665
2020-02-07 15:00:04 +01:00
ydylla
299f712cc9 actually use the configured speed options 2020-02-01 16:37:38 +01:00
ydylla
f755a3c401 preserve playback rate at quality change 2020-02-01 16:35:24 +01:00
ydylla
472bb479d4 fix regression: not restoring playback state after quality change 2020-02-01 16:35:17 +01:00
ydylla
61a24eab76 add previewThumbnails source setter #1369 2020-02-01 16:32:19 +01:00
Sam Potts
8b9521d5a5 Fix beta deployment 2020-01-30 14:57:14 +00:00
Sam Potts
818e1efd43 Deployed 3.5.7-beta.0 2020-01-30 14:56:52 +00:00
Sam Potts
58f5380694 Merge pull request #1662 from sampotts/develop
3.5.7
2020-01-30 14:23:40 +00:00
Sam Potts
9d51291125 Merge pull request #1663 from sampotts/master
Merge back to beta
2020-01-30 14:23:10 +00:00
Sam Potts
fefcca7805 Prepare for 3.5.7 release 2020-01-30 11:34:07 +00:00
Sam Potts
5204f33d45 Package upgrades 2020-01-30 11:07:14 +00:00
Sam Potts
0041ea3050 Merge branch 'develop' of github.com:sampotts/plyr into develop 2020-01-26 22:05:29 +00:00
Sam Potts
f8a28b632c Audio style fix 2020-01-26 22:05:21 +00:00
Sam Potts
9c817cff68 Merge pull request #1653 from thatrobotdev/patch-2
Patch 2
2020-01-22 11:32:37 +00:00
Sam Potts
521e8abf88 Merge pull request #1654 from thatrobotdev/patch-3
Fix broken link to new plugin
2020-01-22 11:31:02 +00:00
Sam Potts
9fe03c7474 Merge pull request #1655 from laukstein/patch-1
Uncaught RangeError: Maximum call stack size exceeded
2020-01-22 11:30:19 +00:00
Binyamin Laukstein
c3f10e7df3 Uncaught RangeError: Maximum call stack size exceeded
Fix formatTime infinite loop #1621
2020-01-22 08:53:08 +02:00
James Kerrane
1b8c51f45e Fix broken link to new plugin
Fix broken link, and update to an active project replacement https://github.com/chintan9/plyr-react.
2020-01-21 23:15:18 -07:00
James Kerrane
1bb4c207f1 Change vimeo demo video
Change vimeo video to a more general video, fix #1626.
2020-01-21 23:08:55 -07:00
Sam Potts
b6da2702a2 Fix reference 2020-01-21 22:30:58 +00:00
Sam Potts
fb704b945d Presentation fixes 2020-01-21 22:29:00 +00:00
Sam Potts
71d6f59d56 HTML5 poster fixes for multiple downloads 2020-01-21 22:28:48 +00:00
Sam Potts
89136bc2e6 Merge branch 'develop' of github.com:sampotts/plyr into develop
# Conflicts:
#	src/sass/components/video.scss
2020-01-21 22:15:38 +00:00
Sam Potts
b6d94e000f Merge pull request #1651 from shravan2x/develop
Fixed Plyr container not resizing responsively
2020-01-21 22:11:32 +00:00
Shravan Rajinikanth
bfcb7133cb Fixed Plyr container not resizing responsively 2020-01-19 06:05:12 -08:00
Sam Potts
7883792ccc Fix issue with browser sync preview 2020-01-14 22:33:01 +00:00
Sam Potts
def3668030 Fix issues with fixed ratios and 100% height/width 2020-01-14 22:32:45 +00:00
Sam Potts
a77d2d56f6 Fix build 2020-01-14 07:50:48 +00:00
Sam Potts
7ee041403f Merge branch 'develop' of github.com:sampotts/plyr into develop
# Conflicts:
#	src/js/controls.js
#	src/sass/components/volume.scss
2020-01-14 07:46: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
a2498acf7c Manually merge PR #1629 2020-01-14 07:44:59 +00:00
Sam Potts
28a1098c0f Merge pull request #1629 from sumanbh/ios-show-volume
IOS - Fix being unable to unmute auto-played videos
2020-01-14 07:31:34 +00:00
Sam Potts
6ffaef35cf Manually merged PR #1607 2020-01-14 07:25:41 +00:00
Sam Potts
ff105ee203 Fix browser sync vs watch issues 2020-01-14 07:25:04 +00:00
Sam Potts
56c0d7bd4d Fix linting issues 2020-01-13 16:38:12 +00:00
Sam Potts
d00d31961e Merge pull request #1484 from MaxGiting/patch-1
Improve clarity
2020-01-13 16:32:43 +00:00
Sam Potts
b2d3ef5f38 Merge pull request #1505 from nskazki/detach-event-listeners-on-destroy
Detach event listeners on destroy
2020-01-13 16:31:17 +00:00
Sam Potts
b2ac730572 Merge pull request #1535 from skerbis/master
adds: REDAXO CMS Plyr AddOn
2020-01-13 16:29:41 +00:00
Sam Potts
3424d08d3a Merge pull request #1521 from ondratra/develop
typescript typings
2020-01-13 16:29:15 +00:00
Sam Potts
5dd9462bed Merge pull request #1516 from azizhk/toggle_return_promsie
Toggle also returns promise
2020-01-13 16:25:17 +00:00
Sam Potts
402eb2b761 Merge pull request #1552 from SoftCreatR/patch-2
Fix ads configuration
2020-01-13 16:24:25 +00:00
Sam Potts
63d74eee68 Merge pull request #1560 from 0xflotus/develop
Update readme.md
2020-01-13 16:23:39 +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
Sam Potts
0b240ae7d1 Fix linting issues 2020-01-13 16:20:02 +00:00
Sam Potts
6b0e5cd6f1 Merge branch 'master' into develop 2020-01-13 16:18:38 +00:00
Sam Potts
2463434d27 Merge branch 'develop' of github.com:sampotts/plyr into develop 2020-01-13 16:18:24 +00:00
Sam Potts
c09b9ac01c Manually port over change from PR #1616 2020-01-13 16:18:05 +00:00
Sam Potts
15a1cdde89 Merge pull request #1565 from lmislm/patch-1
Update defaults.js
2020-01-13 16:16:35 +00:00
Sam Potts
3a1da5ad36 Merge pull request #1525 from lunika/play-button-aria
️(controls) change play button aria-label value when its state change
2020-01-13 16:09:04 +00:00
Sam Potts
67cb324aed Merge pull request #1577 from avidnewmedia/issue-615
#615: updates to vimeo and youtube buffering state
2020-01-13 16:06:27 +00:00
Sam Potts
8736fa8a52 Manually port over change from PR #1625 2020-01-13 16:04:27 +00:00
Sam Potts
cb4dab4250 Merge pull request #1579 from taion/fix-listener-return
fix: Fix handling listener return value
2020-01-13 15:59:36 +00:00
Sam Potts
c56916a8e0 Merge pull request #1582 from bseib/1306-preserve-svg-symbol-viewbox
Preserve viewBox attribute in SVG sprite symbols
2020-01-13 15:58:27 +00:00
Sam Potts
93963d3915 Merge pull request #1630 from pjbaert/patch-1
Typo in readme
2020-01-13 15:56:27 +00:00
Sam Potts
e7c6f965b4 Merge branch 'master' into develop 2020-01-13 15:49:47 +00:00
Sam Potts
4f263ebb1a Added local server, package upgrades 2020-01-13 15:49:29 +00:00
Sam Potts
c15bdabf0c Update readme.md 2020-01-12 21:35:40 +00:00
Pieter-Jan Baert
80a077c50a Typo in readme 2019-12-06 16:00:48 +01:00
Suman Bhattarai
42d72c5303 fix being unable to unmute autoplayed video on IOS 2019-12-03 10:34:27 -07:00
Sam Potts
74e3990604 Merge pull request #1590 from ayunami2000/patch-1
typo
2019-10-23 13:01:56 +11:00
ayunami2000
e6e391ad6a typo
change s to z in "Customisable" (now "Customizable")
2019-10-14 15:59:01 -04:00
Broc Seib
12e5099c92 Preserve viewBox attribute in SVG sprite symbols
When generating the SVG sprite (using imagemin and svstore) the imagemin
step needs to NOT cleanup/remove the viewBox attributes from the
individual svg files.

fixes #1306
2019-10-01 17:34:49 -04:00
Jimmy Jia
72afffbc8d fix: Fix handling listener return value 2019-09-25 14:21:13 -04: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
dependabot[bot]
640bc99661 Bump lodash.merge from 4.6.1 to 4.6.2
Bumps [lodash.merge](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2019-09-22 15:26:12 +00: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
Baskerville*
7907652bc9 Update defaults.js
update defaults.i18n
2019-09-06 16:18:40 +08:00
0xflotus
dce665b792 Update readme.md 2019-09-01 18:39:37 +02:00
dependabot[bot]
32bf684b17 Bump mixin-deep from 1.3.1 to 1.3.2
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-28 22:38:57 +00:00
Sascha Greuel
e978bc8690 Fixed ads configuration 2019-08-27 19:28:51 +02:00
Thomas Skerbis
91503d3698 Update readme.md 2019-08-15 21:55:22 +02:00
Thomas Skerbis
1721f6e9e2 Update readme.md 2019-08-15 21:53:41 +02:00
Manuel Raynaud
c7b5aa9197 ️(controls) change play button aria-label value when its state change
The aria-label attribute set on all play buttons does not change
according the player state. When the video is playing, the aria-label
should change to pause otherwise screen reader will not detect that this
button now can be used to pause the video.
2019-08-07 18:00:02 +02:00
ondratra
800c8e0a17 typescript typings 2019-08-07 00:08:10 +02:00
Aziz Khambati
d771da9abf Toggle also returns promise 2019-07-30 18:19:10 +05:30
nskazki
b36b92b247 Detach event listeners on destroy
if "on" receives "this", it attaches "eventListeners" array to "this" and stores "{ element, type, callback }" hash in there.
later, during the destruction process, all the entries from this array will be processed by "unbindListeners" helper to detach all the event listeners.
2019-07-19 16:26:01 +03:00
Sam Potts
aa51719a55 Merge pull request #1497 from ffpetrovic/patch-1
Update index.html
2019-07-12 08:46:42 +10:00
Filip Petrovic
a28685536a Update index.html 2019-07-11 23:18:35 +02:00
Antony O'Neill
400fd77d0a Prevent default on settings icon click 2019-07-04 19:02:22 +01:00
MaxGiting
a2bf974058 Improve clarity 2019-07-01 15:09:29 +01:00
Sam Potts
7c442c9357 3.5.6 2019-06-21 12:35:47 +10:00
Sam Potts
e17e0a81dd Package upgrade 2019-06-21 12:35:22 +10:00
Sam Potts
2488299d7b Edge fix 2019-06-21 12:34:49 +10:00
Sam Potts
dfc09b8e04 v3.5.5 deployed 2019-06-21 00:24:28 +10:00
Sam Potts
6438baaddc Merge branch 'develop' 2019-06-21 00:19:51 +10:00
Sam Potts
8fc6c2ba52 File rename and clean up 2019-06-21 00:19:37 +10:00
Sam Potts
95092edc93 Merge pull request #1472 from sampotts/develop
v3.5.5
2019-06-21 00:12:10 +10:00
Sam Potts
c4b3e0672e Clean up 2019-06-21 00:10:57 +10:00
Sam Potts
e8e2b8ba39 Merge branch 'master' into develop
# Conflicts:
#	.eslintrc
#	demo/dist/demo.css
#	demo/dist/demo.js
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.css
#	dist/plyr.js
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.min.mjs
#	dist/plyr.min.mjs.map
#	dist/plyr.mjs
#	dist/plyr.polyfilled.js
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	dist/plyr.polyfilled.min.mjs
#	dist/plyr.polyfilled.min.mjs.map
#	dist/plyr.polyfilled.mjs
#	package.json
#	readme.md
#	src/js/listeners.js
#	yarn.lock
2019-06-20 23:56:19 +10:00
Sam Potts
2e40b91ec1 Styling tweaks for demo 2019-06-20 23:50:46 +10:00
Sam Potts
97d9228bed Aspect ratio tweaks 2019-06-03 20:13:16 +10:00
Sam Potts
0f14865d56 Add duration (commented out) in defaults 2019-06-03 20:12:43 +10:00
Sam Potts
c94ab2a39f Repaint clean up 2019-06-03 20:12:21 +10:00
Sam Potts
ab89e055de Demo tweaks 2019-06-03 20:11:31 +10:00
Sam Potts
ac6e3dba5a Fix for thumbnails in demo for audio 2019-06-03 00:28:09 +10:00
Sam Potts
d9d2c4a219 Demo tweaks 2019-06-03 00:26:08 +10:00
Sam Potts
1890a9378d Gulp tweaks 2019-06-02 23:16:45 +10:00
Sam Potts
ac88e6e190 Demo clean up 2019-06-02 23:16:29 +10:00
Sam Potts
15cbae8a19 Removed commented out code for Edge 2019-06-02 22:25:44 +10:00
Sam Potts
aaf096d96d Removed raven-js from dependencies 2019-06-02 22:25:17 +10:00
Sam Potts
93f5acbffd Fixed cite display 2019-06-02 22:25:00 +10:00
Sam Potts
9c717275d2 Packages for demo separated 2019-06-02 22:24:41 +10:00
Sam Potts
50a7c2fad6 Build 2019-06-01 20:01:24 +10:00
Sam Potts
95be6e721b Fixed merge 2019-06-01 20:01:19 +10:00
Sam Potts
dc2e012cc9 Clean up 2019-06-01 20:01:09 +10:00
Sam Potts
12c6282d14 Merge branch 'develop' into css-variables
# Conflicts:
#	.eslintrc
#	demo/dist/demo.css
#	demo/dist/demo.js
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.css
#	dist/plyr.js
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.min.mjs
#	dist/plyr.min.mjs.map
#	dist/plyr.mjs
#	dist/plyr.polyfilled.js
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	dist/plyr.polyfilled.min.mjs
#	dist/plyr.polyfilled.min.mjs.map
#	dist/plyr.polyfilled.mjs
#	gulpfile.js
#	package.json
2019-06-01 19:55:14 +10:00
Sam Potts
0249772f01 Clean up 2019-06-01 19:50:29 +10:00
Sam Potts
5d699d5f47 Merge branch 'develop' of github.com:sampotts/plyr into develop 2019-06-01 19:29:21 +10:00
Sam Potts
34d79a5443 Merge pull request #1453 from aFarkas/develop
youtube multiple small issues
2019-06-01 18:46:56 +10:00
Sam Potts
1e761e237a Merge pull request #1458 from Jason-Cooke/patch-1
docs: fix typo
2019-06-01 18:46:14 +10:00
Sam Potts
36ad132c82 Edge fix 2019-06-01 18:45:12 +10:00
Sam Potts
c9055f391b Linting changes 2019-06-01 18:45:07 +10:00
Jason Cooke
99c95363b4 docs: fix typo 2019-06-01 11:13:44 +12:00
Sam Potts
c90526bf07 Create FUNDING.yml 2019-05-27 17:17:05 +10:00
Alexander Farkas
97a6e72e10 fix youtube embed + handle early destroy 2019-05-24 16:55:45 +02:00
Alexander Farkas
f100caba81 fix youtube embed + handle early destroy 2019-05-24 16:53:58 +02:00
Sam Potts
80aa6ffe43 Linting changes 2019-04-30 23:44:05 +10:00
Sam Potts
0694e58650 v3.5.4 2019-04-25 12:14:48 +10:00
Sam Potts
e644eeb5b6 Merge pull request #1423 from sampotts/develop
v3.5.4
2019-04-25 12:11:06 +10:00
Sam Potts
5ddd9e02de Fix for the menu in the shadow DOM 2019-04-25 12:09:46 +10:00
Sam Potts
a064f0b4fd Merge branch 'develop' of github.com:sampotts/plyr into develop 2019-04-25 12:04:38 +10:00
Sam Potts
b9dbcc30fa Eslint config rename 2019-04-25 12:03:42 +10:00
Sam Potts
7ab34c7d2e Changelog 2019-04-25 12:03:32 +10:00
Sam Potts
17caa3c57b Fix merging class 2019-04-25 12:03:24 +10:00
Sam Potts
2e6361898b Package updates 2019-04-25 12:03:13 +10:00
Sam Potts
a1b2c0419f Ads improvements for volume and race condition fix 2019-04-25 12:03:04 +10:00
Sam Potts
9b81e776fb Styling for control changes 2019-04-25 12:02:48 +10:00
Sam Potts
7a4a7dece8 Ratio improvements 2019-04-25 12:02:37 +10:00
Sam Potts
f0d3e8c3b9 Fix for className being wiped out 2019-04-25 12:01:52 +10:00
Sam Potts
ad68d9484f Clean up and API change 2019-04-25 12:01:30 +10:00
Sam Potts
c3fd822857 Notes on autoplay support 2019-04-25 12:01:15 +10:00
Sam Potts
e147f3a754 Formatting 2019-04-25 12:01:00 +10:00
Sam Potts
b694e7d3ab Use polyfill.io v3 2019-04-22 12:28:26 +10:00
Sam Potts
b2fff4c33f Increase speed limits 2019-04-15 22:08:09 +10:00
Sam Potts
9c1060d9b0 Merge pull request #1416 from emielbeinema/fix_webcomponents
Make menu work in WebComponent
2019-04-15 21:41:23 +10:00
Emiel Beinema
a91652287b Don't close menu on click in menu in webcomponent 2019-04-15 12:17:10 +02:00
Emiel Beinema
2cf44c236d Use querySelector on container for showMenuPanel 2019-04-15 12:16:48 +02:00
Sam Potts
243db9eda3 Fix issue with empty controls and preview thumbs 2019-04-13 12:56:15 +10:00
Sam Potts
b675ba1f35 Fix issue with setGutter call 2019-04-13 12:55:48 +10:00
Sam Potts
e9367ee85e Fix setting initial speed (fixes #1408) 2019-04-12 20:18:17 +10:00
Sam Potts
d9b7928ce6 Merge branch 'master' into develop 2019-04-12 19:00:23 +10:00
Sam Potts
cdacae6697 Set download URL via setter 2019-04-12 19:00:17 +10:00
Sam Potts
2bd08cdc28 3.5.3 2019-04-12 18:44:05 +10:00
Sam Potts
5fefabe3bd Merge pull request #1410 from sampotts/develop
v3.5.3
2019-04-12 18:39:14 +10:00
Sam Potts
e281078441 Bump version 2019-04-12 18:38:46 +10:00
Sam Potts
9bb75f6f52 Changelog 2019-04-12 18:37:11 +10:00
Sam Potts
3b7a24456d Package upgrades 2019-04-12 18:36:55 +10:00
Sam Potts
c885d59270 Moved all video styles together 2019-04-12 12:43:45 +10:00
Sam Potts
9f30d54963 Merge branch 'master' into develop
# Conflicts:
#	readme.md
2019-04-12 12:40:12 +10:00
Sam Potts
b247093495 Aspect ratio improvements (fixes #1042, fixes #1366) 2019-04-12 12:19:48 +10:00
Sam Potts
9ca7b861a9 Autoplay tweak for HTML5 2019-04-12 12:14:12 +10:00
Sam Potts
2eccf0dd05 Fix YouTube autoplay (fixes #1185) 2019-04-12 12:13:46 +10:00
Sam Potts
566b957e65 Merge pull request #1362 from doublex/master
#46 - two patches from 'jamesoflol'
2019-04-11 21:20:23 +10:00
Sam Potts
a8456f4ca7 Merge pull request #1404 from taion/clear-timeouts
fix: Properly clear all timeouts on destroy
2019-04-11 21:18:52 +10:00
Sam Potts
0f3098040d Merge pull request #1407 from freezer278/http-youtube-fix
fixed setting youtube host for non-https case
2019-04-11 21:18:15 +10:00
Sam Potts
996075decc More work on variable usage 2019-04-11 20:50:20 +10:00
Vladimir Morozov
21539be3f2 code cleanup 2019-04-04 09:32:38 +03:00
Vladimir Morozov
c22f5c4b39 code cleanup 2019-04-04 08:56:46 +03:00
Vladimir Morozov
f4b47a9275 fixed setting youtube host for non-https case 2019-04-04 08:51:20 +03:00
Jimmy Jia
266b70d9d0 fix: Properly clear all timeouts on destroy 2019-04-01 14:42:51 -04:00
Sam Potts
6e68ad6d15 Update readme.md 2019-03-26 21:43:59 +11:00
Sam Potts
848e798809 Fix merge 2019-03-16 12:15:20 +11:00
Sam Potts
35f7ee9c59 Merge branch 'develop' into css-variables
# Conflicts:
#	demo/dist/demo.css
#	demo/index.html
#	dist/plyr.css
#	gulpfile.js
#	package.json
#	yarn.lock
2019-03-16 12:14:20 +11:00
Sam Potts
c202551e6d Merge branch 'develop' of github.com:sampotts/plyr into develop 2019-03-16 11:58:12 +11:00
Sam Potts
5b7a025d26 Housekeeping 2019-03-16 11:57:15 +11:00
Sam Potts
26bcf83960 Merge pull request #1376 from ar31an/patch-1
Update poster src
2019-03-07 18:59:58 +11:00
Arslan Javed
e4acff4f8d Update poster src 2019-03-07 12:54:07 +05:00
Sam Potts
568ddf2390 Merge pull request #1375 from sampotts/master
Merge back
2019-03-07 18:30:05 +11:00
Your Name
ce91945544 Preview seek: optional hours and ms in VTT parser 2019-02-27 15:45:24 +01:00
Your Name
11fed8d1b5 Preview seek: fix: allow absolute thumbnail paths 2019-02-27 15:43:36 +01:00
Sam Potts
4c3bf25b8a Fixed issue where the preview thumbnail was present while scrubbing 2019-02-24 12:10:20 +11:00
Sam Potts
215fc3677a v3.5.1 2019-02-23 13:14:01 +11:00
Sam Potts
4d3b6b882e Merge pull request #1356 from sampotts/develop
v3.5.1
2019-02-23 13:10:20 +11:00
Sam Potts
83eda174af v3.5.1 2019-02-23 13:09:26 +11:00
Sam Potts
1c29cb890e Merge branch 'master' into develop
# Conflicts:
#	gulpfile.js
2019-02-23 13:08:32 +11:00
Sam Potts
438ebe5013 Jsdoc updates 2019-02-23 13:07:35 +11:00
Sam Potts
4335a2a0d1 Update .npmignore 2019-02-23 13:07:26 +11:00
Sam Potts
825fd292ae Fix build 2019-02-23 13:07:17 +11:00
Sam Potts
80990c98c8 Deployed v3.5.0 2019-02-19 01:25:39 +11:00
Sam Potts
44d3a17870 Fix links 2019-02-19 01:17:08 +11:00
Sam Potts
54110f8358 Update build process 2019-02-19 01:05:59 +11:00
Sam Potts
522135adaf Merge branch 'develop' of github.com:sampotts/plyr into develop 2019-02-19 00:19:40 +11:00
Sam Potts
153b8dc6bb Added RangeTouch, updated Shr lib in demo 2019-02-19 00:19:25 +11:00
Sam Potts
d1bc70ea06 Merge pull request #1327 from robertkraig/develop
Update <progress> bar role=progressbar
2019-02-19 00:11:05 +11:00
Sam Potts
df61e5cdd2 Tweak to readme 2019-02-15 00:03:30 +11:00
Sam Potts
bf9a557868 Plenty of emojis 2019-02-15 00:02:42 +11:00
Sam Potts
537ffce4e0 Docs 2019-02-14 23:44:32 +11:00
Sam Potts
b38a481b20 Merge pull request #1343 from electerious/patch-1
Remove NodeList example
2019-02-14 23:29:49 +11:00
Tobias Reich
7e1d461882 Removed setting up multiple players
This example is already covered in the readme.
2019-02-14 13:29:11 +01:00
Tobias Reich
c634d3696e Remove NodeList example
I've removed the NodeList example because it's confusing. Only the first element of a NodeList will be used and this is usually not what you want. I've instead replaced it with a `querySelector` and map example. It's related to: https://github.com/sampotts/plyr/issues/801

I know that there was a note, pointing out that the first element will be used, but be honest: Everybody is just scanning the examples for code and doing copy paste :D
2019-02-14 13:16:10 +01:00
Sam Potts
0189e90fce Fix deployment 2019-02-12 13:55:45 +11:00
Sam Potts
dbd2136bac Fix for cue points missing 2019-02-07 23:45:19 +11:00
Sam Potts
eb628c8e4f Ads bug fixes 2019-02-01 00:24:48 +11:00
Robert Kraig
38cb20706f Merge pull request #1 from robertkraig/defect/update-progress-element-axe-error
Updating accessibility attribute to progressbar
2019-01-30 12:06:37 -08:00
Robert Kraig
c730866efe Updating accessibility attribute to progressbar
aXe complains this is a non-compatible attribute to be set as `role="presentation"`
2019-01-30 12:05:12 -08:00
Sam Potts
d0e3c7c6d0 Merge branch 'develop' into beta 2019-01-29 21:37:06 +11:00
Sam Potts
d9daf2c618 Fix gulp 2019-01-29 21:36:47 +11:00
Sam Potts
b1da599b5d Merge branch 'develop' into beta 2019-01-29 21:34:40 +11:00
Sam Potts
b798368ba6 Update version 2019-01-29 21:33:47 +11:00
Sam Potts
fa4868a26d Fix listeners for preview thumbs when changing source 2019-01-29 21:33:16 +11:00
Sam Potts
6bf6c3f0f4 Paths 2019-01-27 01:15:54 +11:00
Sam Potts
32e8cce527 Fullscreen fix 2019-01-27 01:08:44 +11:00
Sam Potts
c125c1a2c0 Added ES builds 2019-01-27 01:08:39 +11:00
Sam Potts
d311722cd0 Formatting 2019-01-26 22:47:23 +11:00
Sam Potts
1d51b28701 Tweaks 2019-01-26 22:45:47 +11:00
Sam Potts
dc54eba8f8 Merge pull request #1319 from fanmio/issues/1316-allow-to-customize-vimeo-url-params
Adds options for vimeo plugin #1316
2019-01-26 17:20:18 +11:00
Sam Potts
a84fc396e8 Merge branch 'develop' into issues/1316-allow-to-customize-vimeo-url-params 2019-01-26 17:19:58 +11:00
Sam Potts
8b57104f83 Docs for preview thumbs 2019-01-26 17:17:27 +11:00
Sam Potts
ff066f0c2a Typo 2019-01-26 16:54:26 +11:00
Sam Potts
a64a84f2fe Fix merge 2019-01-26 16:54:04 +11:00
Sam Potts
1f0a74f3d5 Changelog typo 2019-01-26 16:52:47 +11:00
Sam Potts
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
Sam Potts
464acd1a36 Package upgrades 2019-01-26 16:45:30 +11:00
Sam Potts
fe536252aa Version bump 2019-01-26 16:42:58 +11:00
Sam Potts
52be5ae889 Built files 2019-01-26 16:35:42 +11:00
Sam Potts
24319e5c31 Clean up 2019-01-26 16:35:34 +11:00
Sam Potts
c44351507f Plugin tweaks for ads and previews 2019-01-26 16:31: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
c577eb01ce Style tweaks for preview plugin 2019-01-22 16:24:46 +11:00
Sam Potts
263e88f6b3 Comments 2019-01-21 00:39:28 +11:00
Sam Potts
4ab8a54a11 Preview design tweaks 2019-01-21 00:32:20 +11:00
Sam Potts
ad72ebd4bb Fix analytics 2019-01-17 18:50:26 +11:00
Sam Potts
e40c63b9e7 Fix GA 2019-01-17 12:08:25 +11:00
Sam Potts
f927d26ce7 v3.4.8
- Calling customized controls function with proper arguments (thanks @a60814billy)
2019-01-17 11:37:19 +11:00
Sam Potts
fe24c73c11 Merge branch 'develop' of github.com:sampotts/plyr into develop 2019-01-14 00:34:12 +11:00
Sam Potts
2475b2a82b Gulp fixes 2019-01-14 00:34:07 +11:00
Sam Potts
4ccc629488 Package upgrades 2019-01-14 00:34:00 +11:00
Sam Potts
6782737009 Fullscreen fixes 2019-01-14 00:33:48 +11:00
Sam Potts
4d3e188401 Merge branch 'develop' of https://github.com/sampotts/plyr into develop 2019-01-08 23:34:59 +11:00
Sam Potts
cd9cbfbd1e Enable thumbs in demo 2019-01-08 23:34:44 +11:00
Sam Potts
7dd7c13065 Linting etc 2019-01-08 23:34:28 +11:00
Sam Potts
6be125db87 Merge pull request #1292 from omarkhatibco/master
Support Youtube NoCookie mode
2019-01-06 14:10:25 +11:00
Sam Potts
1c79ce70c9 Update youtube.js 2019-01-06 14:09:49 +11:00
Sam Potts
db2997ef21 Merge branch 'develop' into master 2019-01-06 14:08:46 +11:00
Sam Potts
10c88f6e49 Merge pull request #1295 from taion/Math.trunc
fix: Use Math.trunc instead of parseInt
2019-01-06 14:07:07 +11:00
Jimmy Jia
6d9d315ca7 fix: Use Math.trunc instead of parseInt 2018-12-20 13:06:29 -05:00
Sam Potts
973527cb84 Merge pull request #1294 from smnbbrv/patch-1
Add Angular plugin reference
2018-12-19 08:00:49 +07:00
Simon Bobrov
0ff47fe3ea Add Angular plugin reference 2018-12-18 17:27:07 +01:00
Sam Potts
5fdc0aae66 Merge pull request #1253 from jamesoflol/preview-thumbs
Preview seek/scrubbing thumbnails
2018-12-15 10:43:36 +07:00
James
d97257a5a9 Preview seek: Edge+IE11 fixes
- Fixed bug: Edge seek errors: Replaced array spread with Array.from()
- Fixed IE11 bug: seek time was offset to the left. Required an extra container div to facilitate this
2018-12-15 11:32:50 +11:00
James
279f051905 Preview seek: image preloading + tweaks/fixes
- Preloads neighbouring images after showing current image
- Re-fixed bug: if you mousedown but don't move mouse, it shows a stale image in the scrubbing container
- Fixed bug: mobile device correctly detect touch
2018-12-14 12:50:29 +11:00
Omar Khatib
88ffd0f138 remove comment 2018-12-13 17:31:15 +01:00
Omar Khatib
11618353ea support Youtube noCookie Mode 2018-12-13 17:30:10 +01:00
James
e948bfd585 Preview seek: jpeg sprites + much more
- Allow jpeg sprites - much snappier and more accurate
- Fixed bug: right clicking the seek bar sticks on mousedown
- Fixed bug: moving the mouse really quickly results in not updating the thumb
- Fixed bug: if you mousedown but don't move mouse, it shows a stale image in the scrubbing container
- Fixed bug: very first image shows as 0px
- Fixed bug: stretches images when video isn't same aspect as player
2018-12-13 20:39:39 +11:00
Sam Potts
bdd513635f Work on outline/focus styles 2018-12-08 17:06:20 +11:00
Sam Potts
2bbebd811b Merge pull request #1267 from gurupras/issue-858
Ensure custom handlers are called on container clicks that trigger togglePlay or restart
2018-12-08 16:58:51 +11:00
Guru Prasad Srinivasa
3fb85664d2 Updated restart logic to call play instead of togglePlay 2018-12-08 00:57:47 -05:00
Sam Potts
b9ea9fba9a Merge branch 'develop' of https://github.com/sampotts/plyr into develop 2018-12-08 16:50:48 +11:00
Sam Potts
a0303969c2 Fix for error when mime type not specified (fixes #1274) 2018-12-08 16:50:44 +11:00
Sam Potts
fa78df3749 Merge pull request #1273 from samuelgozi/patch-1
Fix buffer progress bar animation on WebKit browsers
2018-12-08 16:27:39 +11:00
Samuel Elgozi
df5b7a008d Fix: buffer progress bar transition on webkit
The transition was set on the wrong pseudo element for WebKit browsers.
2018-11-22 19:35:01 +02: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
e8d2f23b81 Merge pull request #1254 from a60814billy/fix/custom-controls-calling-argument
Calling customized controls function with proper arguments
2018-11-12 21:32:31 +11:00
Raccoon
0e181133c1 Calling customized controls function with proper arguments 2018-11-12 15:37:46 +08:00
James
8f27611911 Preview seek/scrubbing thumbnails 2018-11-12 15:55:26 +11:00
Sam Potts
b7b2e3c0aa Merge branch 'develop' into css-variables
# Conflicts:
#	demo/dist/demo.css
#	demo/dist/demo.js
#	demo/dist/demo.js.map
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.css
#	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
#	gulpfile.js
#	src/sass/components/captions.scss
#	src/sass/components/control.scss
2018-11-11 11:05:09 +11:00
Sam Potts
2c8a337f26 v3.4.7
-   Fix for Vimeo fullscreen with non native aspect ratios (fixes #854)
2018-11-08 23:34:10 +11:00
Sam Potts
c24e52d97d Package updates 2018-11-08 23:29:54 +11:00
Sam Potts
574f40949c Merge branch 'master' into develop 2018-11-08 23:19:57 +11:00
Sam Potts
cf3848fbd5 Merge branch 'develop' of github.com:sampotts/plyr into develop 2018-11-08 23:19:26 +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
d6f20e2756 Package upgrades 2018-11-08 23:18:23 +11:00
Sam Potts
e2fc20ca76 Styling tweaks 2018-11-08 23:18:04 +11:00
Sam Potts
37c3f7109d Additional listener for checking for audio tracks 2018-11-08 23:17:44 +11:00
Sam Potts
99d5211a33 Merge pull request #1247 from danielcgold/patch-1
[Edit README] Halfhalftravel uses Plyr!
2018-11-06 10:17:55 +11:00
Dan Gold
b97f143195 Halfhalftravel uses Plyr!
https://www.halfhalftravel.com/events/medellin-photo-walk.html
https://www.halfhalftravel.com/travel-guides/how-to-travel-to-santa-fe-de-antioquia-colombia.html
2018-11-05 10:57:23 -05:00
Sam Potts
e8da4326b6 Prevent scroll on focus 2018-11-03 21:17:46 +11:00
Sam Potts
67f908aa8d Load media after UI is built 2018-11-03 21:17:32 +11:00
Sam Potts
65eb5c1b8b Fix support check 2018-11-03 21:16:40 +11:00
Sam Potts
7d484c6e09 Merge pull request #1232 from tocsinde/patch-1
Readme: Add missing annotation to PIP support
2018-10-26 08:37:33 +11:00
Stephan Fischer
8252e13eb9 Readme: Add missing annotation to PIP support
PIP only works on HTML videos, so I added the number of the (already existing) annotation.
2018-10-25 23:35:20 +02:00
Sam Potts
1a9b860e68 v3.4.6
-   Added picture-in-picture support for Chrome 70+
-   Fixed issue with versioning the SVG sprite in the gulp build script
2018-10-25 09:44:40 +11:00
Sam Potts
cede7d0f35 Fix gulp build 2018-10-25 09:21:37 +11:00
Sam Potts
fe26d383f1 Added support for picture-in-picture in Chrome 2018-10-25 09:17:15 +11:00
Sam Potts
df4bc268dc Merge branch 'master' into develop 2018-10-25 00:14:14 +11:00
Sam Potts
e49da6c13f v3.4.5 2018-10-24 23:04:18 +11:00
Sam Potts
67b7262764 Revert PR #1211 2018-10-24 23:00:54 +11:00
Sam Potts
88528ef979 Merge pull request #1197 from TechGuard/fix-html5-quality-settings
Fix html5 quality settings
2018-10-24 22:39:34 +11:00
Sam Potts
b6175b1ca9 Merge branch 'develop' into fix-html5-quality-settings 2018-10-24 22:39:10 +11:00
Sam Potts
aa20ebaa9c Merge pull request #1211 from melbahja/develop
duration after changing video quality
2018-10-24 22:37:49 +11:00
Sam Potts
779e45c11b Merge branch 'master' into develop 2018-10-24 22:32:55 +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
Sam Potts
ebaded66b4 Package updates 2018-10-24 22:31:16 +11:00
Sam Potts
c232eb2478 Fix SVG issue for older browsers (fixes #1191) 2018-10-24 22:30:41 +11:00
Sam Potts
7559cc6897 Merge pull request #1226 from jamesoflol/dont-hide-mobile-controls-immediately
Prevent immediate hiding of controls on mobile
2018-10-23 11:09:11 +11:00
James
69d0d6d7ee Prevent immediate hiding of controls on mobile 2018-10-23 10:08:46 +11:00
Sam Potts
3e9336b15d Merge pull request #1217 from epalmans/master
typo
2018-10-17 16:55:49 +11:00
e_palm
5c78ecc15d typo 2018-10-16 14:48:10 +02:00
Mohamed Elbahja
06db3f702d Update plyr.js 2018-10-13 13:23:42 +01:00
Mohamed Elbahja
a2a82a96a6 fix: continue with the current duration after changing video quality 2018-10-13 12:59:59 +01:00
Robin van Nunen
a86bbae851 Only save quality setting when it's updated by the user. Fixes bug in html5 player where it would override the settings if the current video does not support the given quality. 2018-09-29 21:23:10 +02:00
Sam Potts
fac134dd95 Added download button 2018-09-28 00:42:42 +10:00
Sam Potts
515ae32160 Moved hardcoded resources to i18n 2018-09-28 00:30:27 +10:00
Sam Potts
df8f040795 Remove link styles from anchor controls 2018-09-28 00:29:59 +10:00
Sam Potts
64a23992f0 SVG cleanup 2018-09-28 00:29:42 +10:00
Sam Potts
f5baff6e6b Merge pull request #1192 from jamesoflol/more-mobile-touch-issues
Don't hide controls on focusout event
2018-09-27 21:33:37 +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
de47071256 v3.4.4
-   Fixed issue with double binding for `click` and `touchstart` for `clickToPlay` option
-   Improved "faux" fullscreen on iPhone X/XS phones with notch
-   Babel 7 upgrade (which reduced the polyfilled build by ~10kb!)
2018-09-25 23:36:50 +10:00
Sam Potts
87072cb690 Clean up 2018-09-25 23:29:43 +10:00
Sam Potts
d9565e9250 Improved fullscreen on iPhone X etc 2018-09-25 23:29:32 +10:00
Sam Potts
f80b568e67 Reverted large pause button 2018-09-25 23:07:48 +10:00
Sam Potts
7fed689f9a Yarn lock file 2018-09-25 22:25:46 +10:00
Sam Potts
3f48df8f10 Remove babel-polyfill in favour of core-js 2018-09-25 22:25:35 +10:00
Sam Potts
cc55092ca6 Babel upgrades 2018-09-25 22:25:04 +10:00
Sam Potts
3331d9d01d Package upgrades 2018-09-25 20:46:58 +10:00
Sam Potts
62d80e6b76 Fix touch vs click issue 2018-09-25 20:43:09 +10:00
Sam Potts
7dc4d9cd22 v3.4.3 2018-08-14 12:16:34 +10:00
Sam Potts
8fb8ae1260 Merge pull request #1163 from sampotts/develop
Fix bug with nodeList for play buttons
2018-08-14 12:14:58 +10:00
Sam Potts
90304369f4 Fix watch 2018-08-14 12:13:16 +10:00
Sam Potts
922456c46c Fix for nodeList as buttons 2018-08-14 12:13:00 +10:00
Sam Potts
eaeccd66ae v3.4.2 2018-08-14 11:17:33 +10:00
Sam Potts
7a43649c13 Fix play/pause button state 2018-08-14 11:17:27 +10:00
Sam Potts
525bbf313e v3.4.1 2018-08-14 09:18:09 +10:00
Sam Potts
cfaebe9bf2 Fix for controls missing (fixes #1161) 2018-08-14 09:17:58 +10:00
Sam Potts
b57b7b2153 v3.4.0
-   Accessibility improvements (see #905)
-   Improvements to the way the controls work on iOS
-   Demo code clean up
-   YouTube quality selection removed due to their poor support for it. As a result, the `qualityrequested` event has been removed
-   Controls spacing improvements
-   Fix for pressed property missing with custom controls (Fixes #1062)
-   Fix #1153: Captions language fallback (thanks @friday)
-   Fix for setting pressed property of undefined (Fixes #1102)
2018-08-14 00:02:01 +10:00
Sam Potts
48bf368316 Merge pull request #1160 from sampotts/develop
v3.4.0
2018-08-14 00:00:24 +10:00
Sam Potts
8f94ce86a0 Merge branch 'master' into develop
# Conflicts:
#	readme.md
2018-08-13 23:59:19 +10:00
Sam Potts
10a9cf08f1 Changelog 2018-08-13 23:57:46 +10:00
Sam Potts
286d0d1794 Fix for pressed property missing with custom controls (Fixes #1062) 2018-08-13 23:52:10 +10:00
Sam Potts
95f6fa2731 Fix for setting pressed property of undefined (Fixes #1102) 2018-08-13 23:46:58 +10:00
Sam Potts
1aeef81288 Controls spacing improvements 2018-08-13 23:43:22 +10:00
Sam Potts
211ad6c8f5 Removed YouTube quality controls 2018-08-13 23:43:08 +10:00
Sam Potts
468b20d227 Moved mute button inside plyr__volume 2018-08-13 23:42:12 +10:00
Sam Potts
f6bc42c2bc Fix IE11 issue in demo 2018-08-13 23:03:08 +10:00
Sam Potts
2c01b8ba76 Yarn lock file 2018-08-13 23:02:31 +10:00
Sam Potts
4e1df8677f Fix tooltip alignment 2018-08-13 23:02:14 +10:00
Sam Potts
6953a12e2a Set background color for video 2018-08-13 23:01:56 +10:00
Sam Potts
1d0db89194 Update wrong reference in docs 2018-08-13 23:01:38 +10:00
Sam Potts
297f297d18 Moved i18n to utils 2018-08-13 21:39:16 +10:00
Sam Potts
059205c378 Package updates 2018-08-13 21:39:02 +10:00
Sam Potts
f94e53ffb1 Merge pull request #1158 from friday/1153
Fix #1153: Captions language fallback
2018-08-13 09:24:25 +10:00
Albin Larsson
a4f1fdec5d Fix #1153: Captions language fallback 2018-08-12 20:12:22 +02:00
Sam Potts
75374eb154 Merge pull request #1147 from jamesoflol/fix-ios-fullscreen-while-stopped
Remove 'video is playing' requirement for iosNative fullscreen
2018-08-05 22:46:58 +10:00
Sam Potts
3ad118c026 3.4.0-beta.2 2018-08-05 22:43:35 +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
4ea458e1a3 Rounded aria-valuetext to 1 decimal place 2018-08-05 21:48:42 +10:00
Sam Potts
aacb172017 Removed aria-labelled-by 2018-08-05 21:48:21 +10:00
James
dbf768b1bd Remove 'video is playing' requirement for iosNative fullscreen 2018-08-03 09:58:51 +10:00
Sam Potts
b96fcfc8ac v3.4.0-beta.1 2018-08-02 00:55:48 +10:00
Sam Potts
18b4d26bee Merge pull request #1142 from sampotts/a11y-improvements
A11y improvements
2018-08-02 00:47:57 +10:00
Sam Potts
7f4b74e2d4 Fix for hover over iframed players not showing controls 2018-08-02 00:47:03 +10:00
Sam Potts
a8f8486cf4 Merge pull request #1143 from mhluska/patch-1
Fix Readme typo (Patron -> Patreon)
2018-08-01 15:09:00 +10:00
Maros Hluska
a343e58e53 Fix Readme typo (Patron -> Patreon) 2018-08-01 12:08:02 +07:00
Sam Potts
0892d69ba2 Handle race condition for ads lib loading after source change 2018-08-01 13:56:49 +10:00
Sam Potts
ba511b51c7 Box shadow fix for range track 2018-08-01 13:00:51 +10:00
Sam Potts
e090581913 Ads on dev or prod only 2018-08-01 11:49:42 +10:00
Sam Potts
aaa56caa9c Only focus button if menu wasn’t hidden already 2018-08-01 01:38:57 +10:00
Sam Potts
c8db1e55dd Escape closes menu 2018-08-01 01:26:15 +10:00
Sam Potts
58079393e6 Build 2018-08-01 00:58:27 +10:00
Sam Potts
0b44f2d897 Demo config 2018-08-01 00:57:45 +10:00
Sam Potts
2371619486 Linting 2018-08-01 00:56:44 +10:00
Sam Potts
13a54b5dbe Merge branch 'develop' into a11y-improvements
# Conflicts:
#	src/js/controls.js
2018-08-01 00:46:26 +10:00
Sam Potts
fa0861ff2e Merge pull request #1141 from friday/1137
Improve captions positioning consistency
2018-08-01 00:41:48 +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
Albin Larsson
9488de30e5 Fix #1137: Improve captions positioning consistency 2018-07-31 16:26:34 +02:00
Sam Potts
e3dfd16096 Merge pull request #1139 from friday/controls-input
Controls input fixes
2018-07-31 09:08:08 +10:00
Albin Larsson
c230ccce86 Update controls.md docs 2018-07-31 00:44:07 +02:00
Albin Larsson
db22a8e9c4 Improve handling of the 'controls' argument 2018-07-31 00:43:56 +02:00
Sam Potts
3a3358e2b4 Make iOS range fix more universal 2018-07-30 23:29:14 +10:00
Sam Potts
248005e8e0 Fix merge 2018-07-30 23:29:02 +10:00
Sam Potts
dae272ef66 Merge branch 'develop' into a11y-improvements
# Conflicts:
#	demo/dist/demo.css
#	dist/plyr.css
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	package.json
#	src/js/plyr.js
2018-07-30 23:09:12 +10:00
Sam Potts
2679c5898e v3.2.23 2018-07-30 22:55:34 +10:00
Sam Potts
efb7401e6d Merge pull request #1136 from sampotts/develop
v3.3.23
2018-07-30 22:54:03 +10:00
Sam Potts
60a0f0c979 Missed reference 2018-07-30 22:53:42 +10:00
Sam Potts
5d168d0e14 v3.3.23 2018-07-30 22:53:09 +10:00
Sam Potts
f964e34d8c Merge pull request #1134 from mjfwebb/hide-empty-controls
Hide empty controls
2018-07-30 22:47:10 +10:00
Sam Potts
021ba0b8e9 Update controls.scss 2018-07-30 22:46:48 +10:00
Sam Potts
96d371546c Merge pull request #1135 from sampotts/master
Merge back
2018-07-30 22:45:59 +10:00
Sam Potts
e1780a4df0 Fix for redraw issue 2018-07-30 22:44:19 +10:00
Albin Larsson
e5e169a1e2 Don't move caption up when "showing" the lower controls when the controls are empty 2018-07-30 01:02:13 +02:00
mjfwebb
5eda498516 If the plyr__controls is empty it is still showing the transition causing captions to be pushed up when hovering over where the controls would be. This change hides the plyr__controls div when it is empty. 2018-07-29 22:02:16 +02:00
Sam Potts
599b33e55f Click to play fix, poster fix, iOS controls fixes 2018-07-30 01:13:12 +10:00
Sam Potts
3a8332bdb3 Fix for webkit redrawing issue 2018-07-29 12:32:26 +10:00
Sam Potts
44b5d9f6b9 Merge pull request #1131 from friday/1108
Make sure youtube.onReady doesn't run twice
2018-07-29 00:19:37 +10:00
Albin Larsson
24deff0e2d Fix #1108: Make sure youtube.onReady doesn't run twice 2018-07-28 04:04:57 +02:00
Sam Potts
0933b48c2a Merge pull request #1113 from friday/issue-templates
Use GitHub's new issue template prompt
2018-07-27 13:12:49 +10:00
Sam Potts
71578e07ec Merge pull request #1120 from didacte/add-missing-youtube-hl-param
Add support for YouTube's hl param
2018-07-26 00:03:10 +10:00
Léo Renaud-Allaire
671325dd17 Add support for YouTube's hl param 2018-07-24 16:36:25 -04:00
Sam Potts
53a3d06103 Merge branch 'develop' into a11y-improvements
# Conflicts:
#	demo/dist/demo.css
#	demo/dist/demo.js.map
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.css
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	package.json
#	yarn.lock
2018-07-24 09:38:26 +10:00
Albin Larsson
ad1989e45e New issue templates (with prompt) 2018-07-23 06:21:46 +02:00
Albin Larsson
f9ac98bc6d Lowercase contributing.md (like the other docs) 2018-07-23 06:21:25 +02:00
Sam Potts
544ab0086b Logic fix 2018-07-19 10:02:41 +10:00
Sam Potts
13bf80d372 Deployment improvements (auto purge cache etc) 2018-07-19 09:47:11 +10:00
Sam Potts
e2fb922d73 v3.3.22 2018-07-18 21:47:46 +10:00
Sam Potts
a6cc85c437 Merge branch 'develop' 2018-07-18 21:46:43 +10:00
Sam Potts
d061be5d2b Changelog 2018-07-18 21:46:23 +10:00
Sam Potts
dc2feedd79 Merge pull request #1103 from sampotts/develop
v3.3.12
2018-07-18 21:45:31 +10:00
Sam Potts
f8e4ba36e5 Merge branch 'master' into develop
# Conflicts:
#	changelog.md
#	dist/plyr.js.map
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js.map
#	package.json
2018-07-18 21:44:39 +10:00
Sam Potts
f3d5389587 3.3.17 2018-07-18 21:41:46 +10:00
Sam Potts
d9ffb10b93 Merge pull request #1080 from gurupras/html5-quality-source-setter-readme
Updated README.md to show how to add quality options to HTML5 videos
2018-07-18 15:32:46 +10:00
Sam Potts
e63ad7c74b Keyboard and focus improvements 2018-07-15 19:23:28 +10:00
Sam Potts
1186377b25 Merge pull request #1095 from friday/stickler
Add stickler config
2018-07-11 23:32:49 +10:00
Sam Potts
8616895e57 Merge pull request #1094 from friday/remark
Verify internal documentation links with "remark"
2018-07-11 09:17:24 +10:00
Albin Larsson
2cf5a22c85 Fix internal link for the source setter 2018-07-10 23:56:00 +02:00
Albin Larsson
763eb2df80 Add 'remark' and plugin to verify internal links in markdown 2018-07-10 23:56:00 +02:00
Albin Larsson
8bbf66a0fb Add stickler config 2018-07-10 20:53:09 +02:00
Sam Potts
676b46e4a7 Merge pull request #1093 from friday/travis-2
Verify PR instructions with Travis
2018-07-10 15:24:22 +10:00
Albin Larsson
82a119c67f Add travis check for the base branch (only permit develop for code changes) 2018-07-10 05:16:05 +02:00
Albin Larsson
6fd4389887 Add travis check for omitting dist in development branch 2018-07-10 05:16:05 +02:00
Albin Larsson
1e1a548459 Simplify travis conf 2018-07-10 02:44:15 +02:00
Sam Potts
8db9b53a8f Merge pull request #1092 from friday/readme-streaming-link
Fix streaming link in docs
2018-07-10 09:50:43 +10:00
Sam Potts
ba33fd8277 Merge pull request #1091 from friday/1085
Add navigator.languages fallback for ios 9
2018-07-10 09:50:24 +10:00
Albin Larsson
8071feda18 Fix streaming link 2018-07-09 18:47:16 +02:00
Albin Larsson
a49b73cd01 Add navigator.languages fallback for ios 9 2018-07-09 18:38:23 +02:00
Sam Potts
8226493a9e Update pull_request_template.md 2018-07-05 09:49:25 +10:00
Sam Potts
38a8a0e8a1 Update issue_template.md 2018-07-05 09:45:17 +10:00
Sam Potts
ead6601394 Merge 2018-07-02 23:11:59 +10:00
Sam Potts
e61ebd8d05 Merge branch 'develop' into a11y-improvements 2018-07-02 23:11:50 +10:00
Sam Potts
6eeca8b5d1 Merge pull request #1083 from friday/fix-travis
Change "no-cycle" lint-error to warning
2018-07-02 08:53:50 +10:00
Sam Potts
bf51ce4414 Merge pull request #1082 from friday/yarn-error.log
Gitignore yarn-error.log
2018-07-02 08:53:32 +10:00
Albin Larsson
5ad614e251 Change linting import/no-cycle to warning (not error) 2018-07-01 19:50:58 +02:00
Albin Larsson
93c890603d Gitignore yarn-error.log 2018-07-01 19:33:47 +02:00
Guru Prasad Srinivasa
29fb4dfc2b Updated README.md to show up to add quality options to HTML5 videos
initialized via the source setter
2018-06-30 08:04:32 -04:00
Sam Potts
7de9fd1d65 Merge branch 'develop'
# Conflicts:
#	changelog.md
#	demo/dist/demo.css
#	demo/dist/demo.js.map
#	demo/dist/demo.min.js
#	demo/dist/demo.min.js.map
#	dist/plyr.css
#	dist/plyr.js.map
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	package.json
#	readme.md
#	src/js/plyr.js
#	src/js/plyr.polyfilled.js
2018-06-29 00:43:02 +10:00
Sam Potts
566c059832 3.3.16 2018-06-29 00:38:11 +10:00
Sam Potts
0c9572f0a1 Merge branch 'develop' of github.com:sampotts/plyr into develop 2018-06-29 00:21:28 +10:00
Sam Potts
c99607c85a Linting, housekeeping, duration fix (fixes #1074) 2018-06-29 00:21:22 +10:00
Sam Potts
e2010bcd1a Merge pull request #1075 from mimse/feature/handle_live_stream
Hide currentTime and progress
2018-06-28 23:52:58 +10:00
Sam Potts
3bf1c59bd6 Work on key bindings for menu 2018-06-28 23:44:07 +10:00
mimse
e9f1b55f51 Hide currentTime and progress 2018-06-28 11:25:55 +02:00
Sam Potts
4f5152f526 Merge pull request #1070 from mimse/fix_condition_check
Fixed condition check
2018-06-27 22:47:42 +10:00
Morten Vestergaard Hansen
de9b53045a Fixed condition check
If class includes "control" it will add it again.
2018-06-27 14:33:51 +02:00
Sam Potts
e59fe1aacf Merge branch 'develop' into a11y-improvements
# 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
2018-06-25 23:09:13 +10:00
Sam Potts
df458c5e7a Merge branch 'develop' of github.com:sampotts/plyr into develop 2018-06-25 22:31:43 +10:00
Sam Potts
e206554146 Linting and package tweak 2018-06-25 22:31:38 +10:00
Sam Potts
e422806c44 Merge pull request #1063 from klassicd/develop
Handle undefined this.player.elements.buttons.play
2018-06-25 20:21:49 +10:00
Michael DePetrillo
b6ddf144f4 handle undefined player.elements.buttons.play 2018-06-25 12:00:02 +02:00
Sam Potts
86406ee59a Merge pull request #1061 from friday/captions-no-toggle-button
Fix captions.toggle() if there is no toggle button
2018-06-22 08:19:33 +10:00
Albin Larsson
81c5477f1d Fix captions.toggle() if there is no toggle button 2018-06-21 15:22:30 +02:00
Sam Potts
ac64350a5f Fix for bug where controls wouldn't show on hover over YouTube video 2018-06-21 19:26:56 +10:00
Sam Potts
333619f1e3 Remove pointer-events: none on embed <iframe> to comply with YouTube ToS 2018-06-21 14:26:40 +10:00
Sam Potts
17dcb63c26 Merge branch 'develop'
# Conflicts:
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
2018-06-21 09:11:05 +10:00
Sam Potts
e04b90c9c0 Ads only on HTML5 and .is cleanup 2018-06-21 09:06:28 +10:00
Sam Potts
1f1d74ba50 Work on menus 2018-06-21 09:01:16 +10:00
Sam Potts
f62e1da01a Merge pull request #1057 from meyt/patch-1
Fix i18n defaults path on README
2018-06-20 22:46:50 +10:00
Meyti
2fe949629f Fix i18n defaults path 2018-06-20 16:00:51 +04:30
Sam Potts
20f2ddc11d Merge pull request #1056 from friday/volume
Minor increaseVolume and decreaseVolume changes
2018-06-20 16:53:43 +10:00
Albin Larsson
004528a65c Avoid conditions in volume scroll event listener 2018-06-19 17:22:12 +02:00
Albin Larsson
39c7bd40c2 Make decreaseVolume wrap increaseVolume for code reuse 2018-06-19 16:29:52 +02:00
Albin Larsson
43879e08f4 Make (increase/decrease)Volume methods ignore invalid input instead of raising / lowering to the min / max 2018-06-19 16:27:06 +02:00
Sam Potts
bb546fe43f Merge branch 'develop' into a11y-improvements
# Conflicts:
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
2018-06-19 19:24:47 +10:00
Sam Potts
5ed7aa6620 v3.3.17 2018-06-19 16:58:38 +10:00
Sam Potts
47750b6aad v3.3.17
-   Fix YouTube muting after seeking with the progress slider
-   Respect preload="none" when setting quality if the media hasn't been loaded some other way
2018-06-19 16:57:32 +10:00
Sam Potts
de7832eb8b Merge branch 'develop' 2018-06-19 16:40:54 +10:00
friday
52ea5bd0ab Merge pull request #1052 from friday/youtube-audio-fix
Fix YouTube muting after seeking with the progress slider.
2018-06-19 04:15:07 +02:00
Albin Larsson
457d112df7 Fix #1045: YouTube mutes when seeking after play 2018-06-19 04:03:59 +02:00
Sam Potts
22cdec9d38 Merge pull request #1051 from friday/quality-2
Respect preload="none" when setting quality if the media hasn't been loaded some other way
2018-06-19 11:48:44 +10:00
Albin Larsson
d72e502107 Fixes #1044: Don't load the new source if preload is disabled and the current source hasn't been loaded 2018-06-19 03:39:18 +02:00
Albin Larsson
94055f0772 Replace filter()[0] with find() 2018-06-19 03:35:57 +02:00
Sam Potts
ede9323524 v3.3.16 2018-06-19 09:16:14 +10:00
Sam Potts
c45f428f61 Built files 2018-06-19 09:14:10 +10:00
Sam Potts
b61ba02f3d Fix issue with play button not changing state (fixes #1048) 2018-06-19 09:12:21 +10:00
Sam Potts
9e1218547b WIP 2018-06-19 09:11:35 +10:00
Sam Potts
715b88c09b Merge branch 'develop' into a11y-improvements
# Conflicts:
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
2018-06-18 23:29:25 +10:00
Sam Potts
ea4d91d2a0 v3.3.15 2018-06-18 23:21:03 +10:00
Sam Potts
7b9ef7d757 More work on menus 2018-06-18 23:13:40 +10:00
Sam Potts
d64ed4ba5a Merge branch 'develop' into a11y-improvements
# Conflicts:
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
2018-06-18 22:17:34 +10:00
Sam Potts
22d524ac9d Removed 1440p so I can afford to eat 2018-06-18 22:16:12 +10:00
Sam Potts
8584f6a1db v3.3.14 2018-06-18 22:01:56 +10:00
Sam Potts
08df96a149 v3.3.13
You guessed it, a load of awesome changes from contributors:

Thanks @friday for the following:

-   Captions fixes
-   Fix poster race conditions
-   Minor code improvements for quality switching
-   Minor event changes
-   Fix condition in events.toggleListener to allow non-elements
-   Suggestion: Remove array newline rule
-   Contributions improvements

-   fix: html5.cancelRequest not remove source tag correctly (thanks @a60814billy)
-   remove event listeners in destroy() (thanks @cky917)
-   Fix markdown in README (thanks @azu)
-   Some parts of the accessibility improvements outlined in #905 (more on the way...)
-   Fix for bug where volume slider didn't always show
2018-06-18 21:49:06 +10:00
Sam Potts
cc3c0b5448 Merge branch 'develop' 2018-06-18 21:41:25 +10:00
Sam Potts
ffd864ed39 Work on controls 2018-06-18 21:39:47 +10:00
Sam Potts
3c9c1b4cdc Merge pull request #1041 from sampotts/a11y-improvements
A11y improvements
2018-06-17 01:34:11 +10:00
Sam Potts
599883e684 Formatting fix 2018-06-17 01:30:24 +10:00
Sam Potts
f1b4db4f36 Merge branch 'develop' into a11y-improvements
# 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/controls.js
#	src/js/fullscreen.js
#	src/js/plyr.js
#	src/js/ui.js
#	src/js/utils.js
2018-06-17 01:26:24 +10:00
Sam Potts
d4abb4b143 120 line width, package upgrade 2018-06-17 01:04:55 +10:00
Sam Potts
828ce66942 Merge pull request #1038 from friday/captions-input-lowercase
Small captions fixes
2018-06-17 00:40:56 +10:00
Sam Potts
ccc2608cf6 Merge pull request #1039 from friday/poster-race-conditions
Fix poster race conditions
2018-06-17 00:40:28 +10:00
Sam Potts
de45de0e0b Merge pull request #1040 from friday/switches-get-stitches
Switches code optimizations
2018-06-17 00:39:35 +10:00
Albin Larsson
99c10aa1fc Replace switch in controls.createProgress with object literal 2018-06-16 07:27:04 +02:00
Albin Larsson
2a186e425b Replace switch in support.mime with object literal and conditions, and make it return boolean 2018-06-16 07:27:04 +02:00
Albin Larsson
64bb206d85 Replace switch in support.check with simpler conditions 2018-06-16 07:27:04 +02:00
Albin Larsson
2d6732d580 Replace switch in controls.createLabel with object literal 2018-06-16 07:25:34 +02:00
Albin Larsson
8f359adf9c Fix captions.toggle order 2018-06-16 01:34:55 +02:00
Albin Larsson
1f09493ba2 Captions: Handle uppercase input (like before) 2018-06-16 01:07:16 +02: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
2af60c5c0d Add 'ready' promise 2018-06-15 23:01:33 +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
f1c4752036 Filter out null / undefined in elements.setAttributes 2018-06-15 22:52:19 +02:00
Albin Larsson
88735e3146 Replace switch in controls.updateSetting with condition 2018-06-15 15:57:10 +02:00
Albin Larsson
c373ed72d7 Replace switch in YouTube error handler with object literal 2018-06-15 15:57:10 +02:00
Albin Larsson
213cfe8c84 Replace switch in media.js with simpler conditions 2018-06-15 15:57:10 +02:00
Albin Larsson
87ea5e14b4 Replace provider switch plyr.js with conditions 2018-06-15 15:57:10 +02:00
Albin Larsson
2aa967aba9 Replace switch in source.js with destructuring 2018-06-15 12:33:30 +02:00
Sam Potts
d522e40594 Merge pull request #1034 from friday/remove-array-newline-rule
Suggestion: Remove array newline rule
2018-06-15 15:34:29 +10:00
Sam Potts
3cd2b9a6c3 Merge pull request #1036 from friday/captions-passive-toggle
Captions fixes (again)
2018-06-15 15:33:39 +10:00
Albin Larsson
19e412a73a Add 'passive' flag to internal captions methods to avoid overriding user preferences, support multiple browser languages (get first match) and improve comments 2018-06-15 06:07:04 +02:00
Albin Larsson
cf5f77c709 Fix menu transitionend event listener 2018-06-15 05:51:23 +02:00
Sam Potts
4811e3333f Merge pull request #1035 from sampotts/friday-contrib-2
Contributions improvements
2018-06-15 11:04:33 +10:00
Albin Larsson
8257857075 Wrap caption toggle event listener callback to avoid sending event 2018-06-15 02:44:00 +02:00
friday
e3e4e60fdb Contributions improvements
General improvements and new sections
2018-06-14 19:50:59 +02:00
Albin Larsson
6ce9a94932 Move internal event listeners for captions with direct handling in the captions object 2018-06-14 16:41:16 +02:00
Albin Larsson
fa5d0ad316 Move toggleCaption internals to captions object 2018-06-14 15:58:35 +02:00
Albin Larsson
6bff6b317d Remove line breaks in arrays 2018-06-13 23:27:35 +02:00
Albin Larsson
99ac8d4c52 Remove array-newline rule 2018-06-13 22:07:32 +02:00
Sam Potts
019e1f80ca Merge pull request #1032 from friday/event-2
Fix condition in events.toggleListener to allow non-elements
2018-06-13 23:16:46 +10:00
Albin Larsson
2fe98f3721 Fix condition in events.toggleListener to allow non-elements 2018-06-13 14:29:55 +02:00
Sam Potts
5c08363400 Merge pull request #1030 from friday/event-improvements
Minor event changes
2018-06-13 10:52:17 +10:00
Albin Larsson
927326f715 Also remove 'once' event listeners when destroying (they may still be waiting) 2018-06-12 20:00:41 +02:00
Albin Larsson
53933dff7e Use toggleListener in trapFocus 2018-06-12 19:39:26 +02:00
Albin Larsson
f15c1344b0 Removed support for multiple elements in toggleListener 2018-06-12 19:10:00 +02:00
Albin Larsson
fb48b330cc typo 2018-06-12 17:41:17 +02:00
Sam Potts
5dddf8b0ec Logic cleanup 2018-06-13 00:56:31 +10:00
Sam Potts
0ecf7e3854 Force string on format 2018-06-13 00:48:42 +10: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
7158e507ad Merge pull request #1029 from cky917/develop
remove event listeners in destroy()
2018-06-13 00:05:31 +10:00
Sam Potts
70f3390ffe Merge pull request #1028 from a60814billy/fix/cancel-request-not-remove-source-tag-correctly
fix: html5.cancelRequest not remove source tag correctly
2018-06-13 00:03:24 +10:00
Sam Potts
392dfd024c Utils broken down into seperate files and exports 2018-06-13 00:02:55 +10:00
cky
87170ab460 remove event listeners in destroy, add once method 2018-06-12 21:18:05 +08:00
BoHong Li
ee4c044d27 fix: html5.cancelRequest not remove source tag correctly 2018-06-12 11:35:31 +08:00
Sam Potts
0b09b8ee6f Merge pull request #1027 from friday/quality
Minor code improvements for quality switching
2018-06-12 11:13:34 +10:00
Albin Larsson
db95b3234f Move uniqueness filter from getQualityOptions to setQualityMenu 2018-06-12 02:31:18 +02:00
Albin Larsson
6d2dad5810 Trigger qualityrequested event unconditionally when trying to set it (needed for streaming libraries to be able to listen) 2018-06-12 02:31:18 +02:00
Albin Larsson
81ee3f759c Remove todo comment about Vimeo support for setting quality (they don't support it) 2018-06-12 02:31:18 +02:00
Albin Larsson
ed606c28ab Filter out unsupported mimetypes in getSources() instead of the quality setter 2018-06-12 02:31:18 +02:00
Albin Larsson
f15e07f7f5 Simplify logic in youtube.mapQualityUnit (not that it matters much now) 2018-06-12 02:31:04 +02:00
Sam Potts
cd14c3086d Merge pull request #1025 from azu/patch-1
Fix markdown in README
2018-06-11 20:16:18 +10:00
azu
41184b82ee Fix markdown in README 2018-06-11 19:12:35 +09:00
Sam Potts
6a6f3914c0 Merge branch 'develop' into a11y-improvements
# Conflicts:
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
2018-06-11 17:13:09 +10:00
Sam Potts
840e31a693 v3.3.12 2018-06-11 17:10:37 +10:00
Sam Potts
1bc452c349 Merge 2018-06-11 16:54:35 +10:00
Sam Potts
3fad6ed42c Merge branch 'develop' into a11y-improvements
# Conflicts:
#	demo/dist/demo.css
#	dist/plyr.css
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
#	src/js/captions.js
2018-06-11 16:54:20 +10:00
Sam Potts
38f954ef17 Merge branch 'master' into develop
# Conflicts:
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
2018-06-11 16:48:54 +10:00
Sam Potts
abd1182303 Merge 2018-06-11 16:45:40 +10:00
Sam Potts
efe70ab48e v3.3.11 2018-06-11 16:39:35 +10:00
Albin Larsson
62c263bda3 Replace quality setter conditions with Array.find() 2018-06-11 08:23:08 +02:00
Albin Larsson
4c1337b4c5 Assure type safety in getSources() and getQualityOptions() (always return arrays), and remove external conditions and type conversion no longer needed 2018-06-11 08:23:08 +02:00
Sam Potts
38f10d4cc6 WIP 2018-06-11 16:19:11 +10:00
Sam Potts
1ad76800b0 Merge pull request #1024 from friday/event-bubble-detail
Event "detail" is lost in the synthetic event bubble/proxy
2018-06-11 16:13:02 +10:00
Albin Larsson
cc97d7be6a Fix synthetic event bubble/proxy loses detail 2018-06-11 08:00:46 +02:00
Sam Potts
f951cb372c Merge pull request #1023 from friday/make-utils-static
Make utils static
2018-06-11 14:41:06 +10:00
Albin Larsson
37a3ab202a Remove wrapper function around utils.is.element in Plyr.setup() (no lnger needed) 2018-06-11 05:44:57 +02:00
Albin Larsson
b148adc0af Avoid using this to refer to utils or utils.is, since that means methods can't be used statically 2018-06-11 05:44:57 +02:00
Albin Larsson
16828e975a Move utils.is.getConstructor() to utils.getConstructor() 2018-06-11 05:44:57 +02: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
Sam Potts
b199215525 Merge pull request #1021 from friday/vimeo-seek-while-playing
Fix for YouTube and Vimeo pausing after seek
2018-06-11 11:47:34 +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
41012a9843 Typo 2018-06-10 22:00:15 +02:00
Albin Larsson
c83487a293 Fix #1017, fix #980, fix #1014: Captions rewrite (use index internally) 2018-06-10 19:00:07 +02:00
Albin Larsson
1fab4919c0 controls.createMenuItem: Change input to object (too many params made it hard to read) 2018-06-10 18:57:19 +02:00
Albin Larsson
9dc0f28800 Avoid condition in getTracks 2018-06-10 18:57:19 +02:00
Albin Larsson
b57784d1a5 Change debug warn 'Unsupported language option' to log 'Language option doesn't yet exist' since it doesn't have to be an error 2018-06-10 18:56:13 +02:00
Albin Larsson
a80b31bf98 Fix #1003: Formatted captions issue 2018-06-10 18:56:13 +02:00
Sam Potts
7c6d4666e9 Merge branch 'develop' into a11y-improvements
# Conflicts:
#	demo/dist/demo.css
#	dist/plyr.css
#	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/captions.js
#	src/js/plyr.js
2018-06-09 17:03:16 +10:00
Sam Potts
76bb299c68 Restore default 2018-06-09 12:05:37 +10:00
Sam Potts
0c03accd41 Fix Sprite issue 2018-06-09 12:04:53 +10: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
Sam Potts
8e634862ff Merge pull request #1007 from cky917/master
fix:  After clicking on the progress bar, keyboard operations will not work.
2018-06-08 10:54:16 +10:00
Sam Potts
1e1874d86b Merge pull request #1009 from friday/contributing
Contributing document and codepen demo updates
2018-06-08 10:52:37 +10:00
Albin Larsson
16624b90d3 Clarifications due to recent non-constructive comments in #1001 2018-06-07 14:30:05 +02:00
Albin Larsson
ed14b656a8 Add contributing document 2018-06-07 11:47:51 +02:00
Albin Larsson
1d0cf16254 Readme: Replace streaming section with codepen templates for all supported formats and libraries (and updated code) 2018-06-07 11:47:34 +02:00
cky
84424f7f67 fix: when the seek input is focused and the video is playing, the space key can't make the video pause, because after 'keyup', it always make the video play 2018-06-06 19:27:07 +08:00
cky
c95d9923f7 fix: https://github.com/sampotts/plyr/issues/1006 2018-06-06 16:59:42 +08:00
Sam Potts
05b85da3f4 Update controls.md (fixes #996) 2018-06-02 19:48:48 +10:00
Sam Potts
a4caba120c Merge branch 'master' of github.com:sampotts/plyr
# Conflicts:
#	demo/dist/demo.css
#	dist/plyr.css
#	dist/plyr.js.map
#	dist/plyr.min.js
#	dist/plyr.min.js.map
#	dist/plyr.polyfilled.js.map
#	dist/plyr.polyfilled.min.js
#	dist/plyr.polyfilled.min.js.map
2018-05-31 23:43:40 +10:00
Sam Potts
969a877a34 v3.3.10 2018-05-31 23:41:48 +10:00
Sam Potts
fb22a90d33 Merge pull request #993 from sampotts/develop
v3.3.10
2018-05-31 23:39:51 +10:00
Sam Potts
108bd3dfa0 Fixed incorrect BEM formatting, fixed buffer alignment 2018-05-31 23:33:59 +10:00
Sam Potts
5a445ae647 Merge pull request #988 from kim-company/translate-qualities
Translate quality badges and quality names
2018-05-31 22:43:31 +10:00
Philip Giuliani
56668f58b6 Rename qualityName to label 2018-05-31 14:40:56 +02:00
Sam Potts
eec96e5879 Merge pull request #990 from friday/travis
Travis integration
2018-05-31 18:33:00 +10:00
Sam Potts
c6c9d877e4 Merge pull request #992 from philipgiuliani/quality-resume-time
Wait for the metadata to be loaded before setting the currentTime
2018-05-31 18:32:10 +10:00
Philip Giuliani
61f4b998e1 Wait for the metadata to be loaded before setting the currentTime 2018-05-31 10:17:41 +02:00
Sam Potts
25a319d884 Merge pull request #989 from friday/pr-template
Proposed changes to PR template
2018-05-31 08:34:02 +10:00
Albin Larsson
4bf678fe6c Proposed changes to PR template (develop as base branch, exclude build and typo fix) 2018-05-30 19:52:15 +02:00
Albin Larsson
359acd6bb9 Lint and build in travis 2018-05-30 19:40:17 +02:00
Albin Larsson
2fce385691 Add npm scripts for linting and building 2018-05-30 19:40:17 +02:00
Albin Larsson
a82c61c539 Gulp: Add option to build only 2018-05-30 19:39:57 +02:00
Philip Giuliani
a8fa125a96 Refactor getDeep method 2018-05-30 17:30:10 +02:00
Philip Giuliani
6435ced707 Return undefined when the key is not present. 2018-05-30 17:10:38 +02:00
Philip Giuliani
94dc0d176c Rebuild 2018-05-30 17:03:41 +02:00
Philip Giuliani
23c21252e8 Rebuild 2018-05-30 17:02:07 +02:00
Philip Giuliani
41c7dff0e8 Add getDeep method to utils 2018-05-30 17:02:07 +02:00
Philip Giuliani
e3bae562fc Rebuild 2018-05-30 17:02:07 +02:00
Philip Giuliani
1c1668bfc3 Implement translation support for qualityName and qualityBadge 2018-05-30 17:02:07 +02:00
Philip Giuliani
e0c09c51f2 Allow nested translations 2018-05-30 17:02:07 +02:00
Philip Giuliani
8de06fb862 Accept quality 0 2018-05-30 17:02:07 +02:00
Sam Potts
64412868d8 ESLint tweak 2018-05-30 17:02:07 +02:00
Sam Potts
450958c290 Merge pull request #981 from friday/hls-captions
Improve captions handling for streaming
2018-05-30 21:44:42 +10:00
Sam Potts
963fe11ad6 Update readme.md 2018-05-30 00:22:01 +10:00
Sam Potts
ce199e4b6b Merge pull request #986 from friday/701
Call duration update method manually if user config has duration
2018-05-30 00:20:15 +10:00
Albin Larsson
9d798893b5 Call duration update method manually if user config has duration 2018-05-29 16:06:07 +02:00
Albin Larsson
64399e0717 Defer initial captions update to next tick, to avoid event being triggered to early 2018-05-28 17:54:25 +02:00
Albin Larsson
f58e23b325 Change to using addtrack and removetrack listeners since 'change' didn't trigger in firefox for embedded captions (may also be a hls.js issue) 2018-05-28 16:19:44 +02:00
Albin Larsson
812e07b734 Replace browser language detection in defaults.js with explicit 'auto' option 2018-05-28 07:43:37 +02:00
Albin Larsson
c9298fde76 Fix typo 2018-05-28 07:08:38 +02:00
Albin Larsson
0109454a34 Ensure language is set in case the track is added after initialization, and trigger languagechange event when language is initially set 2018-05-28 06:08:03 +02:00
Albin Larsson
813f703211 Add option to watch caption track changes and update language options 2018-05-28 06:08:03 +02:00
Albin Larsson
7aad747c25 Optimize captions code reused and ensure captionsenabled/captionsdisabled
will be sent on initial setup
2018-05-28 05:44:54 +02:00
Sam Potts
d70a787af1 Merge branch 'develop' 2018-05-28 10:42:11 +10:00
Sam Potts
69bb0917ad v3.3.9 2018-05-28 10:41:51 +10:00
Sam Potts
90c5735904 WIP 2018-05-28 10:19:07 +10:00
Sam Potts
6f256d09b2 ESLint tweak 2018-05-28 10:18:04 +10:00
Sam Potts
e9684c2021 Merge pull request #979 from friday/respect-storage
Respect storage being disabled for storage getter
2018-05-28 10:09:02 +10:00
Sam Potts
bf91a0e73f Merge pull request #977 from friday/utils.is.icue-ie11
Restore utils.is.cue()
2018-05-28 10:08:42 +10:00
Sam Potts
14b6309aef Merge pull request #978 from friday/ie-issues
Fix InvalidStateError and IE11 issues
2018-05-28 10:08:24 +10:00
Albin Larsson
6391ced99f If storage is disabled, disable get as well, not just set 2018-05-28 01:58:06 +02:00
Albin Larsson
fac8a185ba Simplify currentTime setter and bail when media hasn't loaded 2018-05-28 00:57:07 +02:00
Albin Larsson
c69aa8a42b Avoid duration getter returning NaN before element has loaded 2018-05-28 00:57:01 +02:00
Albin Larsson
f34bf22125 Restore utils.is.cue() 2018-05-27 20:28:48 +02:00
Sam Potts
f0be913dc3 Merge pull request #975 from sampotts/develop
v3.3.8
2018-05-26 13:55:22 +10:00
Sam Potts
cd51788b98 v3.3.8 2018-05-26 13:53:15 +10:00
Sam Potts
3e0a911418 WIP 2018-05-26 13:37:10 +10:00
Sam Potts
edd67b0da3 Typo 2018-05-20 23:44:40 +10:00
Sam Potts
d733454d7f Pause while seeking 2018-05-20 23:40:28 +10:00
Sam Potts
41f9a87e0e Add URL polyfill 2018-05-20 23:40:00 +10:00
Sam Potts
f4858f0c62 Merge pull request #959 from friday/876
Youtube and vimeo fixes
2018-05-19 16:49:31 +10:00
Albin Larsson
121093ae71 Prevent durationchange events from showing time when invertTime is false 2018-05-19 04:27:45 +02:00
Albin Larsson
aa8fc313a9 Fix #966: Add 'seeked' event listener to update progress (seeking doesn't have the correct time) 2018-05-19 04:23:22 +02:00
Albin Larsson
723298a07b Fix #921: Trigger seeked event in youtube plugin if either playing or paused 2018-05-19 04:18:27 +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
Sam Potts
3ab2295fe7 Merge branch 'master' into develop 2018-05-19 11:29:47 +10:00
Sam Potts
c41bb657ac Merge pull request #958 from friday/954
Fix the seek tooltip time difference from seek time
2018-05-19 11:28:38 +10:00
Sam Potts
55bbf64f2b Merge pull request #963 from friday/verify-poster
Make sure poster element isn't shown if the image isn't loaded
2018-05-19 11:27:52 +10:00
Sam Potts
3bba65f2c2 Merge pull request #967 from friday/883
toggleControls rewrite
2018-05-19 11:27:19 +10:00
Sam Potts
1bab0d07b5 Merge branch 'master' into develop 2018-05-19 11:26:05 +10:00
Sam Potts
602353f4d9 Merge branch 'master' of github.com:sampotts/plyr 2018-05-19 11:25:02 +10:00
Sam Potts
51814249af Reduce circular dependencies 2018-05-19 11:24:56 +10:00
Albin Larsson
37c5fbfe16 toggleControls() rewrite 2018-05-18 16:19:38 +02:00
Albin Larsson
d7356726a1 Remove ui.checkFailed() and error class 2018-05-16 23:21:06 +02:00
Albin Larsson
4db6bf7a2e Make utils.toggleClass() compatible with Element.classList.toggle (rename toggle argument to 'force' and make it optional) 2018-05-16 23:21:06 +02:00
Albin Larsson
28826f6402 Add 'video only' caveat to toggleControls() doc (current behavior) 2018-05-16 23:21:06 +02:00
Albin Larsson
c845558d96 Youtube poster: Set css backgroundSize to 'cover' for padded youtube thumbnails 2018-05-15 16:41:51 +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
Albin Larsson
90d5b48845 Add async method to utils for loading/checking images 2018-05-15 13:27:55 +02:00
Albin Larsson
d1acc4abb3 Add event before seeking via mouse interaction to set alternative 'value' for the input matching the tooltip time 2018-05-14 19:50:08 +02:00
Sam Potts
797b70998f Merge pull request #960 from friday/935
Support importing Plyr in Node.js without errors
2018-05-14 23:38:48 +10:00
Sam Potts
4a01027da0 Merge pull request #961 from friday/expose-defaults
Enable overriding defaults
2018-05-14 23:38:25 +10:00
Albin Larsson
7ca2169790 Expose defaults (enable overriding) 2018-05-14 06:49:04 +02:00
Albin Larsson
054f522aa9 Enable importing Plyr in node.js without errors (resulting in an empty object) 2018-05-14 05:35:13 +02:00
Albin Larsson
f2fc3f5ea5 Fix the seek tooltip time difference from seek time 2018-05-12 00:10:39 +02:00
Sam Potts
765c01e83d Remove references to window.Plyr 2018-05-10 09:34:15 +10:00
Sam Potts
33a11fb53a v3.3.7 2018-05-09 09:50:22 +10:00
Sam Potts
d1d41ca49a Merge branch 'master' of github.com:sampotts/plyr 2018-05-09 09:48:52 +10:00
Sam Potts
c06e0ee5e9 Grid tweak 2018-05-09 09:48:46 +10:00
Sam Potts
83f80ccc40 Merge pull request #950 from friday/poster-fixes
Poster fixes
2018-05-09 09:44:36 +10:00
Albin Larsson
069065ea3a Fix #946 - poster getting click events 2018-05-08 16:50:40 +02:00
Albin Larsson
1672e78041 Fix poster being stretched 2018-05-08 16:49:32 +02:00
Sam Potts
34401de3d0 Merge branch 'master' into develop 2018-05-08 22:22:43 +10:00
Sam Potts
afc969bac3 Merge branch 'beta' of github.com:Selz/plyr into beta 2018-05-08 22:22:16 +10:00
Sam Potts
e1ff516219 Merge branch 'master' into beta 2018-05-08 22:22:09 +10:00
Sam Potts
f687b81b70 v3.3.6 2018-05-08 13:18:30 +10: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
1491b017a0 Setup multiple players 2018-05-06 16:18:10 +10:00
Sam Potts
1655150092 v3.3.5 2018-05-06 01:32:51 +10:00
Sam Potts
ceb6c9a100 v3.3.3 2018-05-06 01:16:41 +10:00
Sam Potts
00bbce08fb Reverted menu change 2018-05-06 01:14:41 +10:00
Sam Potts
91a4b86860 Small bug fixes 2018-05-06 01:03:38 +10:00
Sam Potts
5aece6fa06 Merge 2018-05-06 00:50:02 +10:00
Sam Potts
a70b94afe2 Merge branch 'master' of github.com:sampotts/plyr 2018-05-06 00:49:22 +10:00
Sam Potts
9ebc2719d3 v3.3.0 2018-05-06 00:49:12 +10:00
Sam Potts
b46aae1833 Merge pull request #939 from Billybobbonnet/patch-1
Added 480p to SD labels
2018-05-03 20:28:03 +10:00
Antoine Cordelois
30e6a40865 Added 480p to SD labels 2018-05-03 11:42:09 +02:00
Sam Potts
403df36af6 Merge branch 'master' into develop 2018-04-27 21:42:29 +10:00
Sam Potts
8efa46aeab Merge branch 'master' into beta 2018-04-27 21:42:13 +10:00
Sam Potts
5ca769807e Merge pull request #923 from friday/922
Only add hideControls class if config.hideControls is truthy
2018-04-27 20:07:18 +10:00
Sam Potts
72a71a605b Fix for default timestamp 2018-04-27 20:06:14 +10:00
Sam Potts
24d833a5d1 Merge branch 'master' into develop 2018-04-27 18:35:06 +10:00
Sam Potts
44b30380f7 Merge branch 'beta' of github.com:Selz/plyr 2018-04-27 18:34:06 +10:00
Sam Potts
261cd086c7 Update readme.md 2018-04-27 12:44:58 +10:00
Albin Larsson
9e19b526b9 Only add hideControls class if config.hideControls is truthy 2018-04-26 17:51:14 +02:00
Sam Potts
6c617a0ef1 Readme fix 2018-04-27 01:12:04 +10:00
Sam Potts
a812650fea v3.2.4 2018-04-27 00:47:51 +10:00
Sam Potts
fec7a77d6f v3.2.3 2018-04-25 20:02:36 +10:00
Sam Potts
971e261067 Fix for iOS 9 throwing error for name property in fullscreen API (fixes #908) 2018-04-25 19:59:22 +10:00
Sam Potts
27407ba021 v3.2.2 2018-04-25 19:46:39 +10:00
Sam Potts
ef8e58ede4 Fix for hidden buffer and incorrect use of aria-hidden 2018-04-25 19:40:23 +10:00
Sam Potts
f13260c10a Merge pull request #919 from sampotts/master
Merge back
2018-04-25 07:38:17 +10:00
Sam Potts
e1183d6049 Merge pull request #918 from sampotts/master
Merge back
2018-04-25 07:37:18 +10:00
Sam Potts
f1b275aedc v3.2.1 2018-04-23 00:53:54 +10:00
Sam Potts
b647af256c More a11y stuff and context menu fix 2018-04-23 00:01:19 +10:00
Sam Potts
d2e9ed3467 Merge 2018-04-18 18:34:59 +10:00
Sam Potts
5b39986835 Merge branch 'master' of github.com:sampotts/plyr 2018-04-18 18:29:50 +10:00
Sam Potts
a97b08e8ea ARIA and Vimeo fixes 2018-04-18 18:29:43 +10:00
Sam Potts
56d1be9447 Merge pull request #903 from friday/901
Show captions even if toggle button is omitted from controls
2018-04-18 08:49:05 +10:00
Sam Potts
a241cb5215 Merge pull request #904 from friday/881
Fullscreen aria-pressed event listened fix for Chrome
2018-04-18 08:48:08 +10:00
Albin Larsson
042b1a8294 Fullscreen aria-pressed event listened fix for Chrome 2018-04-17 20:28:47 +02:00
Albin Larsson
6d79b8cd4c Don't require captions toggle button to be enabled in order to show captions 2018-04-17 18:59:19 +02:00
Sam Potts
88d766aeae v3.2.0 2018-04-17 23:54:38 +10:00
Sam Potts
119b471b84 More bug fixes 2018-04-17 23:51:23 +10:00
Sam Potts
7f079e0ec3 Fix for playing false positive (fixes #898) 2018-04-17 22:52:46 +10:00
Sam Potts
46fe3eecff Fixed bug for captions with no srclang and labels and improved logic (fixes #875) 2018-04-17 22:49:28 +10:00
Sam Potts
3061a701d5 PR merge 2018-04-14 14:58:09 +10:00
Sam Potts
e45109e1d7 Merge branch 'master' of github.com:sampotts/plyr 2018-04-14 14:48:20 +10:00
Sam Potts
e138e6d51e Merge pull request #895 from nicolasthy/patch-1
Fix IE10 split error
2018-04-14 14:47:57 +10:00
Nicolas Thiry
aef1363b04 Fix IE10 with default captions.language 2018-04-13 14:44:05 +02:00
Nicolas Thiry
766dd03d81 Fix IE10 split error
On IE10, Plyr throws the error `Unable to get property 'split' of undefined or null reference`. This fixes the case when `window.navigator.language` is null and can't use the `split()` function.
2018-04-12 22:12:12 +02:00
Sam Potts
ab393651ec Merge branch 'master' of github.com:sampotts/plyr 2018-04-11 23:44:44 +10:00
Sam Potts
ffd265d0ae Merge pull request #888 from Antonio-Laguna/master
Safer check for active caption
2018-04-11 23:42:40 +10:00
Antonio Laguna
72155472dd Safer check for active caption 2018-04-11 15:39:12 +02:00
Sam Potts
9b7170834e Merge pull request #887 from danielsarin/use-i18n-for-normal-speed
Add i18n support for "Normal" value in speed options
2018-04-11 22:43:47 +10:00
Daniel Sarin
3e57a87bf7 Add i18n support for "Normal" value in speed options 2018-04-11 15:39:23 +03:00
Sam Potts
a15d1c9f1c Merge pull request #886 from danielsarin/increate-menu-z-index
Increase menu container z-index to be higher than controls
2018-04-11 22:23:46 +10:00
Daniel Sarin
a095a64f90 Increase menu container z-index to be higher than controls 2018-04-11 15:13:34 +03:00
Sam Potts
2374d6b1c4 Merge branch 'master' of github.com:sampotts/plyr 2018-04-11 21:52:36 +10:00
Sam Potts
5ed3ff9084 Restore paused state after seek 2018-04-11 21:52:31 +10:00
Sam Potts
385be55510 Merge pull request #874 from friday/873
Fixes issue leaving fullscreen in Chrome using button
2018-04-10 17:21:15 +10:00
Albin Larsson
3082d0d128 Fixes #873 Can't leave fullscreen in Chrome (using button) 2018-04-05 20:29:01 +02:00
Sam Potts
f7e242f054 Merge pull request #871 from friday/867
Fix #867: Add custom property fallback
2018-04-05 09:19:46 +10:00
Sam Potts
2874505004 Merge pull request #868 from friday/null-no-controls
Fix string "null" being appended after the video if controls argument is empty.
2018-04-05 09:19:05 +10:00
Albin Larsson
ed9e0c13d7 Fix #867: Add custom property fallback 2018-04-05 00:33:09 +02:00
Albin Larsson
10be94fa99 Fix 'null' being appended after the video if controls is empty array 2018-04-04 21:33:14 +02:00
Sam Potts
ee79c46145 Merge branch 'master' of github.com:sampotts/plyr 2018-04-04 16:50:06 +10:00
Sam Potts
384010a2c0 Style fixes 2018-04-04 16:50:00 +10:00
Sam Potts
1e47019122 Merge pull request #863 from friday/data-plyr-config-no-options
Fix loading data-plyr-config when initiating Plyr without any options
2018-04-04 11:33:30 +10:00
Albin Larsson
536c65e82c Fix loading data-plyr-config when initiating Plyr without any options 2018-04-04 03:16:25 +02:00
Sam Potts
cdf14932ec Changelog 2018-04-03 23:03:16 +10:00
Sam Potts
3b20dbd9fd v3.1.0 2018-04-03 22:57:34 +10:00
Sam Potts
e4d975af00 Styling fixes 2018-04-03 22:56:19 +10:00
Sam Potts
2782a00e7c v3.1.0-beta.2 2018-04-03 22:31:55 +10:00
Sam Potts
91d192dd7c YouTube speed menu fix 2018-04-03 22:30:29 +10:00
Sam Potts
b1e3abc795 v3.1.0-beta.1 2018-04-02 22:52:02 +10:00
Sam Potts
3395e8df90 HTML5 quality selection 2018-04-02 22:40:03 +10:00
Sam Potts
cce143a7da v3.0.11 2018-03-30 23:14:07 +11:00
Sam Potts
d593005b32 Muted and autoplay fixes, small bug fixes 2018-03-30 23:09:17 +11:00
Sam Potts
7be9d5d4d3 v3.0.10 2018-03-30 00:16:42 +11:00
Sam Potts
d7141d5ed7 Controls docs, package upgrades 2018-03-30 00:11:48 +11:00
Sam Potts
0d0ece94d3 Fix regression 2018-03-29 20:20:37 +11:00
Sam Potts
1c06f6d06d Vimeo hotfix 2018-03-29 19:35:02 +11:00
Sam Potts
dda8e30b92 Merge branch 'master' of github.com:sampotts/plyr 2018-03-28 22:45:18 +11:00
Sam Potts
c4e2e24643 Bug fixes 2018-03-28 22:45:11 +11:00
Sam Potts
e020a105a3 Update readme.md 2018-03-28 00:55:55 +11:00
Sam Potts
2b7fe9a4f9 v3.0.6 2018-03-28 00:17:15 +11:00
Sam Potts
951df64b7f v3.0.5 2018-03-27 23:52:26 +11:00
Sam Potts
0976afe282 v3.0.4 2018-03-27 23:47:58 +11:00
Sam Potts
7b1e4abda7 Controls fixes 2018-03-27 23:43:38 +11:00
Sam Potts
0cf75eed3f Revert API method change 2018-03-27 21:15:11 +11:00
Sam Potts
d96957d086 Allow fullscreen in iframe 2018-03-27 21:13:22 +11:00
Sam Potts
1a032ea498 Fix for seeking issue 2018-03-27 21:10:06 +11:00
Sam Potts
5d079da1b8 Use object.entries 2018-03-27 10:41:06 +11:00
Sam Potts
9c1bc6ab08 Fixes for fast forward and issues with event.preventDefault() 2018-03-27 10:36:08 +11:00
Sam Potts
3d2ba8c009 Update readme.md 2018-03-22 09:11:42 +11:00
Sam Potts
e872ce3f77 Update readme.md 2018-03-22 09:10:50 +11:00
Sam Potts
b77756da04 Typo 2018-03-22 01:15:10 +11:00
Sam Potts
9b23e13ce8 v3.0.3 2018-03-22 01:13:37 +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
Sam Potts
17041efc71 Check for array for speed options (fixes #252) 2018-03-22 00:33:14 +11:00
Sam Potts
05b8e8a6e0 Restore as float (fixes #828) 2018-03-22 00:28:42 +11:00
Sam Potts
f998b996fa Fix for Firefox fullscreen oddness (Fixes #821) 2018-03-22 00:26:01 +11:00
Sam Potts
958b47c435 Merge branch 'master' of github.com:sampotts/plyr 2018-03-22 00:06:26 +11:00
Sam Potts
a27248d3b6 Merge pull request #820 from saadshahd/patch-1
Fix fast-forward control
2018-03-22 00:05:24 +11:00
Sam Potts
1b1f7be7ff Merge branch 'master' of github.com:sampotts/plyr 2018-03-22 00:04:34 +11:00
Sam Potts
59d4a27240 Improve Sprite checking (fixes #827) 2018-03-22 00:04:28 +11:00
Saad Shahd
75e9f3c2e3 Fix fast-forward control
fast-forward control doesn't work.
2018-03-21 12:15:57 +02:00
Sam Potts
7132eccf50 Merge pull request #822 from DanielRuf/patch/fix-options-link
fix the options link in the readme
2018-03-21 09:12:06 +11:00
Daniel Ruf
e953c6398c fix the options link in the readme 2018-03-20 15:05:51 +01:00
Sam Potts
bb7eea27e5 v3.0.2 2018-03-18 22:46:36 +11:00
Sam Potts
595c5e95bc Fix for Safari with adblockers 2018-03-18 22:37:06 +11:00
Sam Potts
43e6dcd41d Fix for local storage issue 2018-03-18 01:37:24 +11:00
Sam Potts
b06c8ae43f Changelog updated 2018-03-18 01:14:18 +11:00
Sam Potts
c7ea13c0c7 Sentry in live only 2018-03-18 01:08:05 +11:00
Sam Potts
0f8c6e147b Added Sentry 2018-03-18 00:21:23 +11:00
Sam Potts
e566365288 Typo 2018-03-17 23:44:40 +11:00
Sam Potts
a06e0f5890 Updated screenshot 2018-03-17 23:40:28 +11:00
Sam Potts
3bccc0da01 v3.0.0 2018-03-17 23:33:25 +11:00
Sam Potts
a0173d991e Removed beta message 2018-03-17 23:31:34 +11:00
Sam Potts
600f0eb8a3 Merge branch 'beta'
# Conflicts:
#	readme.md
2018-03-17 23:30:16 +11:00
Sam Potts
5db73b1327 Added buffered getter 2018-03-17 23:27:40 +11:00
Sam Potts
5cb1628cd8 Vimeo fix 2018-03-15 10:29:05 +11:00
Sam Potts
c74b75e8e1 3.0.0-beta.20 2018-03-13 23:35:17 +11:00
Sam Potts
0538476d6f 3.0.0-beta.19 2018-03-13 22:15:28 +11:00
Sam Potts
5ebe18d081 Typography fix 2018-03-13 22:00:40 +11:00
Sam Potts
207adde36d 3.0.0-beta.18 2018-03-13 21:44:18 +11:00
Sam Potts
1b13ddaa54 Update ads 2018-03-13 21:42:01 +11:00
Sam Potts
9981c349be Fix for null manager race condition 2018-03-11 18:23:47 +11:00
Sam Potts
b3365a7373 Normalised event names and removed unused 2018-03-11 12:54:51 +11:00
Sam Potts
9a0c1c830d Merge pull request #804 from friday/ads-trigger-arguments
[v3] Add optional arguments to Ads.trigger
2018-03-11 10:55:29 +11:00
Albin Larsson
ef27ba16f4 Add optional argument to Ads.trigger (currently only used for adblocker error) 2018-03-10 16:20:33 +01:00
Sam Potts
e206edc1f6 Event listener fixes, loadScript promise, ads tweaks 2018-03-11 02:03:35 +11:00
Sam Potts
c734bc4957 Merge branch 'beta' of github.com:sampotts/plyr into beta 2018-03-10 23:32:55 +11:00
Sam Potts
572b8a7aca Manually merged PRs 2018-03-10 23:32:48 +11:00
Sam Potts
eebae4a227 Merge pull request #802 from gehaktmolen/ad-hotfixes
Advertisement couldnt be loaded when creative dimensions do not align after resizing
2018-03-10 23:32:15 +11:00
Sam Potts
e0562752ea Merge pull request #795 from frogg/patch-1
Added link that explains Webkit's autoplay blocker
2018-03-10 23:29:22 +11:00
Arthur Hulsman
6a2ca534d2 Removed redundant wrappers within the adsmanager promises. 2018-03-09 14:29:37 +01:00
Arthur Hulsman
7adc2bc6c8 Unneeded else has been removed within the play() method. 2018-03-09 13:21:19 +01:00
Arthur Hulsman
ba8d7831a7 Made sure play() returns a promise. 2018-03-09 12:50:57 +01:00
Arthur Hulsman
69ffcbad27 Ad block detection would not work when calling play() right after creating the player instance, so the adsManager now also rejects on such a case. Also made sure that calling play() will wait for the adsManager promise to resolve or otherwise return the media.play() method. 2018-03-09 11:17:24 +01:00
Arthur Hulsman
819f7d1080 Resizing the ad container while having it on display none will return offset width and height of 0, which will cause ads not to play when ad sizes are set within the clients DSP. Also making sure that the inner containers of the ad container are full size. The container is now hidden/ displayed using z-index. 2018-03-07 15:43:48 +01:00
Arthur Hulsman
409b588458 Made sure that cue points for midrolls are not displayed when the ad rule for a midroll doesn't exceed the total play time of a video. 2018-03-07 15:17:30 +01:00
Arthur Hulsman
e90a603d57 Removed a double this.enabled variable and updated a comment in ads.js. Also made sure the adsmanager promise also can fail, so we can use it to wait for getting the advertisement ready when someone clicks the play button. Otherwise there it can look glitchy when the actual video starts playing and the video ad plays a few seconds later because the vast tag was slow to retrieve. Also fixed a typo. 2018-03-06 17:27:59 +01:00
Sam Potts
6f061621ad v3.0.0-beta.17 2018-03-03 23:16:15 +11:00
Sam Potts
0300610108 Typo 2018-03-03 23:14:57 +11:00
Sam Potts
2fba5f152c 3.0.0-beta.16 2018-03-03 23:06:54 +11:00
Sam Potts
317b08c703 Ready event fix, YouTube play event fix, docs update 2018-03-03 23:06:12 +11:00
Frederik Riedel
e6db374a72 Added link that explains Webkit's autoplay blocker 2018-02-24 16:19:55 +01:00
Sam Potts
bfb550b8d0 Package updates 2018-02-22 23:46:52 +11:00
Sam Potts
174234c166 v3.0.0-beta.15 2018-02-19 09:55:16 +11:00
Sam Potts
24b4220de5 Fix IE CORS captions 2018-02-19 09:52:46 +11:00
Sam Potts
f1895a4cce Pause button fix, polyfilled build, unminified builds 2018-02-17 19:34:15 +11:00
Sam Potts
c2a6306d46 Merge pull request #781 from friday/gulp-unminified-js-output
Build both minified and non-minified js-bundles
2018-02-17 09:22:34 +11:00
Sam Potts
7ac732f45b Merge branch 'beta' into gulp-unminified-js-output 2018-02-17 09:22:19 +11:00
Sam Potts
c90f1bdf08 v3.0.0-beta.13 2018-02-13 00:02:13 +11:00
Sam Potts
6a9be8d16b Fix for custom controls 2018-02-13 00:01:19 +11:00
Sam Potts
58c2c52c95 Merge branch 'beta' of github.com:sampotts/plyr into beta 2018-02-11 15:09:40 +11:00
Sam Potts
73a39769d4 Fullscreen API changes, color settings tweaks 2018-02-11 15:09:34 +11:00
Sam Potts
7221e26eca Merge pull request #780 from friday/captions-ie11-indexsizeerror
Fix harmless but annoying IE error 'IndexSizeError'
2018-02-06 12:51:45 +11:00
Albin Larsson
98adb8e784 Fix harmless but annoying IE error 'IndexSizeError' 2018-02-06 02:39:01 +01:00
Albin Larsson
a59dcb2f53 Gulp js build: create both minified and non-minified outputs 2018-02-06 01:57:27 +01:00
Sam Potts
d21b58e1c9 Copy 2018-02-06 11:26:13 +11:00
Sam Potts
d6e84cbabb Nicer checks 2018-02-06 11:12:03 +11:00
Sam Potts
fcccf1d479 Copy 2018-02-06 11:08:26 +11:00
Sam Potts
211db12a3d Readme merge 2018-02-06 11:06:46 +11:00
Sam Potts
ab7f277a1b Merge pull request #769 from redxtech/add-vue-plyr-to-readme
Add vue-plyr to readme
2018-02-06 10:51:42 +11:00
Albin Larsson
ce1d5a60d6 Remove eslint-rule 'no-shadow' (common variable names should be able to exist in different scopes) 2018-02-05 23:22:20 +01:00
Sam Potts
f67315e20c 3.0.0-beta.12 2018-02-06 00:25:50 +11:00
Sam Potts
2150c44036 Added backwards compatibility for <div> embeds 2018-02-06 00:24:48 +11:00
Sam Potts
70c9fbdde3 Removed fetch dependency 2018-02-05 21:43:32 +11:00
Sam Potts
f3ea31c515 Merge branch 'beta' of github.com:sampotts/plyr into beta
# Conflicts:
#	dist/plyr.js
#	dist/plyr.js.map
2018-02-05 21:28:16 +11:00
Sam Potts
1ee88cba16 Testing fetch 2018-02-05 21:26:18 +11:00
Sam Potts
af3ae75229 Update readme.md 2018-02-03 23:16:52 +11:00
Sam Potts
d76ef3ff91 Small UI tweaks and fix for instanceof issue 2018-01-31 19:33:00 +11:00
Sam Potts
2691c7c9d6 Version bump + icon fix 2018-01-30 13:01:05 +11:00
Sam Potts
26b1d8ce8f Fix UMD stuff 2018-01-30 12:57:19 +11:00
Sam Potts
6fae148fc1 Deploy 2018-01-30 09:26:09 +11:00
Sam Potts
bb51647fe2 Merge pull request #772 from sampotts/fix/ads-blocked
Fix: ads blocked and media playing before ad plays
2018-01-30 09:22:54 +11:00
Sam Potts
71efbe7a92 Merge branch 'beta' into fix/ads-blocked
# Conflicts:
#	dist/plyr.js
#	dist/plyr.js.map
#	src/js/plugins/ads.js
#	src/js/plyr.js
2018-01-30 09:22:14 +11:00
ferdiemmen
afd695cb39 Fix typo's 2018-01-29 22:45:46 +01:00
ferdiemmen
c4eb4c97ac fix(ads): Fixes media from playing when ads are blocked 2018-01-29 22:40:08 +01:00
Gabriel Dunn
d5a1a7ca1c Add vue-plyr to readme 2018-01-28 23:03:05 -07:00
Sam Potts
8f7a8940f3 Version bump 2018-01-25 22:42:52 +11:00
Sam Potts
5e68f8c8dd Attempt to fix YouTube message error, added ads references, changes to bool 2018-01-25 22:41:30 +11:00
Sam Potts
b4e22e2e7b Restored “Ad” in label 2018-01-24 09:06:20 +11:00
Sam Potts
d4234da9aa Docs tweak 2018-01-23 19:13:35 +11:00
Sam Potts
1f53b27d4e Version bump 2018-01-23 18:00:08 +11:00
Sam Potts
cc128e6088 Renamed property, UI tweak 2018-01-23 10:31:21 +11:00
ferdiemmen
3c8acb4e9e Fix bug where ad would play on every play action 2018-01-22 21:07:08 +01:00
Sam Potts
ebf53d14b1 Small tweaks 2018-01-22 23:39:09 +11:00
Sam Potts
b298587c0b Bug fix 2018-01-22 23:20:03 +11:00
Sam Potts
26e9aaceb8 Version bump 2018-01-22 23:17:40 +11:00
Sam Potts
384f3d6eda Gulp 2018-01-22 23:16:50 +11:00
Sam Potts
3aa5747c90 Merge pull request #760 from sampotts/beta-with-ads
Beta with ads
2018-01-22 23:15:52 +11:00
Sam Potts
5671235fd9 Formatting, events and ad countdown added 2018-01-22 23:15:10 +11:00
Sam Potts
1dd5c9efd9 Converted demo to iife 2018-01-20 15:23:36 +11:00
Sam Potts
5fad152cbf Formatting and “ad” badge 2018-01-19 20:24:15 +11:00
Sam Potts
f33ca846f2 Build 2018-01-19 14:30:28 +11:00
Sam Potts
986c802acd Merge branch 'beta-with-ads' of github.com:sampotts/plyr into beta-with-ads
# Conflicts:
#	src/js/plugins/ads.js
2018-01-19 14:30:11 +11:00
Sam Potts
98dd818bf6 Merge branch 'beta' into beta-with-ads
# Conflicts:
#	demo/dist/demo.js
#	demo/dist/demo.js.map
#	dist/plyr.js
#	dist/plyr.js.map
2018-01-19 14:28:39 +11:00
Sam Potts
021f6c8460 Comments and formatting 2018-01-19 14:26:25 +11:00
Sam Potts
392f837398 Merge pull request #763 from gehaktmolen/beta-with-ads-adjustments
Beta with ads - Reloading ads on new video
2018-01-19 14:26:08 +11:00
Sam Potts
6831c30534 Transition event fix 2018-01-19 14:22:26 +11:00
Arthur Hulsman
ed6048034b Noticed that Plyr stopped working when ads are blocked. 2018-01-18 14:04:47 +01:00
Arthur Hulsman
8af312fe3c Updated pause and resume content methods within Ads class. 2018-01-18 12:31:10 +01:00
Arthur Hulsman
d87ada4f58 Reformatted ads codebase and added/ changed comments. Also removed un-used events. 2018-01-18 12:26:53 +01:00
Arthur Hulsman
31c8166562 Fixed string literal and position issue of the midroll cue inside the time line. Added a check for the progress element existence. 2018-01-17 15:57:10 +01:00
Arthur Hulsman
0cb2f95888 Removed an un-used variable. 2018-01-17 15:43:08 +01:00
Arthur Hulsman
896ea7c689 Added cue markings within the time line for when midrolls will be displayed. Removed unusued callback parameter. 2018-01-17 15:38:26 +01:00
Arthur Hulsman
1d1eb02bd7 Added the logging of our main promises to their resolving callback. Otherwise they come up as null. 2018-01-17 14:44:44 +01:00
Arthur Hulsman
3583165b30 Removed logic related to starting the ad by clicking/ tapping the advertisement container. Ad is started by plyr play method. 2018-01-17 14:09:11 +01:00
Arthur Hulsman
d822f0c6bf Adsmanager is now re/pre-loaded with new ads when the video is done or an ad error appears. Will make it possible to request ads when a new video is loaded. Added comments and missing events within the adsmanagerloader method. 2018-01-17 13:58:39 +01:00
Arthur Hulsman
9e52296dc6 Moved the ads container to be outside of the video wrapper. This way we can easily move the ad in front or behind the video controls based on content resume or pause IMA events. 2018-01-17 12:19:32 +01:00
Arthur Hulsman
12a7a4142c Moved the logic for pausing and playing the video to content pause/ resume IMA events to avoid flickering. Also used events for resolving the adsmanager and adsloader promises. 2018-01-17 11:32:13 +01:00
ferdiemmen
8348f79742 Fix loading/playing of the ads when there is no valid ads.tagUrl 2018-01-17 08:31:36 +01:00
ferdiemmen
ec73d34bd3 Some tweaks 2018-01-16 23:06:40 +01:00
ferdiemmen
1cef48d4f8 fix blocking play() if ads are set 2018-01-15 23:30:54 +01:00
Ferdi
c24c05226d Merge pull request #761 from gehaktmolen/beta-with-ads-promises
Beta with ads - Added promises, missing events, new ad tag and additional logging.
2018-01-15 20:13:51 +01:00
Arthur Hulsman
4b0005c28e Added promises, missing events, new ad tag and additional logging. 2018-01-15 14:47:34 +01:00
Sam Potts
8064405dbc Tweaks 2018-01-14 23:33:18 +11:00
Sam Potts
22e8892993 Code tweaks 2018-01-14 23:15:33 +11:00
Sam Potts
cfc86bcb7c Merge branch 'beta' into beta-with-ads
# Conflicts:
#	demo/dist/demo.js
#	demo/dist/demo.js.map
#	dist/plyr.js
#	dist/plyr.js.map
2018-01-14 22:55:44 +11:00
Sam Potts
5f96ec6ac2 Minor logic tweak 2018-01-14 22:54:03 +11:00
ferdiemmen
bbdf225d7b Fix loading google ima sdk 2018-01-14 08:21:35 +01:00
ferdiemmen
025fc1090b Implementing ads plugin 2018-01-13 23:02:59 +01:00
Sam Potts
d9ec1d1b8e Progressively enhance <iframe> embeds 2018-01-12 19:35:46 +11:00
Sam Potts
2e5d06ad85 Publish script tweaks 2018-01-09 20:43:58 +11:00
Sam Potts
bacd049eb0 Package 2018-01-09 20:26:56 +11:00
Sam Potts
6fd7b26bb2 Beta version up on https://plyr.io/beta and CDN 2018-01-09 20:25:46 +11:00
Sam Potts
1df79cf7f8 Publishing to /beta 2018-01-09 19:35:17 +11:00
Sam Potts
e6badacf0d Recommended extensions for VS Code 2018-01-09 18:52:36 +11:00
Sam Potts
a0d9d5eca8 Styling tweaks 2018-01-09 09:14:59 +11:00
Sam Potts
8786377a75 Use CSS custom property for webkit range fill 2018-01-08 20:53:18 +11:00
Sam Potts
f0322e8d94 Merge branch 'develop' of github.com:sampotts/plyr into develop 2018-01-08 19:42:29 +11:00
Sam Potts
3f2ac3fca0 Package tweaks 2018-01-08 19:42:21 +11:00
Sam Potts
9872207e87 Merge pull request #752 from friday/gulp-fix
Enable gulp builds when aws.json isn't present.
2018-01-08 12:12:11 +11:00
Albin Larsson
58d942e737 Fix gulp build for user who doesn't have aws.json 2018-01-08 02:01:39 +01:00
Sam Potts
dd190155c4 Empty storage fix 2018-01-07 23:16:55 +11:00
Sam Potts
ebb3b83b27 Merge branch 'master' into develop
# Conflicts:
#	src/js/plyr.js
2018-01-07 22:46:28 +11:00
Sam Potts
79a43120ae Merge pull request #740 from gurinderhans/master
double click player to toggle fullscreen
2018-01-07 22:40:20 +11:00
Sam Potts
2b36ab7ef5 Merge branch 'master' into develop
# Conflicts:
#	.vscode/settings.json
#	demo/dist/demo.css
#	demo/dist/demo.js
#	demo/error.html
#	demo/index.html
#	demo/src/js/main.js
#	demo/src/less/lib/fontface.less
#	dist/plyr.css
#	dist/plyr.js
#	gulpfile.js
#	package-lock.json
#	package.json
#	readme.md
#	src/js/plyr.js
#	src/less/plyr.less
#	src/scss/plyr.scss
2018-01-07 22:39:28 +11:00
Sam Potts
eb38e0394d Slider styling 2018-01-07 22:35:52 +11:00
Sam Potts
b79ffacd9c Merge pull request #726 from xDae/master
Added react port
2018-01-05 21:23:45 +11:00
Sam Potts
e14e2cfaff Merge branch 'develop' of https://github.com/Selz/plyr into develop 2018-01-05 10:37:38 +11:00
Sam Potts
04119b27e6 Tweaks 2018-01-05 10:37:34 +11:00
Sam
92cb9e22e2 Started on error handling 2018-01-04 13:43:56 +11:00
Sam Potts
888c6773d0 Merge pull request #743 from jwpage/patch-1
Fix `enabled` smartphone example in README
2018-01-03 11:45:33 +11:00
Johnson Page
cfd653f02a Fix enabled smartphone example in README 2018-01-03 09:55:14 +11:00
Sam
6b9106ddb1 Fix for promise issue on Chrome, loading fix 2017-12-27 21:40:35 +00:00
Gurinder Hans
838bd49a1d add comment about no fullscreen if player type is audio 2017-12-23 21:47:01 -08:00
Gurinder Hans
800e0dedfb add double click to make full screen support 2017-12-23 21:41:08 -08:00
Sam Potts
965fc0b2f5 Docs, restored loadSprite and supported static methods 2017-12-23 18:42:52 +00:00
Sam Potts
98ac98b4c2 Vimeo fix 2017-12-21 00:20:56 +00:00
Sam Potts
178b0d8020 Badge tweak 2017-12-21 00:06:59 +00:00
Sam Potts
3bd1c1ff56 Fix for scrubber 2017-12-20 22:06:26 +00:00
Sam Potts
7d4bf91a35 Small fixes 2017-12-20 21:45:06 +00:00
Sam Potts
ac3d1d1242 Docs 2017-12-20 21:10:43 +00:00
Sam Potts
742018a716 Fix SASS bundle 2017-12-20 21:08:44 +00:00
Sam Potts
a2ef691b4b Comment update 2017-12-20 20:49:41 +00:00
Sam Potts
9e0c406a4a Remove chaning ability and return promise for play() 2017-12-20 20:47:02 +00:00
Sam Potts
f3df7aba15 Split up settings file 2017-12-20 18:00:05 +00:00
Sam Potts
6bc3592381 Fix for rounding 2017-12-20 15:32:16 +00:00
Sam Potts
6864149989 Converted to SASS/SCSS 2017-12-20 15:14:05 +00:00
Sam Potts
aab53fa91f Minor tweaks 2017-12-18 16:57:23 +00:00
Sam Potts
423f67b4f4 Copy 2017-12-08 15:55:12 +00:00
Sam Potts
82f81f4f73 More Edge fixes and small UI bugs 2017-12-08 15:54:08 +00:00
Sam Potts
c8990bd379 IE & Edge fixes, Storage & Console classes 2017-12-08 10:05:38 +00:00
Jose Miguel Bejarano
e6cc4ba1f5 Added react port 2017-12-04 17:05:14 +02:00
Sam Potts
de54929bb7 Safari CSS fixes and variables setup 2017-11-25 22:54:04 +11:00
Sam Potts
fd77831303 Fix display for current language on change 2017-11-25 01:19:16 +11:00
Sam Potts
cda574e627 Map 2017-11-24 08:47:17 +11:00
Sam Potts
fda1977119 Fix for keyboard increase/decrease volume 2017-11-24 08:47:11 +11:00
Sam Potts
f7bf0961cf Fix overflow issue on small players with menu open 2017-11-23 22:32:07 +11:00
Sam Potts
61325bbad1 Vimeo captions fix 2017-11-23 20:50:07 +11:00
Sam Potts
921cefd212 Moved to provider + type to make it cleaner in future, fix for multiple players 2017-11-23 17:35:35 +11:00
Sam Potts
de6f0f1b77 Updated data attributes to data-plyr namespace. Speed menu fixes 2017-11-23 12:57:43 +11:00
Sam Potts
7382553a78 Work on touch controls 2017-11-22 00:04:11 +11:00
Sam Potts
4b82e89845 Fix for playing getter as currentTime check is flaky 2017-11-21 21:14:44 +11:00
Sam Potts
d3b31e595a Handle no audio, more docs in code, fix for playing getter 2017-11-21 20:14:57 +11:00
Sam Potts
f33bc5a5c6 Minor tweaks 2017-11-21 14:05:55 +11:00
Sam Potts
f518ec108b Vimeo autopause option 2017-11-21 13:33:51 +11:00
Sam Potts
edfc6cd475 Play button as toggle button, tooltip changes, docs updated, fullscreen fix 2017-11-21 13:12:36 +11:00
Sam Potts
92cd67effb Docs to build custom CSS for plyr 2017-11-20 23:53:54 +11:00
Sam Potts
da1e987444 WIP on docs example 2017-11-20 21:23:49 +11:00
Sam Potts
2d4a166218 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	dist/plyr.js.map
2017-11-20 10:48:53 +11:00
Sam Potts
feae00224e Added ended and playing getters 2017-11-20 10:48:28 +11:00
Sam Potts
000afdd300 Merge branch 'develop' of github.com:Selz/plyr into develop 2017-11-19 23:35:23 +11:00
Sam Potts
0dc9681ae8 YouTube title 2017-11-19 23:35:07 +11:00
Sam Potts
dc391c98c6 UI tweaks 2017-11-19 21:15:24 +11:00
Sam Potts
4b62a5c74d Captions fix 2017-11-19 17:54:38 +11:00
Sam Potts
3f744ef63a Formatting 2017-11-18 19:36:36 +11:00
Sam Potts
5a244b7fed Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	dist/plyr.js.map
#	src/js/controls.js
2017-11-18 19:33:01 +11:00
Sam Potts
4dca4bf93c Minor fixes 2017-11-18 19:31:45 +11:00
Sam Potts
6984d6fb16 Controls cleanup, work on captions bug, click to invert time 2017-11-18 19:30:26 +11:00
Sam Potts
d7a1c44281 Using fetch instead of xhr, grabbing title for YouTube 2017-11-16 11:38:06 +01:00
Sam Potts
c64b8f6940 Started on error handling, Safari icon fix 2017-11-14 17:27:40 +01:00
Sam Potts
9c4b53d761 Fix for YouTube .getVideoData() issue (fixes #709) 2017-11-14 13:28:52 +01:00
Sam Potts
022b436c3f YouTube fix 2017-11-14 13:22:23 +01:00
Sam Potts
6058bb0245 Docs 2017-11-12 08:16:47 +00:00
Sam Potts
3ade86537d Docs, keyboard shortcut fixes 2017-11-12 08:14:14 +00:00
Sam Potts
d80be3b903 More docs, event renamed 2017-11-12 07:45:52 +00:00
Sam Potts
1a26681d87 Added Sparkk TV to the list of users 2017-11-10 00:19:44 +11:00
Sam Potts
9171297764 More docs 2017-11-10 00:06:46 +11:00
Sam Potts
ebd1a52e5d Config docs 2017-11-09 21:18:09 +11:00
Sam Potts
743c84188e Fix for destroy 2017-11-09 20:54:14 +11:00
Sam Potts
4879bea4a0 Moved console methods out of the root of the object 2017-11-09 20:01:13 +11:00
Sam Potts
66917fd39b Use callback for loading Vimeo API 2017-11-09 19:44:07 +11:00
Sam Potts
fd97607e55 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	dist/plyr.js.map
2017-11-09 19:41:12 +11:00
Sam Potts
f878581c8f UI bugs 2017-11-09 19:40:45 +11:00
Sam Potts
f9602acf61 Callback for loadScript 2017-11-09 16:06:49 +11:00
Sam Potts
86a5724bdb Missing code highlight 2017-11-09 00:22:40 +11:00
Sam Potts
63c963d726 More docs 2017-11-09 00:21:44 +11:00
Sam Potts
88bfa35b99 Test 2017-11-09 00:06:34 +11:00
Sam Potts
bb66be98da Volume fixes and other tidy up work 2017-11-08 23:46:20 +11:00
Sam Potts
c948e95ade Looping, increase/decrease volume fix 2017-11-08 00:37:14 +11:00
Sam Potts
1a5f4b1b9e Merge branch 'develop' of github.com:Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	dist/plyr.js.map
#	src/js/defaults.js
2017-11-07 23:23:17 +11:00
Sam Potts
3f41a0cf54 Merge branch 'develop' of github.com:Selz/plyr into develop
# Conflicts:
#	readme.md
2017-11-07 23:21:35 +11:00
Sam Potts
966ca1acc3 Trap focus fix 2017-11-07 18:01:24 +11:00
Sam Potts
e2c7491ccd Using the “href” attribute on SVG if supported, using hasAttribute 2017-11-07 09:58:37 +11:00
Sam Potts
0ec0addbda Update readme.md 2017-11-07 09:16:41 +11:00
Sam Potts
fae4ca12e0 Started on docs 2017-11-06 23:06:14 +11:00
Sam Potts
84505da84b Automatic Vimeo aspect ratio 2017-11-06 22:00:00 +11:00
Sam Potts
2497e25b3c Global listeners to prevent repeat binding 2017-11-06 21:19:00 +11:00
Sam Potts
9c4b7e7094 Keyboard logic 2017-11-06 20:34:11 +11:00
Sam Potts
3a9beaed59 Vimeo captions fix 2017-11-06 20:27:19 +11:00
Sam Potts
1578525ee3 Finished aspect ratio setting 2017-11-06 20:24:07 +11:00
Sam Potts
62c1b368cf Cleanup 2017-11-06 19:53:27 +11:00
Sam Potts
f8ecea8fb7 Added Vimeo playback speed 2017-11-06 19:47:14 +11:00
Sam Potts
0068710740 Started on documentation and aspect ratio option 2017-11-06 19:38:31 +11:00
Sam Potts
d206b8ab34 Merge pull request #696 from yuriykuzin/enable-speed-controls-on-vimeo
Enable speed controls using Vimeo API
2017-11-06 19:37:47 +11:00
Sam Potts
51c011b733 Merge branch 'master' into enable-speed-controls-on-vimeo 2017-11-06 19:37:02 +11:00
Sam Potts
5fe477340b Tab focus classname change 2017-11-05 23:20:26 +11:00
Sam Potts
45df319823 Keyboard shortcut tweaks 2017-11-05 23:09:33 +11:00
Sam Potts
6bebbe4153 Key listeners fix 2017-11-05 20:49:37 +11:00
Sam Potts
374de800a4 Captions fix 2017-11-05 18:57:22 +11:00
Sam Potts
60084a17f8 YouTube volume fix 2017-11-05 18:40:41 +11:00
Sam Potts
4d417d0396 Vimeo fix 2017-11-05 12:04:31 +11:00
Sam Potts
e2d8bd2b73 Captions language fix 2017-11-05 11:59:15 +11:00
Sam Potts
1c693df00b src getter fix, local storage fix 2017-11-05 11:45:02 +11:00
Sam Potts
8aaa932050 Cleanup 2017-11-05 01:13:00 +11:00
Sam Potts
3cd6c2acf6 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-11-05 01:02:17 +11:00
Sam Potts
3930ebb339 Menu design tweaks, moved logic into plugins 2017-11-05 01:02:10 +11:00
Sam Potts
b102714067 Merge pull request #705 from friday/editorconfig
Add .editorconfig file
2017-11-05 00:49:45 +11:00
Sam Potts
13d3037a53 Meta data and icons updated 2017-11-05 00:29:21 +11:00
Albin Larsson
1e7a60ee5c Add .editorconfig file 2017-11-04 14:16:00 +01:00
Sam Potts
8d80f6b05d Removed log 2017-11-04 23:53:03 +11:00
Sam Potts
3c99357f06 Vimeo fixes + small bug fixes 2017-11-04 23:18:47 +11:00
Sam Potts
597b3fe0db Retrofit PRs 2017-11-04 22:41:18 +11:00
Sam Potts
a757acad15 Merge pull request #577 from brandon-pereira/master
fix for svg4everybody conflicting with plyr
2017-11-04 22:25:27 +11:00
Sam Potts
7913cf837f Merge branch 'master' into master 2017-11-04 22:25:17 +11:00
Sam Potts
e98d356ede Merge branch 'master' into master 2017-11-04 22:22:49 +11:00
Sam Potts
c9c20345c0 Merge pull request #613 from vers-one/master
Fix for handling explicitly set duration of audio
2017-11-04 22:19:47 +11:00
Sam Potts
aca06be7ac Merge branch 'master' into master 2017-11-04 22:19:39 +11:00
Sam Potts
550cc6a19b Merge branch 'master' into master 2017-11-04 22:19:17 +11:00
Sam Potts
e44e93c117 Merge pull request #617 from oemueller/patch-1
[bugfix] target is null exception
2017-11-04 22:17:00 +11:00
Sam Potts
a06a8150ef Merge pull request #649 from waltercruz/master
Adding title to the player html template
2017-11-04 22:16:28 +11:00
Sam Potts
e787934ee6 Merge branch 'master' into master 2017-11-04 22:16:16 +11:00
Sam Potts
be4b5ef4db Merge branch 'master' into master 2017-11-04 22:14:55 +11:00
Sam Potts
55c5b8b07e Typo 2017-11-04 21:32:19 +11:00
Sam Potts
a924d40620 Merge pull request #654 from jjui/patch-1
Enable start/stop toggle on whole element
2017-11-04 21:29:25 +11:00
Sam Potts
0074e77a7c Update plyr.scss 2017-11-04 21:28:38 +11:00
Sam Potts
f3141690ee Update plyr.less 2017-11-04 21:28:17 +11:00
Sam Potts
7ac5b0e18b Merge pull request #678 from StudyTube/use-url-as-input-for-vimeo-player
Add URL as a possible input option to Vimeo player
2017-11-04 21:24:55 +11:00
Sam Potts
d920de2a25 Small tweaks 2017-11-04 21:19:02 +11:00
Sam Potts
5abf7e9535 Merge pull request #703 from gurupras/early-listener-fix
Allow Plyr.setup event listeners to be set up as separate event listeners
2017-11-04 18:15:03 +11:00
Sam Potts
650ee2c18f Merge pull request #700 from ashkanhosseini/master
fix #684 memory leaks issues after destroy.
2017-11-04 18:11:35 +11:00
Sam Potts
069c8093ae Small bug fixes 2017-11-04 14:45:06 +11:00
Sam Potts
1cc2930dc0 ES6-ified 2017-11-04 14:25:28 +11:00
Guru Prasad Srinivasa
95734cf7cc Allow setup event listeners to be set up as separate event listeners
rather than in-conjunction with defaultListener

This allows the setup listeners to do things like
preventDefault()/stopImmediatePropagation() and have them work
2017-11-01 04:15:03 -04:00
Sam Potts
3d50936b47 Split LESS into more granular files, Vimeo fixes 2017-10-28 20:14:33 +11:00
Ashkan Hosseini
7234e2f5a3 fix #684 memory leaks issues after destroy. 2017-10-28 00:09:40 +03:00
Sam Potts
dd9d5c8898 Linting and minor changes 2017-10-27 15:06:16 +11:00
Yuriy
e06b689f5c Enable speed controls using Vimeo API 2017-10-26 17:11:19 +03:00
Sam Potts
71db66d802 Error pages 2017-10-26 20:59:40 +11:00
Sam Potts
959b5a20e3 Inlined SVGs, fixed build 2017-10-26 00:10:56 +11:00
Sam Potts
9de5c0cf39 Built JS 2017-10-26 00:00:15 +11:00
Sam Potts
1a3868a6c6 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-10-25 23:59:59 +11:00
Sam Potts
378aa159b8 Docs/demo refresh 2017-10-25 23:59:53 +11:00
Sam Potts
6876a9163d Merge pull request #694 from friday/fix/volume-steps
Restore volume stepping via key up/down
2017-10-25 23:59:15 +11:00
Sam Potts
34d28a69ad Merge pull request #693 from friday/fix/instanceof-undefined
v3: Add instanceof wrapper to avoid TypeErrors
2017-10-25 23:54:10 +11:00
Albin Larsson
0715d3ae67 Restore up/down arrow behavior from v2 (10 steps between min and max instead of one) 2017-10-25 14:25:10 +02:00
Albin Larsson
542095f5eb Add instanceof wrapper that avoids TypeError when second argument is undefined 2017-10-25 14:10:38 +02:00
Sam Potts
57517a9dcc Fullscreen improvements 2017-10-18 23:55:53 +11:00
Sam Potts
751708ff23 Fix 2017-10-18 19:47:03 +11:00
Sam Potts
fcf944788a Cleanup 2017-10-18 12:47:54 +11:00
Sam Potts
36a84c5c2d Removed extra <progress> for populating lower fill on range inputs 2017-10-18 12:43:10 +11:00
Sam Potts
4392abfc49 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
2017-10-08 19:12:55 +11:00
Sam Potts
3238b6a36a Fullscreen fix 2017-10-08 19:12:25 +11:00
Sam Potts
18a5edef0e Linting 2017-10-08 19:10:04 +11:00
Yuriy Kuzin
1b3a6b340d Add URL as a possible input option to Vimeo player
This is reasonable to processing correctly private Vimeo links, like https://vimeo.com/25345658/fe46e209ac - that contain not only vimeo id, but also private key
2017-10-06 14:41:57 +03:00
Sam Potts
b3759e966d Version bump 2017-10-05 22:47:27 +11:00
Sam Potts
34172b9aee Fullscreen bug fix (fixes #664) 2017-10-05 22:46:48 +11:00
Sam Potts
02cb093f7b Small tweaks to focus 2017-10-03 00:00:45 +11:00
Sam Potts
d6977473b1 Formatting 2017-10-02 21:03:51 +11:00
Sam Potts
15cffad89e CDN URLs 2017-10-02 14:54:35 +11:00
Sam Potts
a21ffe983c Demo fixes 2017-10-02 14:52:31 +11:00
Sam Potts
0d96601d1a CDN URLs 2017-10-02 14:48:15 +11:00
Sam Potts
9fb79f29fd Readme fix 2017-10-02 14:25:14 +11:00
Sam Potts
032d73408f CDN URL updates 2017-10-02 14:18:44 +11:00
Sam Potts
7959297a98 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-10-02 13:55:08 +11:00
Sam Potts
6dd010ea34 Comments, small tweaks 2017-10-02 13:55:03 +11:00
Sam Potts
f89ddb2f1b Merge pull request #669 from friday/fix/prevent-buttons-from-submitting-form
Prevent buttons from submitting form (v3)
2017-09-27 23:33:28 +10:00
Sam Potts
2e5cc272e3 Merge pull request #670 from friday/fix/errors-without-settings-pane
Avoid errors when initiating plyr without settings (v3)
2017-09-27 23:32:25 +10:00
Albin Larsson
ebd13c63e8 Avoid multiple errors when initiating plyr without 'settings' in controls 2017-09-27 05:09:56 +02:00
Albin Larsson
ec091266aa Prevent buttons from submitting form 2017-09-27 02:34:23 +02:00
Sam Potts
ad105877ed Merge pull request #667 from friday/fix/caption-feature-detection
Fix 'TypeError: Cannot read property 'kind' of null' in captions feat…
2017-09-27 10:03:25 +10:00
Albin Larsson
c84f666b55 Fix 'TypeError: Cannot read property 'kind' of null' in captions feature detection if video lacks captions 2017-09-27 00:24:54 +02:00
J
72412d26a5 Update plyr.less 2017-09-09 13:31:39 +02:00
J
bf02c69daa Enable start/stop toggle on whole element
Related to issue https://github.com/sampotts/plyr/issues/587
2017-09-09 13:25:22 +02:00
Sam Potts
2bba1f30e2 Fixing Vimeo captions, WIP on settings menu, prettier and VS code settings 2017-09-03 14:36:55 +10:00
Walter Cruz
01f50f03f1 dding title to the player html template (build) 2017-08-28 10:32:56 -03:00
Walter Cruz
f50f0eb63d Adding title to the player html template 2017-08-28 10:19:29 -03:00
Sam Potts
2196665495 Cleanup 2017-08-16 13:30:27 +10:00
Sam Potts
0148c76c30 ESLint, comments, quality and speed menus 2017-08-16 00:36:23 +10:00
Sam Potts
3fe0c7c84b Update readme.md 2017-08-13 21:07:22 +10:00
Sam Potts
18b2cbb2e9 Small tweak 2017-08-13 13:54:16 +10:00
Sam Potts
f6a7555a1d Work on quality control 2017-08-06 21:00:31 +10:00
Sam Potts
f7144dc0cb Fix bug when switching sources 2017-08-06 13:42:37 +10:00
Sam Potts
a9957211f4 Work on playback rate changes 2017-07-31 09:58:30 +10:00
Sam Potts
7b60e473fa Small tweaks 2017-07-23 21:13:11 +10:00
Oliver
b114a6f42e [bugfix] target is null exception
when using 'play-large' without a 'play' button, the statement target = target[0]; caused an error. So it is necessary to check the value of target before accessing [0]
2017-07-12 22:17:25 +02:00
Sam Potts
dfc516baf6 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-07-09 17:17:26 +10:00
Sam Potts
b0d3bcd15a Notes 2017-07-09 17:17:21 +10:00
Sam Potts
03c3960e93 Tweaks 2017-07-09 17:14:42 +10:00
versfx
d0ceefe827 Gulp build 2017-07-06 23:41:34 -04:00
versfx
e756664750 Fix for https://github.com/sampotts/plyr/issues/601 2017-07-06 23:28:31 -04:00
Sam Potts
21f444ed61 Tweaks 2017-06-12 09:26:01 +07:00
Sam Potts
40b4f8e840 Tweaks 2017-06-04 22:39:21 +10:00
Sam Potts
bc61dac4c5 Tidy up, fixing destroy 2017-06-04 18:30:37 +10:00
Sam Potts
3605989226 Warning 2017-06-04 15:51:37 +10:00
Sam Potts
a49d77afab Source change fix 2017-06-04 15:50:47 +10:00
Sam Potts
7daa08c32f Change to proper constructor + prototypes 2017-06-04 15:27:37 +10:00
Sam Potts
aaab9ad082 Seperated reduce motion check 2017-05-22 09:07:14 +10:00
Sam Potts
86c9004183 More work on the menu 2017-05-22 08:55:45 +10:00
Sam Potts
857dfe838c Menu toggle 2017-05-21 17:50:07 +10:00
Sam Potts
6828bc00f8 Delete notes.md 2017-05-16 10:31:07 +10:00
Sam Potts
e1a19faf26 URL updates 2017-05-16 10:20:58 +10:00
Sam Potts
e95c81cc5b Update bower.json 2017-05-16 10:17:57 +10:00
Sam Potts
f3bda17fa0 Merge branch 'master' into develop
# Conflicts:
#	demo/dist/demo.js
#	demo/src/js/main.js
#	dist/plyr.js
#	notes.md
#	src/js/plyr.js
2017-05-16 10:17:04 +10:00
Sam Potts
c0eee58732 Plugin versions 2017-05-16 10:14:01 +10:00
Sam Potts
bcf88cd024 Vimeo demo bug fix + repo move 2017-05-16 10:08:59 +10:00
Sam Potts
966c3d875d Single instance only 2017-05-16 09:58:53 +10:00
Sam Potts
fe9383bed5 Cleanup 2017-05-09 21:30:09 +10:00
Sam Potts
2c31770030 Update notes 2017-05-09 00:20:22 +10:00
Sam Potts
8d3e160166 Adding support for playsinline 2017-05-09 00:18:19 +10:00
Sam Potts
408cfe5b97 Added support for passive event listeners 2017-05-08 23:07:19 +10:00
Sam Potts
279fee3595 Bug fixes 2017-05-07 20:17:36 +10:00
Sam Potts
28dddfcff2 Vimeo captions working 2017-05-07 20:07:08 +10:00
Sam Potts
9e2580ec6a Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
2017-05-07 19:04:05 +10:00
Sam Potts
aba5a9dc0e Utils object, work on Vimeo captions 2017-05-07 19:03:48 +10:00
Brandon Pereira
d27a0b3855 updated to check for global namespace 2017-05-01 16:53:54 -06:00
Brandon Pereira
a575aa25ac fix for svg4everybody conflicting with plyr 2017-05-01 15:50:54 -06:00
Sam Potts
9999828505 Merge pull request #574 from mapmelabs/youtube-loop
Implement loop in YouTube
2017-04-28 13:12:31 +10:00
Alejandro Iglesias
b04301c211 Implement loop in YouTube 2017-04-27 11:53:53 -03:00
Sam Potts
97157efcfa More work on Vimeo captions 2017-04-26 00:24:42 +10:00
Sam Potts
3756476809 Merge branch 'develop' of github.com:Selz/plyr into develop 2017-04-25 22:39:21 +10:00
Sam Potts
b3d798eeee Gulp tweak 2017-04-25 22:39:14 +10:00
Sam Potts
b499622eb8 Started on Vimeo captions 2017-04-25 20:45:25 +10:00
Sam Potts
04b8d0bac8 Tweaks 2017-04-25 19:31:34 +10:00
Sam Potts
8ea4cbd942 Tidy up 2017-04-25 18:43:09 +10:00
Sam Potts
7889ae1126 Built JS 2017-04-25 18:37:56 +10:00
Sam Potts
897d49ad87 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-04-25 18:37:36 +10:00
Sam Potts
1960d35d8b More work on menus and tidy up 2017-04-25 18:37:31 +10:00
Sam Potts
0b7d0dedf6 Merge pull request #545 from silverwind/blank-mp4
Add blank.mp4 to dist files
2017-04-25 12:40:20 +10:00
Sam Potts
948e2cc66c Merge branch 'develop' into blank-mp4 2017-04-25 12:40:13 +10:00
Sam Potts
396b816a1f Merge pull request #563 from stormrockwell/master
removed vimeo id parsing because it is not necessary
2017-04-25 12:37:43 +10:00
Sam Potts
0a58cbfd59 Merge branch 'develop' into master 2017-04-25 12:37:35 +10:00
Sam Potts
bbe4b7e565 Notes 2017-04-22 14:55:03 +10:00
stormrockwell
2ecca2cbe3 removed vimeo id parsing because it is not necessary 2017-04-19 15:16:03 -04:00
Sam Potts
f5d80fa888 Notes 2017-04-19 22:40:32 +10:00
Sam Potts
f2bbe4eb12 Looping menu (WIP) 2017-04-19 22:34:52 +10:00
Sam Potts
60e51b7077 Added notes 2017-04-19 21:33:23 +10:00
Sam Potts
01d1ac9ab9 Toggle menu 2017-04-17 21:05:35 +10:00
Sam Potts
9b2396f5ff Airplay and PiP 2017-04-17 01:28:52 +10:00
Sam Potts
da15980b8a ID fix and styling fix 2017-04-17 00:32:41 +10:00
Sam Potts
452678867f More work on menus 2017-04-16 20:38:45 +10:00
Sam Potts
ff2d27f8e5 Cleanup events and references 2017-04-16 13:00:57 +10:00
Sam Potts
546cdaad92 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
2017-04-15 23:22:35 +10:00
Sam Potts
5d38497f07 Formatting 2017-04-15 23:22:14 +10:00
Sam Potts
808a3af3cf Formatting 2017-04-15 23:21:18 +10:00
Sam Potts
889712761a Merge branch 'develop' of github.com:Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	src/js/plyr.js
2017-03-29 09:05:25 +11:00
Sam Potts
46fab972a0 Namespacing 2017-03-29 09:03:33 +11:00
Sam Potts
535c046b62 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	src/js/plyr.js
2017-03-28 09:30:37 +11:00
Sam Potts
55dfab8394 Tweaks 2017-03-28 09:19:58 +11:00
Sam Potts
18bf4d84b9 Menu creation (WIP) 2017-03-28 00:12:33 +11:00
Sam Potts
ef1d73df15 Controls rewrite 2017-03-27 00:25:41 +11:00
Sam Potts
684107da5c WIP on new controls creation 2017-03-26 21:32:41 +11:00
silverwind
2a97a9a9c5 Add blank.mp4 to dist files
For a complete "offline" experience, it's necessary to self-host the
file, so include it in the dist files for that purpose.
2017-03-25 10:58:36 +01:00
Sam Potts
ca12343b16 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-03-25 18:44:17 +11:00
Sam Potts
a974fbf31c Notes 2017-03-25 18:44:10 +11:00
Sam Potts
6eaf33ec6c Merge pull request #520 from platformpurple/feature/subtitles
Feature/subtitles
2017-03-25 18:43:45 +11:00
Sam Potts
33fef7faee Merge branch 'develop' into feature/subtitles 2017-03-25 18:43:36 +11:00
Sam Potts
b083bf4297 Merge branch 'master' into develop
# Conflicts:
#	dist/plyr.css
#	dist/plyr.js
#	src/js/plyr.js
#	src/less/plyr.less
#	src/scss/plyr.scss
2017-03-25 11:24:38 +11:00
Sam Potts
4957e4d80c Version bump to 2.0.12 2017-03-25 10:58:41 +11:00
Sam Potts
605f8a8249 Changelog update 2017-03-25 10:57:52 +11:00
Sam Potts
7490a7e7f3 Merge pull request #468 from jronallo/captions-listener
allow for setting additional listener for captions
2017-03-25 10:51:54 +11:00
Sam Potts
f32527feb4 Merge pull request #504 from ShimShamSam/master
Add blankUrl option to set the URL for blank.mp4
2017-03-25 10:50:55 +11:00
Sam Potts
ebc7ed538a Manual merge of #509 2017-03-25 10:49:04 +11:00
Sam Potts
a60868bfe8 Clean up 2017-03-25 10:47:37 +11:00
Sam Potts
4a2866d05f Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
2017-03-25 10:37:21 +11:00
Sam Potts
1a05f352c7 Code formatting 2017-03-25 10:37:00 +11:00
Sam Potts
ba27de0669 Merge pull request #510 from platformpurple/feature/loop-events
Added key bindings for loop
2017-03-25 10:35:15 +11:00
Sam Potts
e21e7054ce Merge branch 'develop' into feature/loop-events 2017-03-25 10:35:08 +11:00
Sam Potts
bc323e905c Manual merge of #543 PR 2017-03-25 10:27:03 +11:00
Sam Potts
afa1fe9d5f Merge pull request #514 from platformpurple/improvement/loop-color-area
Improvement/loop color area
2017-03-25 10:22:10 +11:00
Sam Potts
2444efc834 Merge branch 'develop' into improvement/loop-color-area 2017-03-25 10:22:02 +11:00
Sam Potts
7b6257ff20 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
2017-03-25 10:09:14 +11:00
Sam Potts
13973125fb Loop variable naming 2017-03-25 10:08:39 +11:00
Sam Potts
ddf9104349 Merge pull request #511 from platformpurple/develop
Fix on typo
2017-03-25 10:07:07 +11:00
Marios Tasos
47b53fffb4 remove commented out code 2017-03-24 17:29:48 +02:00
Marios Tasos
9ba3753f80 toggle quality options 2017-03-24 17:25:09 +02:00
Marios Tasos
a353194fe1 make config.captions.selectedIndex number 2017-03-22 15:50:56 +02:00
Marios Tasos
c205c47509 set captionExists to true if selectedIndex is bigger than capt source 2017-03-22 13:38:08 +02:00
Marios Tasos
9c867edfbc fix data typo in language button 2017-03-18 01:59:20 +02:00
Marios Tasos
9919d80782 check if captions exists 2017-03-15 17:18:34 +02:00
Sam Potts
a971850d26 Update readme.md 2017-03-09 15:35:29 +11:00
Chrysa Papadopoulou
8464ffe6ad Conflicts and tracks array on config 2017-02-24 16:38:00 +02:00
Chrysa Papadopoulou
6537225c61 Subtitles tracks 2017-02-24 16:32:17 +02:00
Chrysa Papadopoulou
dcbf59bd89 Colored strip indicating looped area 2017-02-15 17:41:04 +02:00
Chrysa Papadopoulou
21d478d396 Add looping key bindings to allowed array 2017-02-14 17:15:27 +02:00
Chrysa Papadopoulou
054c243416 Fix on typo and gulp 2017-02-14 16:44:29 +02:00
Chrysa Papadopoulou
d57e453541 Fix on typo 2017-02-14 16:42:40 +02:00
Chrysa Papadopoulou
3f45ef4908 Removed console 2017-02-14 16:29:05 +02:00
Chrysa Papadopoulou
1fd742464d Added key bindings for loop 2017-02-14 16:04:58 +02:00
Samuel Hodge
382397407f Generated dist files 2017-02-12 00:15:21 -05:00
Samuel Hodge
82809235b9 Documented the blankUrl option 2017-02-11 23:59:14 -05:00
Samuel Hodge
7d5c507f16 Allow configuration of the blank.mp4 URL
This is useful for people behind firewalls who need to host a blank mp4 themselves.
2017-02-11 23:50:49 -05:00
Sam Potts
bc139f16a7 Update readme.md 2017-02-10 11:21:20 +11:00
Sam Potts
f6f3284dc5 Update readme.md 2017-02-10 11:19:37 +11:00
Sam Potts
f4d2f1856f Update readme.md 2017-02-09 23:38:52 +11:00
Sam Potts
871e19ed92 Update readme.md 2017-02-09 23:37:29 +11:00
Sam Potts
9c599884a8 Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	src/js/plyr.js
2017-02-05 11:36:53 +11:00
Sam Potts
cbef45841c Menu work 2017-02-05 11:34:33 +11:00
Sam Potts
96d9f302c2 Merge pull request #490 from platformpurple/develop
Playback speed and looping controls
2017-02-05 11:31:58 +11:00
Chrysa Papadopoulou
afcdf17a72 Removed not needed functions + reverted demo.js to previous 2017-02-03 14:52:38 +02:00
Chrysa Papadopoulou
1bcdbe4c00 Refactored loop event buttons + on 'No Loop' cleared displayed timing 2017-02-02 11:38:08 +02:00
Chrysa Papadopoulou
45c0ded88c Loop functionality 2017-02-01 19:16:39 +02:00
Chrysa Papadopoulou
ea30ad9494 Playback speed control settings 2017-01-31 17:21:33 +02:00
Sam Potts
7608615702 Merge branch 'develop' of https://github.com/Selz/plyr into develop 2017-01-11 20:14:48 +11:00
Sam Potts
cc5f37392f ToDo notes, code tidy up 2017-01-11 20:14:41 +11:00
Sam Potts
413fcbcb8c Merge branch 'develop' of github.com:Selz/plyr into develop
# Conflicts:
#	dist/plyr.js
#	src/js/plyr.js
2017-01-10 21:47:49 +11:00
Sam Potts
c49d0a99e4 JsBeautifier 2017-01-10 21:43:28 +11:00
Sam Potts
5a0cb9289c JsBeautifier in use, syntax tweaks 2017-01-10 20:22:18 +11:00
Sam Potts
72998c4c41 Merge pull request #437 from tv2/playground
Fixed typo
2017-01-10 20:21:01 +11:00
Sam Potts
da48be495b Merge pull request #477 from iamrobert/patch-1
Update index.html
2017-01-10 14:51:40 +11:00
Robert Stark
c843ed3460 Update index.html
Just missing the closing </li>
2017-01-10 11:50:26 +08:00
Sam Potts
4232aa9ea4 Update issue_template.md 2017-01-10 09:47:46 +11:00
Sam Potts
f6612fa78c Update issue_template.md 2017-01-10 09:45:41 +11:00
Sam Potts
bce1d983cb Merge pull request #457 from amowu/patch-3
fix: Firefox can not display captions
2017-01-04 08:45:40 +11:00
Sam Potts
047fc43f8f Merge pull request #458 from amowu/patch-4
fix: parse webVTT time NaN
2017-01-04 08:45:06 +11:00
Jason Ronallo
96ae866baa allow for setting additional listener for captions 2016-12-26 17:06:59 -05:00
Amo Wu
0cbfc9252c fix: parse webVTT time NaN 2016-12-16 14:32:04 +08:00
Amo Wu
d02e57bdb3 fix: Firefox can not display captions 2016-12-15 16:38:46 +08:00
Morten Vestergaard Hansen
a1d5bccac2 Fixed typo 2016-11-30 08:54:24 +01:00
Sam Potts
a9bb8afca4 v2.0.11 2016-11-27 20:18:30 +11:00
Sam Potts
28cd92b708 Merge branch 'master' of https://github.com/Selz/plyr 2016-11-27 20:15:19 +11:00
Sam Potts
a44c7ecc3a Fix for iPad and YouTube issues 2016-11-27 20:15:15 +11:00
Sam Potts
663c1fb627 Merge pull request #427 from amowu/patch-2
Fix cannot scroll after destroyed
2016-11-27 20:09:49 +11:00
Amo Wu
a7969b8e9e Fix cannot scroll after destroyed
In single page application, switch router when plyr is fullscreen mode, page cannot scroll, because `document.body.style.overflow` is `hidden`
2016-11-24 11:21:43 +08:00
Sam Potts
4ca3f030cc Merge pull request #419 from amowu/patch-1
refactor: miss prefix
2016-11-18 09:48:40 +11:00
Sam Potts
5214c5d55d Merge pull request #425 from sebastiancarlsson/cleanup-called-twice-bug
fixes bug where cleanUp would be called twice
2016-11-18 09:40:34 +11:00
Sebastian Carlsson
3e6ed7b69b fixes bug where cleanUp would be called twice 2016-11-17 15:43:26 +01:00
Sam Potts
7d2a8d343a Update 2016-11-16 09:41:06 +11:00
Sam Potts
03aacf483f Update readme.md 2016-11-16 09:40:09 +11:00
Amo Wu
02bc8c8445 refactor: miss prefix
fix _fullscreen.prefix can't work
2016-11-10 16:27:10 +08:00
Sam Potts
7965b82cca Quality WIP 2016-11-06 21:47:44 +11:00
Sam Potts
bae04a492a Merge branch 'master' into develop
# Conflicts:
#	demo/index.html
#	dist/plyr.js
2016-11-06 15:55:55 +11:00
Sam Potts
73a1391f2f Update readme.md 2016-11-02 18:45:37 +11:00
Sam Potts
660ff0434d Cache bust 2016-11-02 18:29:38 +11:00
Sam Potts
94208dce76 v2.0.10
- Added seek event fixes for Vimeo and YouTube (fixes #409)
- Added support for embed URLs rather than ID only (fixes #345)
2016-11-02 18:14:06 +11:00
Sam Potts
efe54fbba4 Added seek event fixes (fixes #409), Added support for URLs (fixes #345) 2016-11-02 18:09:40 +11:00
Sam Potts
10561d6c83 Merge pull request #408 from gurupras/urlparser
Added logic to parse youtube video id
2016-11-02 16:59:28 +11:00
Sam Potts
72404e77e5 PiP 2016-11-01 12:00:16 +11:00
Guru Prasad Srinivasa
0ef87f93a6 Added logic to parse youtube video id
This commit is targetted at solving issue#345 and adds
    functionality to parse youtube video IDs from various
    types of youtube video URLs.

    Other embed types like vimeo/soundcloud can be extended by
    following a similar structure as implemented in this commit.
2016-10-30 00:49:17 -04:00
Sam
c7310c21fb Fullscreen fix, styling 2016-10-24 00:11:47 +11:00
Sam
ed9e27b64f Merge branch 'develop' of https://github.com/Selz/plyr into develop 2016-10-23 21:42:18 +11:00
Sam Potts
801ed63be5 Work on PiP 2016-10-23 21:21:42 +11:00
Sam
2aa9b267ab Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	src/js/plyr.js
2016-10-23 21:16:49 +11:00
Sam
90338d9600 Tweaks 2016-10-23 21:15:19 +11:00
Sam Potts
5cecf16d4f Merge branch 'master' into develop
# Conflicts:
#	demo/dist/demo.js
#	dist/plyr.css
#	dist/plyr.js
2016-10-23 15:27:28 +11:00
Sam Potts
a3ed309342 v2.0.9
- Temporary patch for the YouTube API issues with `getDuration()` (relates to #374)
2016-10-23 15:18:53 +11:00
Sam Potts
08b4c09b89 Temporary patch for the YouTube API issues with getDuration() (relates to #374) 2016-10-23 15:18:08 +11:00
Sam Potts
a509a5e1bc v2.0.8
- Added `isPaused()` API method (thanks to @darrena092)
- Allowed `.on()` API method to be chainable (thanks to @gurupras) (fixes #357)
- Improved the "awful" rendering of captions on small screens in fullscreen mode (fixes #390)
- Fix for Firefox VTT compatibility (thanks to @magourex)
- Fix for Firefox Developer Edition blank video due to `-webkit-mask-image` issue (fixes #392)
- Added Issue and PR templates with the aim of reducing duplicate or duff issues
2016-10-23 13:48:05 +11:00
Sam Potts
bec10e7836 Fix for caption size (fixes #390), Fix for Firefox Dev (fixes #392) 2016-10-23 13:35:49 +11:00
Sam Potts
f9a184800b Add Issue and PR templates 2016-10-23 13:34:44 +11:00
Sam Potts
f428c3ff8b Manually merged #395 2016-10-23 12:19:39 +11:00
Sam Potts
97eb40a8e3 Merge pull request #389 from darrena092/master
Added .isPaused().
2016-10-23 11:51:10 +11:00
Darren Anderson
8211631950 Gulp build done. 2016-10-06 15:43:41 +01:00
Darren Anderson
a17cbb0e8b Added .isPaused to API 2016-10-06 15:33:49 +01:00
Sam Potts
21a30f1b6f Fixed for array passed to _on and _off 2016-10-03 17:16:05 +11:00
Sam
613c45ede9 Merge branch 'master' into develop 2016-10-01 22:18:40 +10:00
Sam
8743c6a08d Code style 2016-10-01 22:18:01 +10:00
Sam Potts
8098be6f93 Merge pull request #379 from magourex/master
Support WebVTT with CRLF or LF Line separator with firefox #378
2016-10-01 22:10:35 +10:00
Sam
eba0831538 Manually merged #385 2016-10-01 22:07:01 +10:00
Thomas LM
1c73c9fbfe Update plyr.js 2016-09-27 10:57:35 +02:00
Sam
1ad103c29f Menu animation 2016-09-26 23:21:57 +10:00
Sam
ca37b4c9ac Menu 2016-09-25 23:54:49 +10:00
Sam Potts
d3bbf09d12 More menu work 2016-09-25 20:01:58 +10:00
Sam Potts
f608317eec Merge branch 'develop' of https://github.com/Selz/plyr into develop
# Conflicts:
#	dist/plyr.css
#	dist/plyr.js
2016-09-14 15:22:41 +10:00
Sam Potts
c8b9c9bcaa Expanded 2016-09-13 23:52:25 +10:00
Sam
d638cdcdd3 Started on PIP support 2016-09-13 00:16:27 +10:00
Sam Potts
46f82a4af3 Added quality in menu 2016-09-07 22:18:05 +10:00
Sam Potts
978606edb4 CSS path 2016-09-06 23:54:04 +10:00
Sam
42a2642d40 Icon fix 2016-09-06 23:50:59 +10:00
Sam
37840c3844 Working on settings menu 2016-09-06 23:48:09 +10:00
Sam Potts
28335ef3d8 Merge pull request #356 from amowu/feature/add-playback-speed
Add playback speed
2016-09-06 20:46:00 +10:00
Amo Wu
78ec5b3322 refactor: sorting speed 2016-09-05 22:56:19 +08:00
Amo Wu
ac7e1ab299 test: add speed-up button 2016-09-05 18:00:11 +08:00
Amo Wu
ea60fd0f45 docs: update readme 2016-08-31 17:18:44 +08:00
Amo Wu
c291e8c5d9 refactor: check config.speeds format 2016-08-31 15:42:01 +08:00
Amo Wu
f0ac542a7f refactor: add localStorage supporting 2016-08-31 15:34:44 +08:00
Amo Wu
a412085785 feat: add playback speed button 2016-08-31 15:11:29 +08:00
Sam
435b5c74bf Fixed API method, added new methods (fixes #346, #351)
- Fixed `getCurrentTime()` method (fixes #351)
- Added `getVolume()` , `isMuted()` and `getDuration()` API methods (fixes #346)
2016-08-29 23:36:43 +10:00
Sam
15fd7041ab Fixed AMD definition 2016-08-26 21:43:51 +10:00
Sam Potts
1ced6b4d67 Vimeo IE9/10 (Fixes #348), HTML5 ready event (Fixes #349) 2016-08-26 18:15:24 +10:00
Sam
6694c1e6cf Fix for Firefox full screen (fixes #343) 2016-08-23 00:34:43 +10:00
Sam Potts
19ca906e50 Update changelog.md 2016-08-22 20:41:49 +10:00
Sam Potts
12e94775d6 Global keyboard shortcut changes 2016-08-22 14:44:18 +10:00
Sam Potts
df7f52d885 Added ‘global’ keyboard shortcut option 2016-08-22 14:15:49 +10:00
Sam Potts
d5b5faafbb Version bump for NPM 2016-08-22 13:08:19 +10:00
Sam Potts
a318e8588b Merge branch 'master' of https://github.com/Selz/plyr 2016-08-22 13:07:07 +10:00
Sam Potts
51fb252cd8 Update changelog.md 2016-08-22 13:06:26 +10:00
Sam Potts
86b2f61b56 Bump to v2.0.0 2016-08-22 13:00:47 +10:00
Sam Potts
232a9fe868 Update changelog.md 2016-08-22 12:53:38 +10:00
Sam Potts
e8bfe73b1d Update readme.md 2016-08-22 08:40:02 +10:00
Sam Potts
ab0d762675 Update readme.md 2016-08-21 22:46:11 +10:00
Sam Potts
a6a314e011 Update readme.md 2016-08-21 21:53:16 +10:00
Sam Potts
514bdff92e Update readme.md 2016-08-21 21:53:02 +10:00
Sam Potts
745e56a3a3 Update readme.md 2016-08-21 21:40:24 +10:00
Sam Potts
130fb78b4c Version bump 2016-08-21 19:47:13 +10:00
Sam Potts
3718ec69ba Use minified 2016-08-21 19:45:45 +10:00
Sam Potts
4610f4a8c9 Firefox and Edge fixes 2016-08-21 19:44:46 +10:00
Sam Potts
a8062354ec Loading tweaks, Microsoft Edge tweaks 2016-08-21 19:25:21 +10:00
Sam
aac0a5a3a9 Work on docs 2016-08-21 10:30:11 +10:00
Sam
92b9e3400b Keyboard shortcuts 2016-08-20 23:39:18 +10:00
Sam
bea513f5dd Jshint tweaks, changelog 2016-08-20 20:11:21 +10:00
Sam Potts
9d109bf02d Refactoring and bug fixing 2016-08-20 18:02:02 +10:00
Sam Potts
fc45ab48c9 Merge branch 'master' into develop
# Conflicts:
#	src/js/plyr.js
2016-08-20 17:46:05 +10:00
Sam Potts
58e9b02405 Merge 2016-08-06 11:09:55 +10:00
Sam Potts
b578fb4840 Merge branch 'master' of https://github.com/Selz/plyr 2016-08-06 11:08:33 +10:00
Sam Potts
f18d9589eb Font stack SASS fix (Fixes #328) 2016-08-06 11:08:28 +10:00
Sam Potts
35c6ec9461 Manually merged #313 PR 2016-08-06 11:08:04 +10:00
Sam Potts
56d9730d0a Merge pull request #326 from mkaziz/master
Updated define to work with AMD imports
2016-08-06 10:15:53 +10:00
Khalid Aziz
6e18bc8b31 Updated define to work with AMD imports 2016-08-04 02:05:12 -05:00
Sam Potts
81756a1af9 Merge pull request #322 from mortonfox/patch-1
Fix the Initialising and Options anchor links
2016-07-30 14:10:34 +10:00
Morton Fox
05e1ab1165 Fix the Initialising and Options anchor links 2016-07-30 00:09:39 -04:00
Sam Potts
a0ddc5e6eb Merge pull request #321 from electerious/patch-1
Added Array as selector in .setup() to readme
2016-07-25 08:53:29 +10:00
Tobias Reich
dc40b1f93a Added Array as selector in .setup() to readme
Documentation for #319
2016-07-24 20:52:20 +02:00
Sam Potts
d7cc29f2fb Vimeo keyboard focus fix (Fixes #317), Fix for Vimeo on basic support devices 2016-07-23 11:11:17 +10:00
Sam Potts
0505e49038 Vimeo API upgrade, YouTube Bugfix, Array support
- Vimeo API upgrade
- Fix for YouTube bug introduced in v1.8.9 (Fixes #320)
- Added support for passing array to .setup() (Fixes #319)
2016-07-23 10:42:06 +10:00
Sam Potts
6ff1e47341 Merge branch 'master' of https://github.com/Selz/plyr 2016-07-21 21:59:26 +10:00
Sam Potts
e72a91de6e Fix for seek issues introduced in v1.8.9 2016-07-21 21:59:16 +10:00
Sam Potts
52ec4c012d Update readme.md 2016-07-21 21:32:56 +10:00
Sam Potts
ae89c92ab6 Update readme.md 2016-07-21 21:31:09 +10:00
Sam Potts
57ad124ce8 v1.8.9 2016-07-21 21:25:27 +10:00
Sam Potts
a85d45d2e5 Fix for fullscreen not being defined (Fixes #295) 2016-07-21 21:21:10 +10:00
Sam Potts
a6f57fc034 Fix for multiline captions (Fixes #314) 2016-07-21 21:15:44 +10:00
Sam Potts
04c9653b86 Merge branch 'master' of https://github.com/Selz/plyr 2016-07-21 21:14:29 +10:00
Sam Potts
b8cdc71001 Clean up of type checks and fix for _restart() (Fixes #315) 2016-07-21 21:14:22 +10:00
Sam Potts
277ebf0fd1 Merge pull request #312 from dpschen/patch-1
Add kirby-plyrtag
2016-07-14 22:03:50 +10:00
Dominik Pschenitschni
7682d998e7 Add kirby-plyrtag
Added a Kirby cms kirbytag https://getkirby.com/
2016-07-14 12:52:28 +02:00
Sam Potts
05b9b9a831 Fix for MEDIA_ERR_SRC_NOT_SUPPORTED when calling .source() API method 2016-07-14 17:13:37 +10:00
Sam Potts
eee699cec6 Version bump 2016-07-10 20:59:42 +10:00
Sam Potts
3c9e9862d8 Added getCurrentTime API method (fixes #292) 2016-07-10 20:58:19 +10:00
Sam Potts
39dc651a9d Fix for !hideControls on touch devices (fixes #303) 2016-07-10 20:50:55 +10:00
Sam Potts
4effda125a Merge branch 'master' of https://github.com/Selz/plyr 2016-07-10 20:45:58 +10:00
Sam Potts
bf9de231d8 Styling minor tweaks 2016-07-10 20:45:54 +10:00
Sam Potts
ef12332505 Update readme.md 2016-06-29 16:23:38 +10:00
Sam Potts
1b735f1727 Update readme.md 2016-06-26 22:21:19 +10:00
Sam Potts
7f7ecf852e Line height fix 2016-06-26 09:07:42 +10:00
Sam Potts
931672895f Reverted font size change 2016-06-26 09:04:38 +10:00
Sam Potts
0952bc8239 Built JS 2016-06-26 08:45:06 +10:00
Sam Potts
7e7508ca82 Fixed overflow issues (fixes #286) 2016-06-26 08:34:36 +10:00
Sam Potts
095d100ba4 Version bump 2016-06-25 23:47:30 +10:00
Sam Potts
c61fad51c1 Fix for z-index on large play button 2016-06-25 23:46:37 +10:00
Sam Potts
7b11c6803d Merge pull request #283 from arrowthemes/patch-1
Make the player button clickable on small videos
2016-06-25 17:44:07 +04:00
Sam Potts
9b75436380 v1.8.3
- Disabled iPad support for YouTube and Vimeo due to iOS limitations with iFrame playback
- Fixed IE11 icon loading (fixes #269)
- Updated screenshot (fixes #281)
- Added WordPress plugin (fixes #239)
- Added Neos plugin
- Added HLS, Shaka and dash.js examples (see #235 for more)
- Improvements for controls hiding and showing on touch devices
2016-06-25 23:39:00 +10:00
Sam Potts
be19b72719 Merge branch 'master' of https://github.com/Selz/plyr
# Conflicts:
#	dist/plyr.css
#	src/less/plyr.less
#	src/scss/plyr.scss
2016-06-25 22:35:04 +10:00
Sam Potts
2fdcc18356 Hide Shadow DOM elements 2016-06-25 22:33:23 +10:00
Sam Potts
6425a33ccd Merge pull request #284 from Integer64/develop
fix name svg
2016-06-22 19:10:48 +01:00
Integer64
12c5dbd290 fix name svg 2016-06-23 01:56:14 +08:00
Joel Mbugua
cb591dac0c Make the player button clickable on small videos
If you set the plyr video to width of 300px, the plyr__controls overlays the play centered play button such that you can't click on the play button. Adding a z-index on the plyr .plyr__play-large fixes that.
2016-06-21 21:59:00 +03:00
Sam Potts
4c1cdea56e Merge pull request #275 from wilsonmsalberto/master
Prevent error when verifying if play buttons exist
2016-06-13 18:49:20 +01:00
Wilson Alberto
80cfabbaf9 Prevent error when verifying if play buttons exist 2016-06-13 17:01:46 +01:00
Sam
c7d28b09c0 Fixed event bubbling 2016-06-09 11:05:07 +01:00
Sam
161dd48312 Fixed log message 2016-06-09 09:57:16 +01:00
Sam
383515c1b7 Merge branch 'master' of https://github.com/Selz/plyr 2016-06-09 09:49:09 +01:00
Sam
98792168e4 Changes to setup return value, SVG bug fix (fixes #269) 2016-06-09 09:49:01 +01:00
Sam Potts
01437a4a38 Merge pull request #271 from thegrammarnazi/patch-3
correct grammar
2016-06-09 09:46:49 +01:00
Grammar Nazi
03ed86f5c2 correct grammar 2016-06-09 01:39:52 -05:00
Sam
1a745e1eaa Merge branch 'master' of https://github.com/Selz/plyr 2016-06-07 12:34:40 +01:00
Sam
70646ca907 See changelog (fixes #265, #253, #257) 2016-06-07 12:34:36 +01:00
Sam Potts
af774b6f02 Merge pull request #260 from cytec/fix-control-icon-size
use $plyr-control-icon-size in sass file
2016-06-02 10:41:36 +01:00
cytec
7a9eac093a use $plyr-control-icon-size in sass file 2016-06-02 11:40:09 +02:00
Sam
4afd311ef6 Version bump 2016-06-02 10:19:35 +01:00
Sam
7eec6c6739 Fix for multiple sprites being requested (fixes #259) 2016-06-02 10:18:33 +01:00
Sam
521431e093 Fix for scroll direction on volume (fixes #258) 2016-06-01 09:38:29 +01:00
Sam Potts
24bc415faf Merge pull request #256 from MrSnowflake/develop
In specific cases Plyr fails to initiate YT: YT.Player is not a constructor
2016-05-31 08:26:53 +01:00
Sam
552f448ccd Seek rounding from 1 to 4 decimal places (fixes #242) 2016-05-30 07:41:17 +01:00
MrSnowflake
152e94f229 Improved YT initialized check.
Added an extra check to see wether YT API has been initialized. The current check is inadequate as YT can be an object while the API still isn't completely initialized.
2016-05-30 00:35:07 +02:00
Sam Potts
cb318dd6ad Update readme.md 2016-05-27 08:42:11 +01:00
Sam
9ee0d00a35 Merge branch 'master' of https://github.com/Selz/plyr 2016-05-26 22:32:23 +01:00
Sam
c0909095e3 Added disableContextMenu option to hide the right click context menu (fixes #248 and #225) 2016-05-26 22:32:18 +01:00
Sam Potts
1e732694eb Merge pull request #246 from zvizvi/master
FIx Plyr to work with RTL systems
2016-05-26 08:03:40 +01:00
Tzvi
30922246e9 FIx Plyr to work with RTL systems 2016-05-26 03:35:08 +03:00
Tzvi
edf5a14171 FIx Plyr to work with RTL systems
(less)
2016-05-26 03:33:05 +03:00
Tzvi
1c9f7901bc FIx Plyr to work with RTL systems
(scss)
2016-05-26 03:32:22 +03:00
Sam Potts
1bd6ffc84d Merge pull request #237 from itaditya/master
Update readme.md
2016-05-25 19:13:13 +01:00
Sam Potts
845ed000fc Merge pull request #244 from thijstriemstra/patch-1
reference unminified js script
2016-05-25 19:12:05 +01:00
Thijs Triemstra
c7b2347ccd reference unminified js script
Reading the minified js script is impossible so reference the source version instead.
2016-05-25 19:41:12 +02:00
Sam Potts
a2f18c4e31 Merge pull request #241 from rabbitears/patch-1
Fix typo
2016-05-24 21:52:26 +01:00
louise louise
37c8948d2c Fix typo 2016-05-24 14:08:15 -04:00
Sam
351e1540c5 Version bump 2016-05-23 22:33:16 +01:00
Sam
b3299b4641 Fix for Tooltips overflowing (fixes #230) 2016-05-23 22:29:20 +01:00
Sam
be2e7d4c99 Always hide standard controls (Fixes #225) 2016-05-23 21:19:53 +01:00
Sam
7238eab737 Merge branch 'master' of https://github.com/Selz/plyr 2016-05-23 21:11:54 +01:00
Sam
3c2921b994 Restore scroll position when exiting fullscreen (fixes #236) 2016-05-23 21:11:43 +01:00
Sam Potts
179c6fca0b Update readme.md 2016-05-23 19:21:43 +01:00
Sam
69194915d4 Sprite loading improvements, touch controls
- SVG sprite loading automatically for an easier setup
- Touch devices now show controls on touch rather than pausing playback
2016-05-23 19:16:48 +01:00
Aditya Agarwal
341fd59cf6 Update readme.md 2016-05-23 21:34:57 +05:30
Aditya Agarwal
a6c8b7e506 Update readme.md
thang was a less common word , keeping it simple by using 'thing' is I think good , also there were SASS support so why not add that too.
2016-05-22 16:36:30 +05:30
Sam Potts
98e4c5acea Decreased sensitivity and inverted scroll on volume slider (scroll up to increase, down to decrease) 2016-05-19 12:06:51 +10:00
Sam Potts
1496b21c83 Version bump 2016-05-19 11:59:52 +10:00
Sam Potts
ac0061b83e Bug fix for no buffer 2016-05-19 11:56:24 +10:00
Sam Potts
0b7dc51bd1 Merge branch 'master' into develop
# Conflicts:
#	dist/plyr.css
#	dist/plyr.js
2016-05-19 11:32:14 +10:00
Sam Potts
126f80ed78 Reverted LESS structure for now 2016-05-19 11:31:27 +10:00
Sam Potts
e0ef7482c6 Merge pull request #227 from igoradamenko/scroll-on-volume-slider
Add scroll listener on volume slider
2016-05-19 10:43:22 +10:00
i.adamenko
6ffb971226 Add scroll listener on volume slider 2016-05-19 02:11:41 +03:00
Sam Potts
72187a89dd Update readme.md 2016-05-19 08:47:42 +10:00
Sam Potts
a461500ab9 Update readme.md 2016-05-17 12:38:52 +10:00
Sam Potts
c830af492c Merge pull request #216 from IonicaBizauKitchen/fix
Removed "Node Package Manager" in readme.md
2016-05-17 08:30:25 +10:00
Ionică Bizău
1f6f841fcb Removed "Node Package Manager" in readme.md
`npm` does not stand for "Node Package Manager" because `npm` is not an acronym. It is a bacronymic abbreviation for "npm is not an acronym".

https://www.quora.com/I-keep-hearing-NPM-doesnt-stand-for-Node-Package-Manager-what-does-it-stand-for
2016-05-16 17:59:37 +03:00
Sam Potts
99960c0dc5 Fix for Vimeo fullscreen (fixes #214) 2016-05-16 12:28:28 +10:00
Sam Potts
e8a8b08215 Merge branch 'master' of https://github.com/Selz/plyr 2016-05-16 12:15:15 +10:00
Sam Potts
a989e87a2d Changed icon prefix default to avoid clashes 2016-05-16 12:15:09 +10:00
Sam
0bceeb4674 Merge branch 'master' of https://github.com/Selz/plyr
# Conflicts:
#	dist/plyr.css
#	src/less/variables.less
2016-05-15 19:54:03 +10:00
Sam
5a433f2fc8 Remove unused styles 2016-05-15 19:52:55 +10:00
Sam Potts
c86b824a04 Comment 2016-05-15 18:59:13 +10:00
Sam Potts
21c2276359 Build changes, sprite.svg => plyr.svg 2016-05-15 18:57:21 +10:00
Sam Potts
602944ea4f Fix for bug in v1.6.7 2016-05-14 09:18:04 +10:00
Sam Potts
f4a9ffcec7 Merge branch 'master' of https://github.com/Selz/plyr 2016-05-14 08:57:07 +10:00
Sam Potts
d2e9c61fd7 iOS bug fixes (fixes #213) 2016-05-14 08:56:59 +10:00
Sam Potts
c8cd051a00 Update readme.md 2016-05-14 01:09:20 +10:00
Sam Potts
448c070898 Merge branch 'master' of https://github.com/Selz/plyr
# Conflicts:
#	dist/plyr.css
2016-05-14 00:48:56 +10:00
Sam Potts
7f624ebbb7 Icon tweaks, IE button fix 2016-05-14 00:48:21 +10:00
Sam
4a69ef3874 Merge branch 'master' into develop
# Conflicts:
#	dist/plyr.css
#	src/less/plyr.less
2016-05-11 22:47:27 +10:00
Sam Potts
31c933af38 Merge pull request #209 from robinpoort/master
Add CSS settings
2016-05-11 22:39:54 +10:00
Robin Poort
00137fe46b Compile css file 2016-05-11 13:46:47 +02:00
Robin Poort
b23a16826e Adding SCSS settings
- Added setting to be able to disable the border-box if you already defined that in your own css
- Added setting to be able to disable touch-action if you already defined that in your own css
- Added setting to choose not to use !important for sr-only class
2016-05-11 13:46:40 +02:00
Robin Poort
2a822d7b45 Adding LESS settings
- Added setting to be able to disable the border-box if you already defined that in your own css
- Added setting to be able to disable touch-action if you already defined that in your own css
- Added setting to choose not to use !important for sr-only class
2016-05-11 13:46:19 +02:00
Sam Potts
cc5b363d66 Version bump 2016-05-11 10:18:34 +10:00
Sam Potts
7e53f01d44 Fix for #206 2016-05-11 10:17:28 +10:00
Sam Potts
d351f9f172 Merge branch 'master' into develop
# Conflicts:
#	dist/plyr.css
#	src/less/plyr.less
2016-05-10 10:01:29 +10:00
Sam Potts
4d67d68c6b Built CSS 2016-05-10 09:35:45 +10:00
Sam Potts
3f20462943 Restore simplicity to LESS file structure 2016-05-10 09:35:19 +10:00
Sam Potts
ab26525f09 Merge pull request #204 from robinpoort/master
Broken progress bar styling IE10
2016-05-10 09:17:09 +10:00
Robin Poort
e431d7594b Fix broken progress bar styling IE10 2016-05-09 17:47:10 +02:00
Robin Poort
8b75bec3d2 Fix broken progress bar styling IE10 2016-05-09 17:40:14 +02:00
Robin Poort
1a5e56ed46 Fix broken progress bar styling IE10 2016-05-09 17:39:36 +02:00
Sam Potts
3470d5f5e6 Merge branch 'master' into develop
# Conflicts:
#	src/less/plyr.less
2016-05-09 19:11:57 +10:00
Sam Potts
9ff933e532 Merge pull request #202 from robinpoort/master
Removing duplicate selectors
2016-05-09 19:09:23 +10:00
Robin Poort
299dfe4afe Removing duplicate selectors 2016-05-06 12:37:18 +02:00
Robin Poort
6921070688 Removing duplicate selectors 2016-05-06 12:36:14 +02:00
Sam Potts
bb976ccf4b Merge pull request #200 from shakeelmohamed/feature/youtube-onstatuschange-event
Add event for YouTube onStateChange
2016-05-02 07:31:29 +10:00
Shakeel Mohamed
f02cb5635f Add event for YouTube onStateChange 2016-05-01 10:24:25 -07:00
Sam Potts
fad3f41ca7 Prep work for theming 2016-05-01 19:27:53 +10:00
Sam Potts
39a0a38d07 Bug fix for undefined progress bar 2016-05-01 15:04:09 +10:00
Sam Potts
a316514ca1 Minor bug fixes 2016-05-01 13:39:53 +10:00
Sam Potts
3b69f47590 v1.6.2 2016-05-01 12:52:07 +10:00
Sam Potts
8172e2339d Caption change position on controls hidden 2016-05-01 12:49:04 +10:00
Sam Potts
44bb6c077c Fixed merge 2016-05-01 12:00:37 +10:00
Sam Potts
e11a58a841 Bug fixes 2016-05-01 11:30:51 +10:00
Sam
c4e3b5a242 Bug fixes 2016-05-01 00:35:30 +10:00
Sam Potts
f1b44e6da0 Error handling 2016-04-30 19:52:10 +10:00
Sam Potts
aa093b6c42 Merge branch 'pr/196' into develop
# Conflicts:
#	dist/plyr.js
2016-04-30 11:08:42 +10:00
Sam
97870a7cdc Merge branch 'master' of https://github.com/Selz/plyr 2016-04-28 23:35:26 +10:00
Sam
9a6433488f Tooltip bug fixes 2016-04-28 23:35:18 +10:00
Sam Potts
993617f75f Remove badges (broken since GitHub caching changes) 2016-04-28 22:55:47 +10:00
Sam
e3baa43b22 Docs 2016-04-28 22:24:54 +10:00
Sam
7a332f29ea Typo 2016-04-28 22:22:32 +10:00
Sam
14c21422e7 URL fix 2016-04-28 22:21:03 +10:00
Sam
fe411b1ede Screenshot 2016-04-28 22:17:45 +10:00
Sam
4f02e2d6e7 Docs updates, small tweaks 2016-04-28 22:07:35 +10:00
Sam Potts
4719766843 Merge branch 'develop' of github.com:selz/plyr into develop
# Conflicts:
#	dist/plyr.css
2016-04-28 18:35:21 +10:00
Sam Potts
85600ef685 Max width on range progress indicators 2016-04-28 18:33:58 +10:00
Sam Potts
f7edd84125 Bug fixes 2016-04-28 13:57:01 +10:00
Sam Potts
27e3583fbc Merge branch 'develop' of github.com:selz/plyr into develop 2016-04-28 08:36:30 +10:00
Sam Potts
12d1a03bc4 Margins 2016-04-28 08:36:23 +10:00
Sam
d3028b9a03 iconUrl option 2016-04-28 00:14:20 +10:00
Sam Potts
2385291886 Volume fixes, iOS bug fixes 2016-04-27 22:47:03 +10:00
Sam Potts
cb0b22574a Input progress for volume, fixes for playback progress 2016-04-27 22:22:17 +10:00
Sam Potts
4a1adf92e2 Color 2016-04-27 08:46:36 +10:00
Sam Potts
b077bb9f5f Docs tweaks 2016-04-27 00:34:44 +10:00
Sam
68c4b52dfa Mute volume toggle fixes 2016-04-27 00:15:29 +10:00
Sam Potts
81ad9cf6f7 Audio styles, docs tweaks, package updates 2016-04-26 23:06:30 +10:00
Sam
024706f2ff Tab shows controls 2016-04-26 22:24:20 +10:00
Sam
57b3b9e3f6 Audio styles 2016-04-26 21:15:36 +10:00
Sam Potts
6c8d118f83 WIP 2016-04-26 19:14:42 +10:00
Monica Cheung
48399f6364 Merge remote-tracking branch 'org/develop' into develop 2016-04-25 22:43:44 -07:00
Sam
e26694c322 Work on Audio UI 2016-04-25 22:48:40 +10:00
Sam Potts
d41249bd90 WIP 2016-04-25 21:24:07 +10:00
Sam
833d3ac36f Tweaks 2016-04-25 20:05:01 +10:00
Sam Potts
fdaeecbb06 Merge branch 'master' into develop 2016-04-25 19:11:00 +10:00
Sam Potts
70297321c3 Merge branch 'develop' of github.com:selz/plyr into develop
# Conflicts:
#	.gitignore
#	dist/plyr.css
#	dist/plyr.js
#	dist/sprite.svg
#	docs/dist/docs.css
#	docs/dist/docs.js
#	docs/src/less/components/examples.less
#	src/js/plyr.js
#	src/less/plyr.less
#	src/sprite/icon-fast-forward.svg
#	src/sprite/icon-pause.svg
#	src/sprite/icon-play.svg
#	src/sprite/icon-rewind.svg
2016-04-25 19:10:10 +10:00
Sam Potts
a02609c3e3 ignore 2016-04-25 19:07:17 +10:00
Sam Potts
ffebc7b077 UI tweaks 2016-04-25 19:06:55 +10:00
Monica Cheung
47e0800f02 Add support for soundcloud 2016-04-17 20:57:55 -07:00
Sam Potts
c7c7902769 Merge pull request #179 from prince-0203/update-readme-outdated-contents
Update outdated contents in readme.md
2016-04-18 10:25:23 +10:00
Sam Potts
5bb4d70cf7 Merge branch 'master' of github.com:selz/plyr 2016-03-27 18:30:20 +11:00
Sam Potts
67b2f2510b Bug fix for embeds: play not being defined (fixes #185 and #186) 2016-03-27 18:29:58 +11:00
Sam Potts
ba9434b6f2 Merge pull request #184 from iamvlado/patch-1
fix type error
2016-03-20 15:26:25 +11:00
vlado
26469452e1 fix type error 2016-03-19 17:29:15 +02:00
Sam Potts
6ae2655923 Version bump 2016-03-14 22:53:11 +11:00
Sam Potts
815100cff8 Autoplay bug fixes 2016-03-14 22:50:34 +11:00
Sam Potts
33771ef8c0 Merge branch 'master' of github.com:selz/plyr 2016-03-14 22:34:44 +11:00
Sam Potts
b51a1684dc Fix for embed property not being set 2016-03-14 22:34:28 +11:00
Sam Potts
ba9abdc1d3 Update readme.md 2016-03-13 22:45:47 +11:00
Sam Potts
6a8803ec9f Update readme.md 2016-03-13 22:45:27 +11:00
Sam Potts
bcb5b981f9 Update readme.md 2016-03-13 22:44:14 +11:00
Sam Potts
5ea9e59d71 SASS fixes, docs changes (fixes #180), 'ready' event 2016-03-13 21:45:57 +11:00
Sam Potts
01b45e7d97 Merge branch 'master' of github.com:selz/plyr 2016-03-13 21:23:00 +11:00
Sam Potts
c41e5320c8 SASS fixes, Default font stack added 2016-03-13 21:22:51 +11:00
Sam Potts
426c0f5559 Merge pull request #181 from shakeelmohamed/bugfix/youtube-autoplay
Dynamically set YouTube autoplay from config
2016-03-13 18:29:49 +11:00
Shakeel Mohamed
c636f0e69e Dynamically set YouTube autoplay from config
The YouTube autoplay doesn't work without this
change.
2016-03-12 14:05:33 -08:00
prince
58342cfae8 Update outdated contents in readme.md 2016-03-12 14:07:37 +09:00
Sam Potts
193103cb2d Update readme.md 2016-03-07 23:18:56 +11:00
Sam Potts
f9c593d2f9 Update readme.md 2016-03-07 23:16:46 +11:00
Sam Potts
87d174ac2c Bug fixes and native APIs exposed for embeds 2016-03-07 22:28:30 +11:00
Sam Potts
cd83a2670b Cancel requests on source change (Fixes #174) 2016-02-28 12:50:34 +11:00
Sam Potts
1bbc47c64f CustomEvent polyfill (Fixes #172) 2016-02-28 11:22:11 +11:00
Sam Potts
7a1a5830aa Remove version from source 2016-02-25 19:36:14 +11:00
Sam Potts
1ecbec4044 Volume storage fix (Fixes #171) 2016-02-25 19:35:03 +11:00
Sam Potts
ab329b99df Merge branch 'master' of github.com:selz/plyr 2016-02-23 15:11:48 +11:00
Sam Potts
54af43dd75 Docs code 2016-02-23 15:11:35 +11:00
Sam Potts
188a2e72eb Update readme.md 2016-02-21 14:34:49 +11:00
Sam Potts
b7a14be2ac Removed npm log 2016-02-21 14:33:34 +11:00
Sam Potts
c99f20d5d8 Fix for manual captions 2016-02-21 14:28:01 +11:00
Sam Potts
5b968c97f4 v1.5.12 2016-02-21 14:07:17 +11:00
Sam Potts
d538cdcdf6 1.5.12 2016-02-21 14:04:49 +11:00
Sam Potts
cad142fe85 Merge branch 'master' of github.com:selz/plyr
# Conflicts:
#	src/js/plyr.js
2016-02-21 14:04:13 +11:00
Sam Potts
b18ed03384 WIP on captions bug, manual duration option, reset media object 2016-02-21 13:17:30 +11:00
Sam Potts
6a0b3dc823 Merge pull request #168 from gurupras/fix-captions
Fixes for captions
2016-02-21 11:28:15 +11:00
Guru Prasad Srinivasa
402c45ee2b Updated manual caption split pattern
Previously, Plyr was using a fixed pattern of '\n\n' to split
contents into captions. This does not always work as some VTT files
contain '\r\n'. This commit checks for both.
2016-02-16 20:17:10 -05:00
Guru Prasad Srinivasa
67f19166ac Some WebVTT fixes to allow manual captions
WebVTT allows additional parameters along with the line that
contains the start and end times. These were not being filtered
out while attempting to manually display captions.
2016-02-16 19:52:08 -05:00
Sam Potts
32b7b6b886 Merge pull request #167 from ivanvermeyen/patch-1
Allow player control colors to be overridden #158
2016-02-15 11:50:38 +11:00
Sam Potts
96df8fbc85 Update readme.md 2016-02-14 14:04:30 +11:00
Sam Potts
e742527e65 Version bump 2016-02-13 22:23:11 +11:00
Sam Potts
f426af6e9e 1.5.11 2016-02-13 22:19:48 +11:00
Sam Potts
aea86b6124 Merge branch 'master' of github.com:selz/plyr
# Conflicts:
#	dist/plyr.js
2016-02-13 22:19:31 +11:00
Sam Potts
ce51344269 iOS fix (Fixes #166), Edge Progress Tip (Fixes #160), SASS fix (Fixes #158) 2016-02-13 22:18:42 +11:00
Ivan Vermeyen
7d0311fd64 Allow player control colors to be overridden #158 2016-02-12 17:11:07 +01:00
Sam Potts
89e000f669 Update readme.md 2016-02-09 14:53:57 +11:00
Sam Potts
f341f1264d Update readme.md 2016-02-09 14:53:20 +11:00
Sam Potts
c687b867e7 Update readme.md 2016-02-09 14:52:37 +11:00
Sam Potts
4ee31ba661 Update readme.md 2016-02-09 14:40:26 +11:00
Sam Potts
a9126a4c82 Update readme.md 2016-02-05 00:02:24 +11:00
Sam Potts
6b70c4b49a Update readme.md 2016-02-04 14:59:59 +11:00
Sam Potts
d8fb876c81 Update readme.md 2016-02-04 14:58:00 +11:00
Sam Potts
73e6ad610f Merge pull request #156 from mortonfox/patch-1
Fix the svgfixer.js link
2016-02-02 09:35:31 +11:00
Morton Fox
eee7553d09 Fix the svgfixer.js link 2016-02-01 16:14:22 -05:00
Sam Potts
130b5ebedf Update readme.md 2016-01-29 10:25:39 +11:00
Sam Potts
dae5fb9785 Merge pull request #154 from marvinhagemeister/fix_window_usage
Get the proper reference to window on initialization.
2016-01-28 09:19:25 +11:00
Marvin Hagemeister
31a0eb8d14 Get the proper window reference on initialization.
The previous code assumed that `this` points to the browsers
window object, which is not the case when using a module bundler.

So we check for the variable `window` first, before falling back
to `this`.

(taken from jQuery's codebase)
2016-01-27 21:27:58 +01:00
Sam Potts
b8b611fbb6 Merge pull request #152 from marvinhagemeister/fix_commonjs
Swap CommonJS and AMD module check so that CommonJS is checked first
2016-01-27 08:45:10 +11:00
Marvin Hagemeister
a285fcc4ec Check for module.exports as well for CommonJS Modules 2016-01-26 17:05:57 +01:00
Marvin Hagemeister
4fda65c862 Swap CommonJS and AMD module check so that CommonJS is checked first. Fixes Webpack module bundling 2016-01-26 16:53:15 +01:00
Sam Potts
a8cea7b5c9 1.5.10 2016-01-26 22:44:09 +11:00
Sam Potts
01bdcc2b01 Merge pull request #151 from marvinhagemeister/fix_npm
Fix broken npm require/import
2016-01-26 20:44:44 +11:00
Marvin Hagemeister
812d2d33f2 NPM package main must always be the main source file. Fixes broken require/import 2016-01-26 10:21:03 +01:00
Sam Potts
a59073c5ca Update readme.md 2016-01-26 10:16:02 +11:00
Sam Potts
7edc3ccd53 NPM updates and published (fixes #146) 2016-01-26 10:08:19 +11:00
209 changed files with 30593 additions and 7320 deletions

10
.editorconfig Normal file
View File

@@ -0,0 +1,10 @@
# See editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

18
.eslintrc Normal file
View File

@@ -0,0 +1,18 @@
{
"parser": "babel-eslint",
"extends": ["@sampotts/eslint-config/es6"],
"env": {
"browser": true,
"es6": true
},
"globals": {
"Plyr": false,
"jQuery": false
},
"rules": {
"import/no-cycle": "warn"
},
"parserOptions": {
"sourceType": "module"
}
}

5
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
# These are supported funding model platforms
github: sampotts
patreon: plyr
open_collective: plyr

55
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View File

@@ -0,0 +1,55 @@
---
name: Bug report
about: Report an issue or unexpected behaviour with Plyr
---
<!--
Before creating the issue, please make sure that...
* You aren't getting any errors in your own code, causing the problem.
* You are using the latest version of Plyr.
* There isn't already an open issue for your problem.
* You are following the documentation correctly (https://github.com/sampotts/plyr/)
* Your problem doesn't happen if you remove Plyr and use native HTML5 media (when applicable).
For problems with autoplay, see our FAQ (https://github.com/sampotts/plyr/wiki/FAQ)
If you have multiple unrelated problems, create separate issues rather than combining them into one.
Note that leaving sections blank or being vague will make it difficult for us to troubleshoot and we may close the issue.
-->
### Expected behaviour
### Actual behaviour
### Steps to reproduce
### Environment
- Browser:
- Version:
- Operating System:
- Version:
### Console errors (if any)
### Link to where the bug is happening
<!--
This link can be either to our demo at https://plyr.io/ if the problem can be observed there, or to a code playground with a **minimal** test case that demonstrates the problem.
You can use one of our prepared templates to get started creating the test case:
* HTML5 video: https://codepen.io/pen?template=bKeqpr
* HTML5 audio: https://codepen.io/pen?template=rKLywR
* YouTube: https://codepen.io/pen?template=GGqbbJ
* Vimeo: https://codepen.io/pen?template=bKeXNq
* Dash.js integration: https://codepen.io/pen?template=zaBgBy
* Hls.js integration: https://codepen.io/pen?template=oyLKQb
* Shaka Player integration: https://codepen.io/pen?template=ZRpzZO
It's important that you keep the issue description and replication demo **minimal**. If your replication includes frameworks, libraries or customizations, this makes it much harder to understand the problem and find the bug. For more help on how to create the demo, see https://github.com/sampotts/plyr/wiki/Writing-helpful-issue-descriptions
-->

10
.github/ISSUE_TEMPLATE/feature.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: New feature
about: Request new functionality
---
<!--
Please describe the behaviour that you want to add, and why. Be as clear as possible to avoid confusion.
If you want to request multiple features that aren't directly related, then create one issue per feature.
-->

10
.github/ISSUE_TEMPLATE/improvement.md vendored Normal file
View File

@@ -0,0 +1,10 @@
---
name: Improvement
about: Request a change that isn't a bug or new feature
---
<!--
Please describe the behaviour that you want to change, and why. Be as clear as possible to avoid confusion.
If you want to request multiple changes that aren't directly related, then create one issue per change.
-->

3
.github/issue_template.md vendored Normal file
View File

@@ -0,0 +1,3 @@
PLEASE USE OUR SPECIFIC ISSUE TEMPLATES for bug reports, features and improvement suggestions.
Our issue tracker is not for support questions. If you need help, follow our support instructions: https://github.com/sampotts/plyr/blob/master/CONTRIBUTING.md#support

3
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,3 @@
### Link to related issue (if applicable)
### Summary of proposed changes

10
.gitignore vendored
View File

@@ -1,7 +1,9 @@
node_modules
*.sublime-project
*.sublime-workspace
.DS_Store
aws.json
docs/index.dev.html
credentials.json
*.mp4
npm-debug.log
yarn-error.log
*.webm
.idea/
dist/

6
.gitpod.yml Normal file
View File

@@ -0,0 +1,6 @@
tasks:
- before: npm install && npm i gulp -g
command: gulp
ports:
- port: 3000
onOpen: open-preview

View File

View File

@@ -1,55 +0,0 @@
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
"node" : false,
"rhino" : false,
"couch" : false,
"wsh" : true, // Windows Scripting Host.
"jquery" : false,
// Development.
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
"devel" : true, // Allow developments statements e.g. `console.log();`.
// ECMAScript 5.
"strict" : false, // Require `use strict` pragma in every file.
"globalstrict" : false, // Allow global "use strict" (also enables 'strict').
// The Good Parts.
"asi" : true, // Tolerate Automatic Semicolon Insertion (no semicolons).
"laxbreak" : true, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons.
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.).
"boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments.
"curly" : true, // Require {} for every new block or scope.
"eqeqeq" : false, // Require triple equals i.e. `===`.
"eqnull" : false, // Tolerate use of `== null`.
"evil" : false, // Tolerate use of `eval`.
"expr" : false, // Tolerate `ExpressionStatement` as Programs.
"forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`.
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );`
"latedef" : false, // Prohipit variable use before definition.
"loopfunc" : true, // Allow functions to be defined within loops.
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`.
"regexp" : true, // Prohibit `.` and `[^...]` in regular expressions.
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`.
"scripturl" : true, // Tolerate script-targeted URLs.
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`.
"supernew" : false, // Tolerate `new function () { ... };` and `new Object;`.
"undef" : true, // Require all non-global variables be declared before they are used.
// Personal styling preferences.
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`.
"noempty" : true, // Prohibit use of empty blocks.
"nonew" : true, // Prohibit use of constructors for side-effects.
"nomen" : true, // Prohibit use of initial or trailing underbars in names.
"onevar" : false, // Allow only one `var` statement per function.
"plusplus" : false, // Prohibit use of `++` & `--`.
"sub" : false, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`.
"trailing" : true, // Prohibit trailing whitespaces.
"white" : true, // Check against strict whitespace and indentation rules.
"indent" : 4 // Specify indentation spacing
}

12
.npmignore Normal file
View File

@@ -0,0 +1,12 @@
demo
.github
.vscode
*.code-workspace
build.json
credentials.json
deploy.json
yarn.lock
package-lock.json
*.webm
*.mp4
!dist/blank.mp4

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
16

7
.prettierrc Normal file
View File

@@ -0,0 +1,7 @@
{
"useTabs": false,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 120
}

5
.stickler.yml Normal file
View File

@@ -0,0 +1,5 @@
linters:
eslint:
files:
ignore:
- 'node_modules/*'

23
.stylelintrc.json Normal file
View File

@@ -0,0 +1,23 @@
{
"plugins": ["stylelint-selector-bem-pattern"],
"extends": ["stylelint-config-sass-guidelines", "stylelint-config-prettier"],
"customSyntax": "postcss-scss",
"rules": {
"selector-class-pattern": null,
"selector-no-qualifying-type": [
true,
{
"ignore": ["attribute", "class"]
}
],
"max-nesting-depth": 4,
"plugin/selector-bem-pattern": {
"preset": "bem",
"componentName": "(([a-z0-9]+(?!-$)-?)+)",
"componentSelectors": {
"initial": "\\.{componentName}(((__|--)(([a-z0-9\\[\\]'=]+(?!-$)-?)+))+)?$"
},
"ignoreSelectors": [".*\\.has-.*", ".*\\.is-.*"]
}
}
}

12
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"wayou.vscode-todo-highlight",
"wix.vscode-import-cost",
"stylelint.vscode-stylelint",
"pflannery.vscode-versionlens"
]
}

15
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost/dev/plyr/demo",
"webRoot": "${workspaceFolder}"
}
]
}

1
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1 @@
{}

1275
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

54
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,54 @@
# Contributing
We welcome bug reports, feature requests and pull requests. If you want to help us out, please follow these guidelines, in order to avoid redundant work.
## Support
Before asking questions, read our [documentation](https://github.com/sampotts/plyr) and [FAQ](https://github.com/sampotts/plyr/wiki/FAQ).
If these doesn't answer your question
- Use [Stack Overflow](https://stackoverflow.com/) for questions that doesn't directly involve Plyr. This includes for example how to use Javascript, CSS or HTML5 media in general, and how to use other frameworks, libraries and technology.
- Use [our Slack](https://bit.ly/plyr-chat) if you need help using Plyr or have questions about Plyr.
## Commenting
When commenting, keep a civil tone and stay on topic. Don't ask for [support](#support), or post "+1" or "I agree" type of comments. Use the emojis instead.
Asking for the status on issues is discouraged. Unless someone has explicitly said in an issue that it's work in progress, most likely that means no one is working on it. We have a lot to do, and it may not be a top priority for us.
We _may_ moderate discussions. We do this to avoid threads being "hijacked", to avoid confusion in case the content is misleading or outdated, and to avoid bothering people with github notifications.
## Creating issues
Please follow the instructions in our issue templates. Don't use github issues to ask for [support](#support).
## Contributing features and documentation
- If you want to add a feature or make critical changes, you may want to ensure that this is something we also want (so you don't waste your time). Ask us about this in the corresponding issue if there is one, or on [our Slack](https://bit.ly/plyr-chat) otherwise.
- Fork Plyr, and create a new branch in your fork, based on the **develop** branch
- To test locally, you can use the demo site. First make sure you have installed the dependencies with `npm install` or `yarn`. Run `gulp` to build and it will run a local web server for development and watch for any changes.
### Online one-click setup for contributing
You can use Gitpod (a free online VS Code-like IDE) for contributing. With a single click it will launch a workspace and automatically:
- clone the plyr repo.
- install the dependencies with `yarn install` in root directory and "demo" directory.
- run `gulp` in root directory to start the dev server.
So that you can start straight away.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
- Develop and test your modifications.
- Preferably commit your changes as independent logical chunks, with meaningful messages. Make sure you do not commit unnecessary files or changes, such as the build output, or logging and breakpoints you added for testing.
- If your modifications changes the documented behavior or add new features, document these changes in [README.md](README.md).
- When finished, push the changes to your GitHub repository and send a pull request. Describe what your PR does.
- If the Travis build fails, or if you get a code review with change requests, you can fix these by pushing new or rebased commits to the branch.

154
CONTROLS.md Normal file
View File

@@ -0,0 +1,154 @@
# Controls
This is the markup that is rendered for the Plyr controls. You can use the default controls or provide a customized version of markup based on your needs. You can pass the following to the `controls` option:
- `Array` of options (this builds the default controls based on your choices)
- `Element` with the controls
- `String` containing the desired HTML
- `false` (or empty string or array) to disable all controls
- `Function` that will be executed and should return one of the above
## Using default controls
If you want to use the standard controls as they are, you don't need to pass any options. If you want to turn on off controls, here's the full list:
```javascript
controls: [
'play-large', // The large play button in the center
'restart', // Restart playback
'rewind', // Rewind by the seek time (default 10 seconds)
'play', // Play/pause playback
'fast-forward', // Fast forward by the seek time (default 10 seconds)
'progress', // The progress bar and scrubber for playback and buffering
'current-time', // The current time of playback
'duration', // The full duration of the media
'mute', // Toggle mute
'volume', // Volume control
'captions', // Toggle captions
'settings', // Settings menu
'pip', // Picture-in-picture (currently Safari only)
'airplay', // Airplay (currently Safari only)
'download', // Show a download button with a link to either the current source or a custom URL you specify in your options
'fullscreen', // Toggle fullscreen
];
```
### Internationalization using default controls
You can provide an `i18n` object as one of your options when initializing the plugin which we be used when rendering the controls.
#### Example
```javascript
i18n: {
restart: 'Restart',
rewind: 'Rewind {seektime} secs',
play: 'Play',
pause: 'Pause',
fastForward: 'Forward {seektime} secs',
seek: 'Seek',
played: 'Played',
buffered: 'Buffered',
currentTime: 'Current time',
duration: 'Duration',
volume: 'Volume',
mute: 'Mute',
unmute: 'Unmute',
enableCaptions: 'Enable captions',
disableCaptions: 'Disable captions',
enterFullscreen: 'Enter fullscreen',
exitFullscreen: 'Exit fullscreen',
frameTitle: 'Player for {title}',
captions: 'Captions',
settings: 'Settings',
speed: 'Speed',
normal: 'Normal',
quality: 'Quality',
loop: 'Loop',
start: 'Start',
end: 'End',
all: 'All',
reset: 'Reset',
disabled: 'Disabled',
advertisement: 'Ad',
}
```
Note: `{seektime}` will be replaced with your configured seek time or the default. For example "Forward {seektime} secs" would render as "Forward 10 secs".
## Using custom HTML
You can specify the HTML as a `String` or your `Function` return for the controls using the `controls` option.
The classes and data attributes used in your template should match the `selectors` option if you change any.
You need to add several placeholders to your HTML template that are replaced when rendering:
- `{id}` - the dynamically generated ID for the player (for form controls)
- `{seektime}` - the seek time specified in options for fast forward and rewind
- `{title}` - the title of your media, if specified
### Limitations
- Currently the settings menus are not supported with custom controls HTML
- AirPlay and PiP buttons can be added but you will have to manage feature detection
### Example
Here's an example of custom controls markup (this is just all default controls shown).
```javascript
const controls = `
<div class="plyr__controls">
<button type="button" class="plyr__control" data-plyr="restart">
<svg role="presentation"><use xlink:href="#plyr-restart"></use></svg>
<span class="plyr__tooltip" role="tooltip">Restart</span>
</button>
<button type="button" class="plyr__control" data-plyr="rewind">
<svg role="presentation"><use xlink:href="#plyr-rewind"></use></svg>
<span class="plyr__tooltip" role="tooltip">Rewind {seektime} secs</span>
</button>
<button type="button" class="plyr__control" aria-label="Play, {title}" data-plyr="play">
<svg class="icon--pressed" role="presentation"><use xlink:href="#plyr-pause"></use></svg>
<svg class="icon--not-pressed" role="presentation"><use xlink:href="#plyr-play"></use></svg>
<span class="label--pressed plyr__tooltip" role="tooltip">Pause</span>
<span class="label--not-pressed plyr__tooltip" role="tooltip">Play</span>
</button>
<button type="button" class="plyr__control" data-plyr="fast-forward">
<svg role="presentation"><use xlink:href="#plyr-fast-forward"></use></svg>
<span class="plyr__tooltip" role="tooltip">Forward {seektime} secs</span>
</button>
<div class="plyr__progress">
<input data-plyr="seek" type="range" min="0" max="100" step="0.01" value="0" aria-label="Seek">
<progress class="plyr__progress__buffer" min="0" max="100" value="0">% buffered</progress>
<span role="tooltip" class="plyr__tooltip">00:00</span>
</div>
<div class="plyr__time plyr__time--current" aria-label="Current time">00:00</div>
<div class="plyr__time plyr__time--duration" aria-label="Duration">00:00</div>
<button type="button" class="plyr__control" aria-label="Mute" data-plyr="mute">
<svg class="icon--pressed" role="presentation"><use xlink:href="#plyr-muted"></use></svg>
<svg class="icon--not-pressed" role="presentation"><use xlink:href="#plyr-volume"></use></svg>
<span class="label--pressed plyr__tooltip" role="tooltip">Unmute</span>
<span class="label--not-pressed plyr__tooltip" role="tooltip">Mute</span>
</button>
<div class="plyr__volume">
<input data-plyr="volume" type="range" min="0" max="1" step="0.05" value="1" autocomplete="off" aria-label="Volume">
</div>
<button type="button" class="plyr__control" data-plyr="captions">
<svg class="icon--pressed" role="presentation"><use xlink:href="#plyr-captions-on"></use></svg>
<svg class="icon--not-pressed" role="presentation"><use xlink:href="#plyr-captions-off"></use></svg>
<span class="label--pressed plyr__tooltip" role="tooltip">Disable captions</span>
<span class="label--not-pressed plyr__tooltip" role="tooltip">Enable captions</span>
</button>
<button type="button" class="plyr__control" data-plyr="fullscreen">
<svg class="icon--pressed" role="presentation"><use xlink:href="#plyr-exit-fullscreen"></use></svg>
<svg class="icon--not-pressed" role="presentation"><use xlink:href="#plyr-enter-fullscreen"></use></svg>
<span class="label--pressed plyr__tooltip" role="tooltip">Exit fullscreen</span>
<span class="label--not-pressed plyr__tooltip" role="tooltip">Enter fullscreen</span>
</button>
</div>
`;
// Setup the player
const player = new Plyr('#player', { controls });
```

View File

@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Selz.com
Copyright (c) 2017 Sam Potts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

891
README.md Normal file
View File

@@ -0,0 +1,891 @@
| 🎉 | [Plyr is merging into Vidstack](https://github.com/sampotts/plyr/issues/2408) | 🎉 |
| :-: | :---------------------------------------------------------------------------: | :-- |
Plyr is a simple, lightweight, accessible and customizable HTML5, YouTube and Vimeo media player that supports [_modern_](#browser-support) browsers.
[Checkout the demo](https://plyr.io) - [Donate](#donate) - [Slack](https://bit.ly/plyr--chat)
[![npm version](https://badge.fury.io/js/plyr.svg)](https://badge.fury.io/js/plyr) [![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/sampotts/plyr) [![Financial Contributors on Open Collective](https://opencollective.com/plyr/all/badge.svg?label=financial+contributors)](https://opencollective.com/plyr)
[![Image of Plyr](https://cdn.plyr.io/static/demo/screenshot.png?v=3)](https://plyr.io)
# Features
- 📼 **HTML Video & Audio, YouTube & Vimeo** - support for the major formats
- 💪 **Accessible** - full support for VTT captions and screen readers
- 🔧 **[Customizable](#html)** - make the player look how you want with the markup you want
- 😎 **Clean HTML** - uses the _right_ elements. `<input type="range">` for volume and `<progress>` for progress and well, `<button>`s for buttons. There's no
`<span>` or `<a href="#">` button hacks
- 📱 **Responsive** - works with any screen size
- 💵 **[Monetization](#ads)** - make money from your videos
- 📹 **[Streaming](#demos)** - support for hls.js, Shaka and dash.js streaming playback
- 🎛 **[API](#api)** - toggle playback, volume, seeking, and more through a standardized API
- 🎤 **[Events](#events)** - no messing around with Vimeo and YouTube APIs, all events are standardized across formats
- 🔎 **[Fullscreen](#fullscreen)** - supports native fullscreen with fallback to "full window" modes
- ⌨️ **[Shortcuts](#shortcuts)** - supports keyboard shortcuts
- 🖥 **Picture-in-Picture** - supports picture-in-picture mode
- 📱 **Playsinline** - supports the `playsinline` attribute
- 🏎 **Speed controls** - adjust speed on the fly
- 📖 **Multiple captions** - support for multiple caption tracks
- 🌎 **i18n support** - support for internationalization of controls
- 👌 **[Preview thumbnails](#preview-thumbnails)** - support for displaying preview thumbnails
- 🤟 **No frameworks** - written in "vanilla" ES6 JavaScript, no jQuery required
- 💁‍♀️ **Sass** - to include in your build processes
### Demos
You can try Plyr in Codepen using our minimal templates: [HTML5 video](https://codepen.io/pen?template=bKeqpr), [HTML5 audio](https://codepen.io/pen?template=rKLywR), [YouTube](https://codepen.io/pen?template=GGqbbJ), [Vimeo](https://codepen.io/pen?template=bKeXNq). For Streaming we also have example integrations with: [Dash.js](https://codepen.io/pen?template=GRoogML), [Hls.js](https://codepen.io/pen?template=oyLKQb) and [Shaka Player](https://codepen.io/pen?template=ZRpzZO)
# Quick setup
## HTML
Plyr extends upon the standard [HTML5 media element](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement) markup so that's all you need for those types.
### HTML5 Video
```html
<video id="player" playsinline controls data-poster="/path/to/poster.jpg">
<source src="/path/to/video.mp4" type="video/mp4" />
<source src="/path/to/video.webm" type="video/webm" />
<!-- Captions are optional -->
<track kind="captions" label="English captions" src="/path/to/captions.vtt" srclang="en" default />
</video>
```
**Note**: The poster image should be specified using `data-poster`. This is to prevent it [being downloaded twice](https://github.com/sampotts/plyr/issues/1531). If you're sure the image will be cached, you can still use the `poster` attribute for true progressive enhancement.
### HTML5 Audio
```html
<audio id="player" controls>
<source src="/path/to/audio.mp3" type="audio/mp3" />
<source src="/path/to/audio.ogg" type="audio/ogg" />
</audio>
```
For YouTube and Vimeo players, Plyr uses progressive enhancement to enhance the default `<iframe>` embeds. Below are some examples. The `plyr__video-embed` classname will make the embed responsive. You can add the `autoplay`, `loop`, `hl` (YouTube only) and `playsinline` (YouTube only) query parameters to the URL and they will be set as config options automatically. For YouTube, the `origin` should be updated to reflect the domain you're hosting the embed on, or you can opt to omit it.
### YouTube
We recommend [progressive enhancement](https://www.smashingmagazine.com/2009/04/progressive-enhancement-what-it-is-and-how-to-use-it/) with the embedded players. You can elect to use an `<iframe>` as the source element (which Plyr will progressively enhance) or a bog standard `<div>` with two essential data attributes - `data-plyr-provider` and `data-plyr-embed-id`.
```html
<div class="plyr__video-embed" id="player">
<iframe
src="https://www.youtube.com/embed/bTqVqk7FSmY?origin=https://plyr.io&amp;iv_load_policy=3&amp;modestbranding=1&amp;playsinline=1&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1"
allowfullscreen
allowtransparency
allow="autoplay"
></iframe>
</div>
```
_Note_: The `plyr__video-embed` classname will make the player a responsive 16:9 (most common) iframe embed. When plyr itself kicks in, your custom `ratio` config option will be used.
Or the `<div>` non progressively enhanced method:
```html
<div id="player" data-plyr-provider="youtube" data-plyr-embed-id="bTqVqk7FSmY"></div>
```
_Note_: The `data-plyr-embed-id` can either be the video ID or URL for the media.
### Vimeo
Much the same as YouTube above.
```html
<div class="plyr__video-embed" id="player">
<iframe
src="https://player.vimeo.com/video/76979871?loop=false&amp;byline=false&amp;portrait=false&amp;title=false&amp;speed=true&amp;transparent=0&amp;gesture=media"
allowfullscreen
allowtransparency
allow="autoplay"
></iframe>
</div>
```
Or the `<div>` non progressively enhanced method:
```html
<div id="player" data-plyr-provider="vimeo" data-plyr-embed-id="76979871"></div>
```
## JavaScript
You can use Plyr as an ES6 module as follows:
```javascript
import Plyr from 'plyr';
const player = new Plyr('#player');
```
Alternatively you can include the `plyr.js` script before the closing `</body>` tag and then in your JS create a new instance of Plyr as below.
```html
<script src="path/to/plyr.js"></script>
<script>
const player = new Plyr('#player');
</script>
```
See [initialising](#initialising) for more information on advanced setups.
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills separately as part of your application but to make life easier you can use the polyfilled build.
```html
<script src="https://cdn.plyr.io/3.7.0/plyr.js"></script>
```
...or...
```html
<script src="https://cdn.plyr.io/3.7.0/plyr.polyfilled.js"></script>
```
## CSS
Include the `plyr.css` stylesheet into your `<head>`.
```html
<link rel="stylesheet" href="path/to/plyr.css" />
```
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
```html
<link rel="stylesheet" href="https://cdn.plyr.io/3.7.0/plyr.css" />
```
## SVG Sprite
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.7.0/plyr.svg`.
# Ads
Plyr has partnered up with [vi.ai](https://vi.ai/publisher-video-monetization/?aid=plyrio) to offer monetization options for your videos. Getting setup is easy:
- [Sign up for a vi.ai account](https://vi.ai/publisher-video-monetization/?aid=plyrio)
- Grab your publisher ID from the code snippet
- Enable ads in the [config options](#options) and enter your publisher ID
Any questions regarding the ads can be sent straight to vi.ai and any issues with rendering raised through GitHub issues.
If you do not wish to use Vi, you can set your own `ads.tagUrl` [option](#options).
# Advanced
## Customizing the CSS
If you want to change any design tokens used for the rendering of the player, you can do so using [CSS Custom Properties](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties).
Here's a list of the properties and what they are used for:
| Name | Description | Default / Fallback |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `--plyr-color-main` | The primary UI color. | ![#f03c15](https://place-hold.it/15/00b3ff/000000?text=+) `#00b3ff` |
| `--plyr-video-background` | The background color of video and poster wrappers for using alpha channel videos and poster images. | `rgba(0, 0, 0, 1)` |
| `--plyr-tab-focus-color` | The color used for the dotted outline when an element is `:focus-visible` (equivalent) keyboard focus. | `--plyr-color-main` |
| `--plyr-badge-background` | The background color for badges in the menu. | ![#4a5464](https://place-hold.it/15/4a5464/000000?text=+) `#4a5464` |
| `--plyr-badge-text-color` | The text color for badges. | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-badge-border-radius` | The border radius used for badges. | `2px` |
| `--plyr-tab-focus-color` | The color used to highlight tab (keyboard) focus. | `--plyr-color-main` |
| `--plyr-captions-background` | The color for the background of captions. | `rgba(0, 0, 0, 0.8)` |
| `--plyr-captions-text-color` | The color used for the captions text. | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-control-icon-size` | The size of the icons used in the controls. | `18px` |
| `--plyr-control-spacing` | The space between controls (sometimes used in a multiple - e.g. `10px / 2 = 5px`). | `10px` |
| `--plyr-control-padding` | The padding inside controls. | `--plyr-control-spacing * 0.7` (`7px`) |
| `--plyr-control-radius` | The border radius used on controls. | `3px` |
| `--plyr-control-toggle-checked-background` | The background color used for checked menu items. | `--plyr-color-main` |
| `--plyr-video-controls-background` | The background for the video controls. | `linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75))` |
| `--plyr-video-control-color` | The text/icon color for video controls. | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-video-control-color-hover` | The text/icon color used when video controls are `:hover`, `:focus` and `:focus-visible` (equivalent). | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-video-control-background-hover` | The background color used when video controls are `:hover`, `:focus` and `:focus-visible` (equivalent). | `--plyr-color-main` |
| `--plyr-audio-controls-background` | The background for the audio controls. | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-audio-control-color` | The text/icon color for audio controls. | ![#4a5464](https://place-hold.it/15/4a5464/000000?text=+) `#4a5464` |
| `--plyr-audio-control-color-hover` | The text/icon color used when audio controls are `:hover`, `:focus` and `:focus-visible` (equivalent). | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-audio-control-background-hover` | The background color used when video controls are `:hover`, `:focus` and `:focus-visible` (equivalent). | `--plyr-color-main` |
| `--plyr-menu-background` | The background color for menus. | `rgba(255, 255, 255, 0.9)` |
| `--plyr-menu-color` | The text/icon color for menu items. | ![#4a5464](https://place-hold.it/15/4a5464/000000?text=+) `#4a5464` |
| `--plyr-menu-shadow` | The shadow used on menus. | `0 1px 2px rgba(0, 0, 0, 0.15)` |
| `--plyr-menu-radius` | The border radius on the menu. | `4px` |
| `--plyr-menu-arrow-size` | The size of the arrow on the bottom of the menu. | `6px` |
| `--plyr-menu-item-arrow-color` | The color of the arrows in the menu. | ![#728197](https://place-hold.it/15/728197/000000?text=+) `#728197` |
| `--plyr-menu-item-arrow-size` | The size of the arrows in the menu. | `4px` |
| `--plyr-menu-border-color` | The border color for the bottom of the back button in the top of the sub menu pages. | ![#dcdfe5](https://place-hold.it/15/dcdfe5/000000?text=+) `#dcdfe5` |
| `--plyr-menu-border-shadow-color` | The shadow below the border of the back button in the top of the sub menu pages. | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-progress-loading-size` | The size of the stripes in the loading state in the scrubber. | `25px` |
| `--plyr-progress-loading-background` | The background color on the loading state in the scrubber. | `rgba(35, 40, 47, 0.6)` |
| `--plyr-video-progress-buffered-background` | The fill color for the buffer indication in the scrubber for video. | `rgba(255, 255, 255, 0.25)` |
| `--plyr-audio-progress-buffered-background` | The fill color for the buffer indication in the scrubber for audio. | `rgba(193, 200, 209, 0.6)` |
| `--plyr-range-thumb-height` | The height of the scrubber handle/thumb. | `13px` |
| `--plyr-range-thumb-background` | The background of the scrubber handle/thumb. | ![#ffffff](https://place-hold.it/15/ffffff/000000?text=+) `#ffffff` |
| `--plyr-range-thumb-shadow` | The shadow of the scrubber handle/thumb. | `0 1px 1px rgba(215, 26, 18, 0.15), 0 0 0 1px rgba(215, 26, 18, 0.2)` |
| `--plyr-range-thumb-active-shadow-width` | The width of the shadow when the scrubber handle/thumb is `:active` (pressed). | `3px` |
| `--plyr-range-track-height` | The height of the scrubber/progress track. | `5px` |
| `--plyr-range-fill-background` | The fill color of the scrubber/progress. | `--plyr-color-main` |
| `--plyr-video-range-track-background` | The background of the scrubber/progress. | `--plyr-video-progress-buffered-background` |
| `--plyr-video-range-thumb-active-shadow-color` | The color of the shadow when the video scrubber handle/thumb is `:active` (pressed). | `rgba(255, 255, 255, 0.5)` |
| `--plyr-audio-range-track-background` | The background of the scrubber/progress. | `--plyr-video-progress-buffered-background` |
| `--plyr-audio-range-thumb-active-shadow-color` | The color of the shadow when the audio scrubber handle/thumb is `:active` (pressed). | `rgba(215, 26, 18, 0.1)` |
| `--plyr-tooltip-background` | The background color for tooltips. | `rgba(255, 255, 255, 0.9)` |
| `--plyr-tooltip-color` | The text color for tooltips. | ![#4a5464](https://place-hold.it/15/4a5464/000000?text=+) `#4a5464` |
| `--plyr-tooltip-padding` | The padding for tooltips. | `calc(var(--plyr-control-spacing) / 2))` |
| `--plyr-tooltip-arrow-size` | The size of the arrow under tooltips. | `4px` |
| `--plyr-tooltip-radius` | The border radius on tooltips. | `3px` |
| `--plyr-tooltip-shadow` | The shadow on tooltips. | `0 1px 2px rgba(0, 0, 0, 0.15)` |
| `--plyr-font-family` | The font family used in the player. | |
| `--plyr-font-size-base` | The base font size. Mainly used for captions. | `15px` |
| `--plyr-font-size-small` | The smaller font size. Mainly used for captions. | `13px` |
| `--plyr-font-size-large` | The larger font size. Mainly used for captions. | `18px` |
| `--plyr-font-size-xlarge` | The even larger font size. Mainly used for captions. | `21px` |
| `--plyr-font-size-time` | The font size for the time. | `--plyr-font-size-small` |
| `--plyr-font-size-menu` | The font size used in the menu. | `--plyr-font-size-small` |
| `--plyr-font-size-badge` | The font size used for badges. | `9px` |
| `--plyr-font-weight-regular` | The regular font weight. | `400` |
| `--plyr-font-weight-bold` | The bold font weight. | `600` |
| `--plyr-line-height` | The line height used within the player. | `1.7` |
| `--plyr-font-smoothing` | Whether to enable font antialiasing within the player. | `false` |
You can set them in your CSS for all players:
```css
:root {
--plyr-color-main: #1ac266;
}
```
...or for a specific class name:
```css
.player {
--plyr-color-main: #1ac266;
}
```
...or in your HTML:
```html
<video class="player" style="--plyr-color-main: #1ac266;">...</video>
```
### Sass
You can use `plyr.scss` file included in `/src/sass` as part of your build and change variables to suit your design. The Sass requires you to
use [autoprefixer](https://www.npmjs.com/package/gulp-autoprefixer) (you should be already!) as all declarations use the W3C definitions.
The HTML markup uses the BEM methodology with `plyr` as the block, e.g. `.plyr__controls`. You can change the class hooks in the options to match any custom CSS
you write. Check out the JavaScript source for more on this.
## SVG
The icons used in the Plyr controls are loaded in an SVG sprite. The sprite is automatically loaded from our CDN by default. If you already have an icon build
system in place, you can include the source plyr icons (see `/src/sprite` for source icons).
### Using the `iconUrl` option
You can however specify your own `iconUrl` option and Plyr will determine if the url is absolute and requires loading by AJAX/CORS due to current browser
limitations or if it's a relative path, just use the path directly.
If you're using the `<base>` tag on your site, you may need to use something like this: [svgfixer.js](https://gist.github.com/leonderijke/c5cf7c5b2e424c0061d2)
More info on SVG sprites here: [http://css-tricks.com/svg-sprites-use-better-icon-fonts/](http://css-tricks.com/svg-sprites-use-better-icon-fonts/) and the AJAX
technique here: [http://css-tricks.com/ajaxing-svg-sprite/](http://css-tricks.com/ajaxing-svg-sprite/)
## Cross Origin (CORS)
You'll notice the `crossorigin` attribute on the example `<video>` elements. This is because the TextTrack captions are loaded from another domain. If your
TextTrack captions are also hosted on another domain, you will need to add this attribute and make sure your host has the correct headers setup. For more info
on CORS checkout the MDN docs:
[https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)
## Captions
WebVTT captions are supported. To add a caption track, check the HTML example above and look for the `<track>` element. Be sure to
[validate your caption files](https://quuz.org/webvtt/).
## JavaScript
### Initialising
You can specify a range of arguments for the constructor to use:
- A [CSS string selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors)
- A [`HTMLElement`](https://developer.mozilla.org/en/docs/Web/API/HTMLElement)
- A [jQuery](https://jquery.com) object
_Note_: If a `NodeList`, `Array`, or jQuery object are passed, the first element will be used for setup. To setup multiple players, see [multiple players](#multiple-players) below.
#### Single player
Passing a CSS string selector that's compatible with [`querySelector`](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector):
```javascript
const player = new Plyr('#player');
```
Passing a [HTMLElement](https://developer.mozilla.org/en/docs/Web/API/HTMLElement):
```javascript
const player = new Plyr(document.getElementById('player'));
```
```javascript
const player = new Plyr(document.querySelector('.js-player'));
```
The HTMLElement or string selector can be the target `<video>`, `<audio>`, or `<div>` wrapper for embeds.
#### Multiple players
You have two choices here. You can either use a simple array loop to map the constructor:
```javascript
const players = Array.from(document.querySelectorAll('.js-player')).map((p) => new Plyr(p));
```
...or use a static method where you can pass a [CSS string selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors), a [NodeList](https://developer.mozilla.org/en-US/docs/Web/API/NodeList), an [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) of [HTMLElement](https://developer.mozilla.org/en/docs/Web/API/HTMLElement), or a [JQuery](https://jquery.com) object:
```javascript
const players = Plyr.setup('.js-player');
```
Both options will also return an array of instances in the order of they were in the DOM for the string selector or the source NodeList or Array.
#### Options
The second argument for the constructor is the [options](#options) object:
```javascript
const player = new Plyr('#player', {
title: 'Example Title',
});
```
Options can be passed as an object to the constructor as above or as JSON in `data-plyr-config` attribute on each of your target elements:
```html
<video src="/path/to/video.mp4" id="player" controls data-plyr-config='{ "title": "Example Title" }'></video>
```
Note the single quotes encapsulating the JSON and double quotes on the object keys. Only string values need double quotes.
| Option | Type | Default | Description |
| -------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled` | Boolean | `true` | Completely disable Plyr. This would allow you to do a User Agent check or similar to programmatically enable or disable Plyr for a certain UA. Example below. |
| `debug` | Boolean | `false` | Display debugging information in the console |
| `controls` | Array, Function or Element | `['play-large', 'play', 'progress', 'current-time', 'mute', 'volume', 'captions', 'settings', 'pip', 'airplay', 'fullscreen']` | If a function is passed, it is assumed your method will return either an element or HTML string for the controls. Three arguments will be passed to your function; `id` (the unique id for the player), `seektime` (the seektime step in seconds), and `title` (the media title). See [CONTROLS.md](CONTROLS.md) for more info on how the html needs to be structured. |
| `settings` | Array | `['captions', 'quality', 'speed', 'loop']` | If the default controls are used, you can specify which settings to show in the menu |
| `i18n` | Object | See [defaults.js](/src/js/config/defaults.js) | Used for internationalization (i18n) of the text within the UI. |
| `loadSprite` | Boolean | `true` | Load the SVG sprite specified as the `iconUrl` option (if a URL). If `false`, it is assumed you are handling sprite loading yourself. |
| `iconUrl` | String | `null` | Specify a URL or path to the SVG sprite. See the [SVG section](#svg) for more info. |
| `iconPrefix` | String | `plyr` | Specify the id prefix for the icons used in the default controls (e.g. "plyr-play" would be "plyr"). This is to prevent clashes if you're using your own SVG sprite but with the default controls. Most people can ignore this option. |
| `blankVideo` | String | `https://cdn.plyr.io/static/blank.mp4` | Specify a URL or path to a blank video file used to properly cancel network requests. |
| `autoplay`&sup2; | Boolean | `false` | Autoplay the media on load. If the `autoplay` attribute is present on a `<video>` or `<audio>` element, this will be automatically set to true. |
| `autopause`&sup1; | Boolean | `true` | Only allow one player playing at once. |
| `seekTime` | Number | `10` | The time, in seconds, to seek when a user hits fast forward or rewind. |
| `volume` | Number | `1` | A number, between 0 and 1, representing the initial volume of the player. |
| `muted` | Boolean | `false` | Whether to start playback muted. If the `muted` attribute is present on a `<video>` or `<audio>` element, this will be automatically set to true. |
| `clickToPlay` | Boolean | `true` | Click (or tap) of the video container will toggle play/pause. |
| `disableContextMenu` | Boolean | `true` | Disable right click menu on video to <em>help</em> as very primitive obfuscation to prevent downloads of content. |
| `hideControls` | Boolean | `true` | Hide video controls automatically after 2s of no mouse or focus movement, on control element blur (tab out), on playback start or entering fullscreen. As soon as the mouse is moved, a control element is focused or playback is paused, the controls reappear instantly. |
| `resetOnEnd` | Boolean | false | Reset the playback to the start once playback is complete. |
| `keyboard` | Object | `{ focused: true, global: false }` | Enable [keyboard shortcuts](#shortcuts) for focused players only or globally |
| `tooltips` | Object | `{ controls: false, seek: true }` | `controls`: Display control labels as tooltips on `:hover` & `:focus` (by default, the labels are screen reader only). `seek`: Display a seek tooltip to indicate on click where the media would seek to. |
| `duration` | Number | `null` | Specify a custom duration for media. |
| `displayDuration` | Boolean | `true` | Displays the duration of the media on the "metadataloaded" event (on startup) in the current time display. This will only work if the `preload` attribute is not set to `none` (or is not set at all) and you choose not to display the duration (see `controls` option). |
| `invertTime` | Boolean | `true` | Display the current time as a countdown rather than an incremental counter. |
| `toggleInvert` | Boolean | `true` | Allow users to click to toggle the above. |
| `listeners` | Object | `null` | Allows binding of event listeners to the controls before the default handlers. See the `defaults.js` for available listeners. If your handler prevents default on the event (`event.preventDefault()`), the default handler will not fire. |
| `captions` | Object | `{ active: false, language: 'auto', update: false }` | `active`: Toggles if captions should be active by default. `language`: Sets the default language to load (if available). 'auto' uses the browser language. `update`: Listen to changes to tracks and update menu. This is needed for some streaming libraries, but can result in non-selectable language options). |
| `fullscreen` | Object | `{ enabled: true, fallback: true, iosNative: false, container: null }` | `enabled`: Toggles whether fullscreen should be enabled. `fallback`: Allow fallback to a full-window solution (`true`/`false`/`'force'`). `iosNative`: whether to use native iOS fullscreen when entering fullscreen (no custom controls). `container`: A selector for an ancestor of the player element, allows contextual content to remain visual in fullscreen mode. Non-ancestors are ignored. |
| `ratio` | String | `null` | Force an aspect ratio for all videos. The format is `'w:h'` - e.g. `'16:9'` or `'4:3'`. If this is not specified then the default for HTML5 and Vimeo is to use the native resolution of the video. As dimensions are not available from YouTube via SDK, 16:9 is forced as a sensible default. |
| `storage` | Object | `{ enabled: true, key: 'plyr' }` | `enabled`: Allow use of local storage to store user settings. `key`: The key name to use. |
| `speed` | Object | `{ selected: 1, options: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 4] }` | `selected`: The default speed for playback. `options`: The speed options to display in the UI. YouTube and Vimeo will ignore any options outside of the 0.5-2 range, so options outside of this range will be hidden automatically. |
| `quality` | Object | `{ default: 576, options: [4320, 2880, 2160, 1440, 1080, 720, 576, 480, 360, 240] }` | `default` is the default quality level (if it exists in your sources). `options` are the options to display. This is used to filter the available sources. |
| `loop` | Object | `{ active: false }` | `active`: Whether to loop the current video. If the `loop` attribute is present on a `<video>` or `<audio>` element, this will be automatically set to true This is an object to support future functionality. |
| `ads` | Object | `{ enabled: false, publisherId: '', tagUrl: '' }` | `enabled`: Whether to enable advertisements. `publisherId`: Your unique [vi.ai](https://vi.ai/publisher-video-monetization/?aid=plyrio) publisher ID. `tagUrl` is a URL for a custom VAST tag if you're not using Vi. |
| `urls` | Object | See source. | If you wish to override any API URLs then you can do so here. You can also set a custom download URL for the download button. |
| `vimeo` | Object | `{ byline: false, portrait: false, title: false, speed: true, transparent: false }` | See [Vimeo embed options](https://github.com/vimeo/player.js/#embed-options). Some are set automatically based on other config options, namely: `loop`, `autoplay`, `muted`, `gesture`, `playsinline` |
| `youtube` | Object | `{ noCookie: false, rel: 0, showinfo: 0, iv_load_policy: 3, modestbranding: 1 }` | See [YouTube embed options](https://developers.google.com/youtube/player_parameters#Parameters). The only custom option is `noCookie` to use an alternative to YouTube that doesn't use cookies (useful for GDPR, etc). Some are set automatically based on other config options, namely: `autoplay`, `hl`, `controls`, `disablekb`, `playsinline`, `cc_load_policy`, `cc_lang_pref`, `widget_referrer` |
| `previewThumbnails` | Object | `{ enabled: false, src: '' }` | `enabled`: Whether to enable the preview thumbnails (they must be generated by you). `src` must be either a string or an array of strings representing URLs for the VTT files containing the image URL(s). Learn more about [preview thumbnails](#preview-thumbnails) below. |
| `mediaMetadata` | Object | `{ title: '', artist: '', album: '', artwork: [] }` | The [MediaMetadata](https://developer.mozilla.org/en-US/docs/Web/API/MediaMetadata) interface of the Media Session API allows a web page to provide rich media metadata for display in a platform UI. |
| `markers` | Object | `{ enabled: false, points: [] }` | `enabled`: Whether to enable markers. `points` is an array of `{ time: number; label: string; }` objects where `time` represents the marker position in seconds and `label` is the HTML string to be displayed. |
1. Vimeo only
2. Autoplay is generally not recommended as it is seen as a negative user experience. It is also disabled in many browsers. Before raising issues, do your homework. More info can be found here:
- https://webkit.org/blog/6784/new-video-policies-for-ios/
- https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
- https://hacks.mozilla.org/2019/02/firefox-66-to-block-automatically-playing-audible-video-and-audio/
# API
There are methods, setters and getters on a Plyr object.
## Object
The easiest way to access the Plyr object is to set the return value from your call to the constructor to a variable. For example:
```javascript
const player = new Plyr('#player', {
/* options */
});
```
You can also access the object through any events:
```javascript
element.addEventListener('ready', (event) => {
const player = event.detail.plyr;
});
```
## Methods
Example method use:
```javascript
player.play(); // Start playback
player.fullscreen.enter(); // Enter fullscreen
```
| Method | Parameters | Description |
| -------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------- |
| `play()`&sup1; | - | Start playback. |
| `pause()` | - | Pause playback. |
| `togglePlay(toggle)`&sup1; | Boolean | Toggle playback, if no parameters are passed, it will toggle based on current status. |
| `stop()` | - | Stop playback and reset to start. |
| `restart()` | - | Restart playback. |
| `rewind(seekTime)` | Number | Rewind playback by the specified seek time. If no parameter is passed, the default seek time will be used. |
| `forward(seekTime)` | Number | Fast forward by the specified seek time. If no parameter is passed, the default seek time will be used. |
| `increaseVolume(step)` | Number | Increase volume by the specified step. If no parameter is passed, the default step will be used. |
| `decreaseVolume(step)` | Number | Increase volume by the specified step. If no parameter is passed, the default step will be used. |
| `toggleCaptions(toggle)` | Boolean | Toggle captions display. If no parameter is passed, it will toggle based on current status. |
| `fullscreen.enter()` | - | Enter fullscreen. If fullscreen is not supported, a fallback "full window/viewport" is used instead. |
| `fullscreen.exit()` | - | Exit fullscreen. |
| `fullscreen.toggle()` | - | Toggle fullscreen. |
| `airplay()` | - | Trigger the airplay dialog on supported devices. |
| `setPreviewThumbnails(source: PreviewThumbnailsOptions)` | - | Sets the preview thumbnails for the current source. |
| `toggleControls(toggle)` | Boolean | Toggle the controls (video only). Takes optional truthy value to force it on/off. |
| `on(event, function)` | String, Function | Add an event listener for the specified event. |
| `once(event, function)` | String, Function | Add an event listener for the specified event once. |
| `off(event, function)` | String, Function | Remove an event listener for the specified event. |
| `supports(type)` | String | Check support for a mime type. |
| `destroy()` | - | Destroy the instance and garbage collect any elements. |
1. For HTML5 players, `play()` will return a [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) for most browsers - e.g. Chrome, Firefox, Opera, Safari and Edge [according to MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play) at time of writing.
## Getters and Setters
Example setters:
```javascript
player.volume = 0.5; // Sets volume at 50%
player.currentTime = 10; // Seeks to 10 seconds
```
Example getters:
```javascript
player.volume; // 0.5;
player.currentTime; // 10
player.fullscreen.active; // false;
```
| Property | Getter | Setter | Description |
| -------------------- | ------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `isHTML5` | ✓ | - | Returns a boolean indicating if the current player is HTML5. |
| `isEmbed` | ✓ | - | Returns a boolean indicating if the current player is an embedded player. |
| `playing` | ✓ | - | Returns a boolean indicating if the current player is playing. |
| `paused` | ✓ | - | Returns a boolean indicating if the current player is paused. |
| `stopped` | ✓ | - | Returns a boolean indicating if the current player is stopped. |
| `ended` | ✓ | - | Returns a boolean indicating if the current player has finished playback. |
| `buffered` | ✓ | - | Returns a float between 0 and 1 indicating how much of the media is buffered |
| `currentTime` | ✓ | ✓ | Gets or sets the currentTime for the player. The setter accepts a float in seconds. |
| `seeking` | ✓ | - | Returns a boolean indicating if the current player is seeking. |
| `duration` | ✓ | - | Returns the duration for the current media. |
| `volume` | ✓ | ✓ | Gets or sets the volume for the player. The setter accepts a float between 0 and 1. |
| `muted` | ✓ | ✓ | Gets or sets the muted state of the player. The setter accepts a boolean. |
| `hasAudio` | ✓ | - | Returns a boolean indicating if the current media has an audio track. |
| `speed` | ✓ | ✓ | Gets or sets the speed for the player. The setter accepts a value in the options specified in your config. Generally the minimum should be 0.5. |
| `quality`&sup1; | ✓ | ✓ | Gets or sets the quality for the player. The setter accepts a value from the options specified in your config. |
| `loop` | ✓ | ✓ | Gets or sets the current loop state of the player. The setter accepts a boolean. |
| `source` | ✓ | ✓ | Gets or sets the current source for the player. The setter accepts an object. See [source setter](#the-source-setter) below for examples. |
| `poster` | ✓ | ✓ | Gets or sets the current poster image for the player. The setter accepts a string; the URL for the updated poster image. |
| `previewThumbnails` | ✓ | ✓ | Gets or sets the current preview thumbnail source for the player. The setter accepts a string |
| `autoplay` | ✓ | ✓ | Gets or sets the autoplay state of the player. The setter accepts a boolean. |
| `currentTrack` | ✓ | ✓ | Gets or sets the caption track by index. `-1` means the track is missing or captions is not active |
| `language` | ✓ | ✓ | Gets or sets the preferred captions language for the player. The setter accepts an ISO two-letter language code. Support for the languages is dependent on the captions you include. If your captions don't have any language data, or if you have multiple tracks with the same language, you may want to use `currentTrack` instead. |
| `fullscreen.active` | ✓ | - | Returns a boolean indicating if the current player is in fullscreen mode. |
| `fullscreen.enabled` | ✓ | - | Returns a boolean indicating if the current player has fullscreen enabled. |
| `pip`&sup1; | ✓ | ✓ | Gets or sets the picture-in-picture state of the player. The setter accepts a boolean. This currently only supported on Safari 10+ (on MacOS Sierra+ and iOS 10+) and Chrome 70+. |
| `ratio` | ✓ | ✓ | Gets or sets the video aspect ratio. The setter accepts a string in the same format as the `ratio` option. |
| `download` | ✓ | ✓ | Gets or sets the URL for the download button. The setter accepts a string containing a valid absolute URL. |
1. HTML5 only
### The `.source` setter
This allows changing the player source and type on the fly.
Video example:
```javascript
player.source = {
type: 'video',
title: 'Example title',
sources: [
{
src: '/path/to/movie.mp4',
type: 'video/mp4',
size: 720,
},
{
src: '/path/to/movie.webm',
type: 'video/webm',
size: 1080,
},
],
poster: '/path/to/poster.jpg',
previewThumbnails: {
src: '/path/to/thumbnails.vtt',
},
tracks: [
{
kind: 'captions',
label: 'English',
srclang: 'en',
src: '/path/to/captions.en.vtt',
default: true,
},
{
kind: 'captions',
label: 'French',
srclang: 'fr',
src: '/path/to/captions.fr.vtt',
},
],
};
```
Audio example:
```javascript
player.source = {
type: 'audio',
title: 'Example title',
sources: [
{
src: '/path/to/audio.mp3',
type: 'audio/mp3',
},
{
src: '/path/to/audio.ogg',
type: 'audio/ogg',
},
],
};
```
YouTube example:
```javascript
player.source = {
type: 'video',
sources: [
{
src: 'bTqVqk7FSmY',
provider: 'youtube',
},
],
};
```
Vimeo example
```javascript
player.source = {
type: 'video',
sources: [
{
src: '143418951',
provider: 'vimeo',
},
],
};
```
_Note:_ `src` property for YouTube and Vimeo can either be the video ID or the whole URL.
| Property | Type | Description |
| ------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type` | String | Either `video` or `audio`. _Note:_ YouTube and Vimeo are currently not supported as audio sources. |
| `title` | String | _Optional._ Title of the new media. Used for the `aria-label` attribute on the play button, and outer container. YouTube and Vimeo are populated automatically. |
| `sources` | Array | This is an array of sources. For HTML5 media, the properties of this object are mapped directly to HTML attributes so more can be added to the object if required. |
| `poster`&sup1; | String | The URL for the poster image (HTML5 video only). |
| `tracks`&sup1; | String | An array of track objects. Each element in the array is mapped directly to a track element and any keys mapped directly to HTML attributes so as in the example above, it will render as `<track kind="captions" label="English" srclang="en" src="https://cdn.selz.com/plyr/1.0/example_captions_en.vtt" default>` and similar for the French version. Booleans are converted to HTML5 value-less attributes. |
| `previewThumbnails`&sup1; | Object | The same object like in the `previewThumbnails` constructor option. This means you can either change the thumbnails vtt via the `src` key or disable the thumbnails plugin for the next video by passing `{ enabled: false }`. |
1. HTML5 only
# Events
You can listen for events on the target element you setup Plyr on (see example under the table). Some events only apply to HTML5 audio and video. Using your
reference to the instance, you can use the `on()` API method or `addEventListener()`. Access to the API can be obtained this way through the `event.detail.plyr`
property. Here's an example:
```javascript
player.on('ready', (event) => {
const instance = event.detail.plyr;
});
```
## Standard Media Events
| Event Type | Description |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `progress` | Sent periodically to inform interested parties of progress downloading the media. Information about the current amount of the media that has been downloaded is available in the media element's `buffered` attribute. |
| `playing` | Sent when the media begins to play (either for the first time, after having been paused, or after ending and then restarting). |
| `play` | Sent when playback of the media starts after having been paused; that is, when playback is resumed after a prior `pause` event. |
| `pause` | Sent when playback is paused. |
| `timeupdate` | The time indicated by the element's `currentTime` attribute has changed. |
| `volumechange` | Sent when the audio volume changes (both when the volume is set and when the `muted` state is changed). |
| `seeking` | Sent when a seek operation begins. |
| `seeked` | Sent when a seek operation completes. |
| `ratechange` | Sent when the playback speed changes. |
| `ended` | Sent when playback completes. _Note:_ This does not fire if `autoplay` is true. |
| `enterfullscreen` | Sent when the player enters fullscreen mode (either the proper fullscreen or full-window fallback for older browsers). |
| `exitfullscreen` | Sent when the player exits fullscreen mode. |
| `captionsenabled` | Sent when captions are enabled. |
| `captionsdisabled` | Sent when captions are disabled. |
| `languagechange` | Sent when the caption language is changed. |
| `controlshidden` | Sent when the controls are hidden. |
| `controlsshown` | Sent when the controls are shown. |
| `ready` | Triggered when the instance is ready for API calls. |
### HTML5 only
| Event Type | Description |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `loadstart` | Sent when loading of the media begins. |
| `loadeddata` | The first frame of the media has finished loading. |
| `loadedmetadata` | The media's metadata has finished loading; all attributes now contain as much useful information as they're going to. |
| `qualitychange` | The quality of playback has changed. |
| `canplay` | Sent when enough data is available that the media can be played, at least for a couple of frames. This corresponds to the `HAVE_ENOUGH_DATA` `readyState`. |
| `canplaythrough` | Sent when the ready state changes to `CAN_PLAY_THROUGH`, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level. _Note:_ Manually setting the `currentTime` will eventually fire a `canplaythrough` event in firefox. Other browsers might not fire this event. |
| `stalled` | Sent when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming. |
| `waiting` | Sent when the requested operation (such as playback) is delayed pending the completion of another operation (such as a seek). |
| `emptied` | he media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the `load()` method is called to reload it. |
| `cuechange` | Sent when a `TextTrack` has changed the currently displaying cues. |
| `error` | Sent when an error occurs. The element's `error` attribute contains more information. |
### YouTube only
| Event Type | Description |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `statechange` | The state of the player has changed. The code can be accessed via `event.detail.code`. Possible values are `-1`: Unstarted, `0`: Ended, `1`: Playing, `2`: Paused, `3`: Buffering, `5`: Video cued. See the [YouTube Docs](https://developers.google.com/youtube/iframe_api_reference#onStateChange) for more information. |
_Note:_ These events also bubble up the DOM. The event target will be the container element.
Some event details borrowed from [MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Media_events).
# Embeds
YouTube and Vimeo are currently supported and function much like a HTML5 video. Similar events and API methods are available for all types. However if you wish
to access the API's directly. You can do so via the `embed` property of your player object - e.g. `player.embed`. You can then use the relevant methods from the
third party APIs. More info on the respective API's here:
- [YouTube iframe API Reference](https://developers.google.com/youtube/iframe_api_reference)
- [Vimeo player.js Reference](https://github.com/vimeo/player.js)
_Note_: Not all API methods may work 100%. Your mileage may vary. It's better to use the Plyr API where possible.
# Shortcuts
By default, a player will bind the following keyboard shortcuts when it has focus. If you have the `global` option to `true` and there's only one player in the
document then the shortcuts will work when any element has focus, apart from an element that requires input.
| Key | Action |
| ---------- | -------------------------------------- |
| `0` to `9` | Seek from 0 to 90% respectively |
| `space` | Toggle playback |
| `K` | Toggle playback |
| &larr; | Seek backward by the `seekTime` option |
| &rarr; | Seek forward by the `seekTime` option |
| &uarr; | Increase volume |
| &darr; | Decrease volume |
| `M` | Toggle mute |
| `F` | Toggle fullscreen |
| `C` | Toggle captions |
| `L` | Toggle loop |
# Preview thumbnails
It's possible to display preview thumbnails as per the demo when you hover over the scrubber or while you are scrubbing in the main video area. This can be used for all video types but is easiest with HTML5 of course. You will need to generate the sprite or images yourself. This is possible using something like AWS transcoder to generate the frames and then combine them into a sprite image. Sprites are recommended for performance reasons - they will be much faster to download and easier to compress into a small file size making them load faster.
You can see the example VTT files [here](https://cdn.plyr.io/static/demo/thumbs/100p.vtt) and [here](https://cdn.plyr.io/static/demo/thumbs/240p.vtt) for how the sprites are done. The coordinates are set as the `xywh` hash on the URL in the order X Offset, Y Offset, Width, Height (e.g. `240p-00001.jpg#xywh=1708,480,427,240` is offset `1708px` from the left, `480px` from the top and is `427x240px`. If you want to include images per frame, this is also possible but will be slower, resulting in a degraded experience.
# Fullscreen
Fullscreen in Plyr is supported by all browsers that [currently support it](http://caniuse.com/#feat=fullscreen).
# Browser support
Plyr supports the last 2 versions of most _modern_ browsers.
| Browser | Supported |
| ------------- | --------------- |
| Safari | ✓ |
| Mobile Safari | ✓&sup1; |
| Firefox | ✓ |
| Chrome | ✓ |
| Opera | ✓ |
| Edge | ✓ |
| IE11 | ✓&sup3; |
| IE10 | ✓<sup>2,3</sup> |
1. Mobile Safari on the iPhone forces the native player for `<video>` unless the `playsinline` attribute is present. Volume controls are also disabled as they are handled device wide.
2. Native player used (no support for `<progress>` or `<input type="range">`) but the API is supported. No native fullscreen support, fallback can be used (see [options](#options)).
3. Polyfills required. See below.
## Polyfills
Plyr uses ES6 which isn't supported in all browsers quite yet. This means some features will need to be polyfilled to be available otherwise you'll run into issues. We've elected to not burden the ~90% of users that do support these features with extra JS and instead leave polyfilling to you to work out based on your needs. The easiest method I've found is to use [polyfill.io](https://polyfill.io) which provides polyfills based on user agent. This is the method the demo uses.
## Checking for support
You can use the static method to check for support. For example
```javascript
const supported = Plyr.supported('video', 'html5', true);
```
The arguments are:
- Media type (`audio` or `video`)
- Provider (`html5`, `youtube` or `vimeo`)
- Whether the player has the `playsinline` attribute (only applicable to iOS 10+)
## Disable support programmatically
The `enabled` option can be used to disable certain User Agents. For example, if you don't want to use Plyr for smartphones, you could use:
```javascript
{
enabled: !/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
}
```
If a User Agent is disabled but supports `<video>` and `<audio>` natively, it will use the native player.
# Plugins & Components
Some awesome folks have made plugins for CMSs and Components for JavaScript frameworks:
| Type | Maintainer | Link |
| ----------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| WordPress | Brandon Lavigne ([@drrobotnik](https://github.com/drrobotnik)) | [https://wordpress.org/plugins/plyr/](https://wordpress.org/plugins/plyr/) |
| Angular | Simon Bobrov ([@smnbbrv](https://github.com/smnbbrv)) | [https://github.com/smnbbrv/ngx-plyr](https://github.com/smnbbrv/ngx-plyr) |
| React | Chintan Prajapati ([@chintan9](https://github.com/chintan9)) | [https://github.com/chintan9/plyr-react](https://github.com/chintan9/plyr-react) |
| Vue | Gabe Dunn ([@redxtech](https://github.com/redxtech)) | [https://github.com/redxtech/vue-plyr](https://github.com/redxtech/vue-plyr) |
| Neos | Jon Uhlmann ([@jonnitto](https://github.com/jonnitto)) | [https://packagist.org/packages/jonnitto/plyr](https://packagist.org/packages/jonnitto/plyr) |
| Kirby | Dominik Pschenitschni ([@dpschen](https://github.com/dpschen)) | [https://github.com/dpschen/kirby-plyrtag](https://github.com/dpschen/kirby-plyrtag) |
| REDAXO | FriendsOfRedaxo / skerbis ([@skerbis](https://friendsofredaxo.github.io)) | [https://github.com/FriendsOfREDAXO/plyr](https://github.com/FriendsOfREDAXO/plyr) |
| svelte-plyr | Ben Woodward / benwoodward ([@benwoodward](https://github.com/benwoodward)) | [https://github.com/benwoodward/svelte-plyr](https://github.com/benwoodward/svelte-plyr) |
# Issues
If you find anything weird with Plyr, please let us know using the GitHub issues tracker.
# Author
Plyr is developed by [@sam_potts](https://twitter.com/sam_potts) / [sampotts.me](http://sampotts.me) with help from the awesome
[contributors](https://github.com/sampotts/plyr/graphs/contributors)
# Donate
Plyr costs money to run, not only my time. I donate my time for free as I enjoy building Plyr but unfortunately have to pay for domains, hosting, and more. Any help with costs is appreciated...
- [Donate via Patreon](https://www.patreon.com/plyr)
- [Donate via PayPal](https://www.paypal.me/pottsy/20usd)
# Mentions
- [ProductHunt](https://www.producthunt.com/tech/plyr)
- [The Changelog](http://thechangelog.com/plyr-simple-html5-media-player-custom-controls-webvtt-captions/)
- [HTML5 Weekly #177](http://html5weekly.com/issues/177)
- [Responsive Design #149](http://us4.campaign-archive2.com/?u=559bc631fe5294fc66f5f7f89&id=451a61490f)
- [Web Design Weekly #174](https://web-design-weekly.com/2015/02/24/web-design-weekly-174/)
- [Front End Focus #177](https://frontendfoc.us/issues/177)
- [Hacker News](https://news.ycombinator.com/item?id=9136774)
- [Web Platform Daily](http://webplatformdaily.org/releases/2015-03-04)
- [LayerVault Designer News](https://news.layervault.com/stories/45394-plyr--a-simple-html5-media-player)
- [The Treehouse Show #131](https://teamtreehouse.com/library/episode-131-origami-react-responsive-hero-images)
- [noupe.com](http://www.noupe.com/design/html5-plyr-is-a-responsive-and-accessible-video-player-94389.html)
# Used by
- [Selz.com](https://selz.com)
- [Peugeot.fr](http://www.peugeot.fr/marque-et-technologie/technologies/peugeot-i-cockpit.html)
- [Peugeot.de](http://www.peugeot.de/modelle/modellberater/208-3-turer/fotos-videos.html)
- [TomTom.com](http://prioritydriving.tomtom.com/)
- [DIGBMX](http://digbmx.com/)
- [Grime Archive](https://grimearchive.com/)
- [koel - A personal music streaming server that works.](http://koel.phanan.net/)
- [Oscar Radio](http://oscar-radio.xyz/)
- [Sparkk TV](https://www.sparkktv.com/)
- [@halfhalftravel](https://www.halfhalftravel.com/)
- [BitChute](https://www.bitchute.com)
- [Rutheneum-Bote](https://gymnasium-rutheneum.de/content/newspaper/kreativwettbewerb.php)
- [pressakey.com | Blog-Magazin für Videospiele](https://pressakey.com)
- [STROLLÿN: Work with a View](https://strollyn.com)
- [CFDA Runway360](https://runway360.cfda.com/)
If you want to be added to the list, open a pull request. It'd be awesome to see how you're using Plyr 😎
# Useful links and credits
- [PayPal's Accessible HTML5 Video Player (which Plyr was originally ported from)](https://github.com/paypal/accessible-html5-video-player)
- [An awesome guide for Plyr in Japanese!](http://syncer.jp/how-to-use-plyr-io) by [@arayutw](https://twitter.com/arayutw)
# Thanks
[![Fastly](https://cdn.plyr.io/static/fastly-logo.png)](https://www.fastly.com/)
Massive thanks to [Fastly](https://www.fastly.com/) for providing the CDN services.
[![Sentry](https://cdn.plyr.io/static/sentry-logo-black.svg)](https://sentry.io/)
Massive thanks to [Sentry](https://sentry.io/) for providing the logging services for the demo site.
## Contributors
### Code Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/sampotts/plyr/graphs/contributors"><img src="https://opencollective.com/plyr/contributors.svg?width=890&button=false" /></a>
### Financial Contributors
Become a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/plyr/contribute)]
#### Individuals
<a href="https://opencollective.com/plyr"><img src="https://opencollective.com/plyr/individuals.svg?width=890"></a>
#### Organizations
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/plyr/contribute)]
<a href="https://opencollective.com/plyr/organization/0/website"><img src="https://opencollective.com/plyr/organization/0/avatar.svg"></a>
<a href="https://opencollective.com/plyr/organization/1/website"><img src="https://opencollective.com/plyr/organization/1/avatar.svg"></a><a href="https://opencollective.com/plyr/organization/2/website"><img src="https://opencollective.com/plyr/organization/2/avatar.svg"></a>
# Copyright and License
[The MIT license](LICENSE.md)

View File

@@ -1,33 +0,0 @@
{
"name": "plyr",
"description": "A simple HTML5 media player using custom controls",
"homepage": "http://plyr.io",
"keywords": [
"Audio",
"Video",
"HTML5 Audio",
"HTml5 Video"
],
"authors": [
"Sam Potts <me@sampotts.me>"
],
"dependencies": {},
"main": [
"dist/plyr.css",
"dist/plyr.js",
"dist/sprite.svg",
"src/less/plyr.less",
"src/sass/plyr.scss",
"src/js/plyr.js"
],
"ignore": [
"node_modules",
"bower_components",
".gitignore"
],
"repository": {
"type": "git",
"url": "git://github.com/selz/plyr.git"
},
"license": "MIT"
}

48
build.json Normal file
View File

@@ -0,0 +1,48 @@
{
"js": {
"plyr.js": {
"src": "./src/js/plyr.js",
"dist": "./dist/",
"formats": ["es", "umd"],
"namespace": "Plyr"
},
"plyr.polyfilled.js": {
"src": "./src/js/plyr.polyfilled.js",
"dist": "./dist/",
"formats": ["es", "umd"],
"namespace": "Plyr",
"polyfill": true
},
"demo.js": {
"src": "./demo/src/js/demo.js",
"dist": "./demo/dist/",
"formats": ["iife"],
"namespace": "Demo",
"polyfill": true
}
},
"css": {
"plyr.css": {
"src": "./src/sass/plyr.scss",
"dist": "./dist/"
},
"demo.css": {
"src": "./demo/src/sass/bundles/demo.scss",
"dist": "./demo/dist/"
},
"error.css": {
"src": "./demo/src/sass/bundles/error.scss",
"dist": "./demo/dist/"
}
},
"sprite": {
"plyr.svg": {
"src": "./src/sprite/*.svg",
"dist": "./dist"
},
"demo.svg": {
"src": "./src/sprite/*.svg",
"dist": "./demo/dist"
}
}
}

View File

@@ -1,24 +0,0 @@
{
"plyr": {
"less": {
"plyr.css": ["src/less/plyr.less"]
},
"sass": {
"plyr.css": ["src/sass/plyr.sass"]
},
"js": {
"plyr.js": ["src/js/plyr.js"]
}
},
"docs": {
"less": {
"docs.css": ["docs/src/less/docs.less"]
},
"js": {
"docs.js": [
"docs/src/js/lib/classlist.js",
"docs/src/js/docs.js"
]
}
}
}

View File

@@ -1,260 +0,0 @@
# Changelog
## v1.5.8
- Fix for touch device seek tooltip
- Seek improvements
## v1.5.7
- Fix for control tooltips always showing
## v1.5.6
- Seek tooltip (option for tooltips changed, please check docs)
- SASS compile error fixes (fixes #148)
- Fullscreen fixes for controls not always hiding/showing (fixes #149)
- Screen reader icon fixes (title was being read twice due to the tooltip/hidden label)
## v1.5.5
- Fixed controls.md example
- Bug fix for docs error page
- Bug fix for controls tooltips
## v1.5.4
- Minor bug fix for clicking video to play/pause after source change
## v1.5.3
- Minor bug fix for occasional display of 0:00 as the media duration
## v1.5.2
- `handlers` option renamed to `listeners`
- Added event listeners for all types to the plyr container (playback, fullscreen, captions etc - see docs)
- Removed onSetup config option (use the 'setup' event instead, plyr element is event.plyr)
- Style bug fixes
- Vimeo seek bug fix (requires whole seconds when seeking)
- Fix for fullscreen player (using class hook, not browser fullscreen)
## v1.5.1
- Fix for event listeners being duplicated on source change
# v1.5.0
- Vimeo support (fixes #8)
- New options for initialization (you can now pass a selector, HTMLElement or NodeList) (fixes #118)
- Switched to BEM methodology (you will need to change CSS and probably HTML)
- Decoupled CSS and JS hooks (fixes #129)
- Custom controls container (fixes #98)
- Fix for private/incognito mode local storage bug (fixes #131)
- UMD module setup (fixes #121)
- Specify iframe title for Vimeo and YouTube (fixes #124)
- Better handling of mission controls (fixes #132)
- Retain classname on source change (fixes #120)
- Increased thumb size on seek (partially fixes #130)
- Passing no argument to `source` api method, now returns current source (by @gurupras)
- Ability to add custom handlers to controls prior to Plyr bindings (by @gurupras)
- Keyboard navigation improvements (focus on seek, focus trap in fullscreen) (fixes #135)
## v1.3.5
- Fixed bug with API use on basic supported browsers
## v1.3.4
- Code cleanup by @calvintam236
## v1.3.3
- Removed captions being read by screen readers
## v1.3.2
- Voiceover fix for captions
## v1.3.1
- ARIA improvements for captions being read
## v1.3.0
- Internationalization support (i18n) using default controls (required markup changes to controls)
- ARIA enhancements for controls (required markup changes to controls)
- Captions legibility improvements
- YouTube bug fixes
## v1.2.6
- SASS updates and fixes (cheers @ChristianPV)
## v1.2.5
- Fix for YouTube quality (let them decide quality)
## v1.2.4
- Fix for omitted kind attribute on <track> (fixes #88)
## v1.2.3
- Fix for YouTube on iPhone or unsupported browsers (fallback to YouTube native)
- Docs tidy up
- Fullscreen for Safari fix (Fixes #96)
## v1.2.2
- Fix for :focus keyboard vs mouse (Fixes #61)
- Fix for caption positioning in full screen (Fixes #92)
## v1.2.1
- Tooltip bug fix
# v1.2.0
- Added YouTube support
## v1.1.13
- Added icon prefix option for when using default controls
## v1.1.13
- Logic tweaks for hiding controls in fullscreen
## v1.1.12
- Bug fix for Chrome Canary
## v1.1.11
- Bug fix
## v1.1.10
- Bug fix
## v1.1.9
- Bug fix for 1.1.8
## v1.1.8
- setVolume API method improvements (Fixes #83)
## v1.1.7
- Restore classname on destroy()
## v1.1.6
- New API methods (fixes #77), Fix for non strict mode (fixes #78)
## v1.1.5
- Fix for incorrect `isFullscreen()` return value in Mozilla (Fixes #38)
## v1.1.4
- Minor bug fixes
## v1.1.3
- Fixes for random id used in controls with multiple instances and one call to setup
- Audio player UI improvements
## v1.1.2
- Added an onSetup callback option
- Added fullscreen API methods `toggleFullscreen()` (must be user iniated), and `isFullscreen()`
## v1.1.1
- Fix for unsupported browser handling
- Fix for config.controls having no effect
## v1.1.0
- Added config option to set which controls are shown (if using the default controls html) and better handling of missing controls
## v1.0.31
- Display duration on `metadataloaded`
## v1.0.30
- Fixed bug with media longer than 60 minutes (Fixes #69)
## v1.0.29
- Added option to hide controls on fullscreen (default `true`) while palying, after 1s. Pause, mouse hover on progress, or focus on a child control re-shows the controls. On touch a tap of the video (which plays/pauses the video by default) is required. (Fixes #47)
- Fixed a bug with caption toggle in 1.0.28
## v1.0.28
- Added API support for browsers that don't have full plyr support (pretty much <=IE9 and `<video>` on iPhone/iPod)
## v1.0.27
- Keyboard accessibility improvements (Fixes #66)
## v1.0.26
- Fixes for SASS (cheers @brunowego)
- Indentation reset to 4 spaces
## v1.0.25
- Fixes for iOS volume controls (hidden)
- Classnames for left/right controls changed
## v1.0.24
- Added tooltip option to display labels as tooltips (Fixes #50)
## v1.0.23
- Handling loading states in the UI (Fixes #36)
## v1.0.22
- Added support() API method for checking mimetype support
- Added source() API method for setting media source(s) (Fixes #44)
- Added poster() API method for setting poster source
- Refactored captions logic for manual captions
## v1.0.21
- Added an <input type="range"> for seeking to improve experience (and support dragging) (Fixes #40, #42)
- Icons for restart and captions improved (and some IDs changed) (Fixes #49)
## v1.0.20
- Default controls included (Fixes #45)
- Volume changes on `input` as well as `change` (Fixes #43)
- Fix for undefined Play text
- License changed to MIT
## v1.0.19
- Fixed firefox fullscreen issue (Fixes #38)
## v1.0.18
- Added CDN references
## v1.0.17
- SASS support added (thanks to @brunowego)
- Docs completely separated to avoid any confusion
- New gulp tasks (will add more documentation for this)
## v1.0.16
- Aria label is now dynamic
## v1.0.15
- Fix for seek time display in controls
- More documentation for controls html
## v1.0.14
- Minor change for bootstrap compatibility
## v1.0.13
- Minor tweaks
## v1.0.12
- Handle native events (Issue #34)
## v1.0.11
- Bug fixes for fullscreen mode
## v1.0.10
- Bower includes src files now
- Folder re-arrangement
## v1.0.9
- Added buffer progress bar
- Fixed Safari 8 caption track (it needs to be removed from the DOM like in Safari 7)
- Added validation (it works or it doesn't basically) of the `html` option passed
## v1.0.8
- Bug fix
## v1.0.7
- Storing user selected volume in local storage
## v1.0.6
- Fullscreen fallback for older browsers to use "full window"
## v1.0.5
- More minor bug fixes and improvements
## v1.0.4
- Fixed caption legibility issues
## v1.0.3
- Minor bug fixes
## v1.0.2
- Added OGG to <audio> example for Firefox
- Fixed IE11 fullscreen issues
## v1.0.1
- Bug fixes for IE (as per usual)
- Added CSS hooks for media type
- Return instances of Plyr to the element
## v1.0.0
- Initial release

View File

@@ -1,115 +0,0 @@
# Controls
This is the markup that is rendered for the Plyr controls. You can use the default controls or provide a customized version of markup based on your needs.
## Internationalization using default controls
You can provide an `i18n` object as one of your options when initialising the plugin which we be used when rendering the controls.
### Example
```javascript
i18n: {
restart: "Restart",
rewind: "Rewind {seektime} secs",
play: "Play",
pause: "Pause",
forward: "Forward {seektime} secs",
played: "played",
buffered: "buffered",
currentTime: "Current time",
duration: "Duration",
volume: "Volume",
toggleMute: "Toggle Mute",
toggleCaptions: "Toggle Captions",
toggleFullscreen: "Toggle Fullscreen"
}
```
Note: `{seektime}` will be replaced with your configured seek time or the default. For example "Forward {seektime} secs" would render as "Forward 10 secs".
## Using custom HTML
You can specify the HTML for the controls using the `html` option.
The classes and data attributes used in your template should match the `selectors` option.
You need to add several placeholders to your html template that are replaced when rendering:
- `{id}` - the dynamically generated ID for the player (for form controls)
- `{seektime}` - the seek time specified in options for fast forward and rewind
You can include only the controls you need when specifying custom html.
### Example
This is an example `html` option with all controls.
```javascript
var controls = ["<div class='plyr__controls'>",
"<div class='plyr__progress'>",
"<label for='seek{id}' class='plyr__sr-only'>Seek</label>",
"<input id='seek{id}' class='plyr__progress--seek' type='range' min='0' max='100' step='0.1' value='0' data-plyr='seek'>",
"<progress class='plyr__progress--played' max='100' value='0'>",
"<span>0</span>% played",
"</progress>",
"<progress class='plyr__progress--buffer' max='100' value='0'>",
"<span>0</span>% buffered",
"</progress>",
"</div>",
"<span class='plyr__controls--left'>",
"<button type='button' data-plyr='restart'>",
"<svg><use xlink:href='#icon-restart'></use></svg>",
"<span class='plyr__sr-only'>Restart</span>",
"</button>",
"<button type='button' data-plyr='rewind'>",
"<svg><use xlink:href='#icon-rewind'></use></svg>",
"<span class='plyr__sr-only'>Rewind {seektime} secs</span>",
"</button>",
"<button type='button' data-plyr='play'>",
"<svg><use xlink:href='#icon-play'></use></svg>",
"<span class='plyr__sr-only'>Play</span>",
"</button>",
"<button type='button' data-plyr='pause'>",
"<svg><use xlink:href='#icon-pause'></use></svg>",
"<span class='plyr__sr-only'>Pause</span>",
"</button>",
"<button type='button' data-plyr='fast-forward'>",
"<svg><use xlink:href='#icon-fast-forward'></use></svg>",
"<span class='plyr__sr-only'>Forward {seektime} secs</span>",
"</button>",
"<span class='plyr__time'>",
"<span class='plyr__sr-only'>Current time</span>",
"<span class='plyr__current-time'>00:00</span>",
"</span>",
"<span class='plyr__time'>",
"<span class='plyr__sr-only'>Duration</span>",
"<span class='plyr__duration'>00:00</span>",
"</span>",
"</span>",
"<span class='plyr__controls--right'>",
"<button type='button' data-plyr='mute'>",
"<svg class='icon--muted'><use xlink:href='#icon-muted'></use></svg>",
"<svg><use xlink:href='#icon-volume'></use></svg>",
"<span class='plyr__sr-only'>Toggle Mute</span>",
"</button>",
"<label for='volume{id}' class='plyr__sr-only'>Volume</label>",
"<input id='volume{id}' class='plyr__volume' type='range' min='0' max='10' value='5' data-plyr='volume'>",
"<button type='button' data-plyr='captions'>",
"<svg class='icon--captions-on'><use xlink:href='#icon-captions-on'></use></svg>",
"<svg><use xlink:href='#icon-captions-off'></use></svg>",
"<span class='plyr__sr-only'>Toggle Captions</span>",
"</button>",
"<button type='button' data-plyr='fullscreen'>",
"<svg class='icon--exit-fullscreen'><use xlink:href='#icon-exit-fullscreen'></use></svg>",
"<svg><use xlink:href='#icon-enter-fullscreen'></use></svg>",
"<span class='plyr__sr-only'>Toggle Fullscreen</span>",
"</button>",
"</span>",
"</div>"].join("\n");
// Setup the player
plyr.setup('.js-player', {
html: controls
});
```

34
cspell.json Normal file
View File

@@ -0,0 +1,34 @@
{
"version": "0.2",
"ignorePaths": ["package.json", "dist/*", "demo/node_modules/*"],
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"autopause",
"autoplay",
"bote",
"cfda",
"classname",
"digbmx",
"fastly",
"fullscreen",
"gordita",
"magazin",
"menuitemradio",
"noupe",
"playsinline",
"plyr",
"rutheneum",
"seektime",
"selz",
"sparkk",
"srclang",
"strol",
"stylelint",
"unmute",
"videospiele",
"xywh"
],
"ignoreWords": [],
"import": []
}

31
demo/error.html Normal file
View File

@@ -0,0 +1,31 @@
<!doctype html>
<html lang="en" class="error">
<head>
<meta charset="utf-8" />
<title>Doh. Looks like something went wrong.</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Icons -->
<link rel="icon" href="https://cdn.plyr.io/static/icons/favicon.ico">
<link rel="icon" type="image/png" href="https://cdn.plyr.io/static/icons/32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.plyr.io/static/icons/16x16.png" sizes="16x16">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.plyr.io/static/icons/180x180.png">
<!-- Docs styles -->
<link rel="stylesheet" href="dist/error.css?v=2">
<!-- Preload -->
<link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/static/fonts/gordita-medium.woff2">
<link rel="preload" as="font" crossorigin type="font/woff2" href="https://cdn.plyr.io/static/fonts/gordita-bold.woff2">
</head>
<body>
<main>
<h1>Doh.</h1>
<p>Looks like something went wrong.</p>
<a href="javascript:history.back()" class="button">Go back</a>
</main>
</body>
</html>

260
demo/index.html Normal file
View File

@@ -0,0 +1,260 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Plyr - A simple, customizable HTML5 Video, Audio, YouTube and Vimeo player</title>
<meta
name="description"
property="og:description"
content="A simple HTML5 media player with custom controls and WebVTT captions."
/>
<meta name="author" content="Sam Potts" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Icons -->
<link rel="icon" href="https://cdn.plyr.io/static/icons/favicon.ico" />
<link rel="icon" type="image/png" href="https://cdn.plyr.io/static/icons/32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="https://cdn.plyr.io/static/icons/16x16.png" sizes="16x16" />
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.plyr.io/static/icons/180x180.png" />
<!-- Open Graph -->
<meta property="og:title" content="Plyr - A simple, customizable HTML5 Video, Audio, YouTube and Vimeo player" />
<meta property="og:site_name" content="Plyr" />
<meta property="og:url" content="https://plyr.io" />
<meta property="og:image" content="https://cdn.plyr.io/static/icons/1200x630.png" />
<!-- Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@sam_potts" />
<meta name="twitter:creator" content="@sam_potts" />
<meta name="twitter:card" content="summary_large_image" />
<!-- Docs styles -->
<link rel="stylesheet" href="dist/demo.css" />
<!-- Preload -->
<link
rel="preload"
as="font"
crossorigin
type="font/woff2"
href="https://cdn.plyr.io/static/fonts/gordita-medium.woff2"
/>
<link
rel="preload"
as="font"
crossorigin
type="font/woff2"
href="https://cdn.plyr.io/static/fonts/gordita-bold.woff2"
/>
<!-- Google Analytics-->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-132699580-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-132699580-1');
</script>
</head>
<body>
<div class="grid">
<header>
<h1>Pl<span>a</span>y<span>e</span>r</h1>
<p>
A simple, accessible and customisable media player for
<button type="button" class="faux-link" data-source="video">
<svg class="icon">
<title>HTML5</title>
<path
d="M14.738.326C14.548.118 14.28 0 14 0H2c-.28 0-.55.118-.738.326S.98.81 1.004 1.09l1 11c.03.317.208.603.48.767l5 3c.16.095.338.143.516.143s.356-.048.515-.143l5-3c.273-.164.452-.45.48-.767l1-11c.026-.28-.067-.557-.257-.764zM12 4H6v2h6v5.72l-4 1.334-4-1.333V9h2v1.28l2 .666 2-.667V8H4V2h8v2z"
></path></svg
>Video</button
>,
<button type="button" class="faux-link" data-source="audio">
<svg class="icon">
<title>HTML5</title>
<path
d="M14.738.326C14.548.118 14.28 0 14 0H2c-.28 0-.55.118-.738.326S.98.81 1.004 1.09l1 11c.03.317.208.603.48.767l5 3c.16.095.338.143.516.143s.356-.048.515-.143l5-3c.273-.164.452-.45.48-.767l1-11c.026-.28-.067-.557-.257-.764zM12 4H6v2h6v5.72l-4 1.334-4-1.333V9h2v1.28l2 .666 2-.667V8H4V2h8v2z"
></path></svg
>Audio</button
>,
<button type="button" class="faux-link" data-source="youtube">
<svg class="icon" role="presentation">
<title>YouTube</title>
<path
d="M15.8,4.8c-0.2-1.3-0.8-2.2-2.2-2.4C11.4,2,8,2,8,2S4.6,2,2.4,2.4C1,2.6,0.3,3.5,0.2,4.8C0,6.1,0,8,0,8
s0,1.9,0.2,3.2c0.2,1.3,0.8,2.2,2.2,2.4C4.6,14,8,14,8,14s3.4,0,5.6-0.4c1.4-0.3,2-1.1,2.2-2.4C16,9.9,16,8,16,8S16,6.1,15.8,4.8z
M6,11V5l5,3L6,11z"
></path></svg
>YouTube
</button>
and
<button type="button" class="faux-link" data-source="vimeo">
<svg class="icon" role="presentation">
<title>Vimeo</title>
<path
d="M16,4.3c-0.1,1.6-1.2,3.7-3.3,6.4c-2.2,2.8-4,4.2-5.5,4.2c-0.9,0-1.7-0.9-2.4-2.6C4,9.9,3.4,5,2,5
C1.9,5,1.5,5.3,0.8,5.8L0,4.8c0.8-0.7,3.5-3.4,4.7-3.5C5.9,1.2,6.7,2,7,3.8c0.3,2,0.8,6.1,1.8,6.1c0.9,0,2.5-3.4,2.6-4
c0.1-0.9-0.3-1.9-2.3-1.1c0.8-2.6,2.3-3.8,4.5-3.8C15.3,1.1,16.1,2.2,16,4.3z"
></path></svg
>Vimeo
</button>
</p>
<div class="call-to-action">
<a href="https://github.com/sampotts/plyr" target="_blank" class="button js-shr">
<svg class="icon" role="presentation">
<title>GitHub</title>
<path
d="M8,0.2c-4.4,0-8,3.6-8,8c0,3.5,2.3,6.5,5.5,7.6
C5.9,15.9,6,15.6,6,15.4c0-0.2,0-0.7,0-1.4C3.8,14.5,3.3,13,3.3,13c-0.4-0.9-0.9-1.2-0.9-1.2c-0.7-0.5,0.1-0.5,0.1-0.5
c0.8,0.1,1.2,0.8,1.2,0.8C4.4,13.4,5.6,13,6,12.8c0.1-0.5,0.3-0.9,0.5-1.1c-1.8-0.2-3.6-0.9-3.6-4c0-0.9,0.3-1.6,0.8-2.1
c-0.1-0.2-0.4-1,0.1-2.1c0,0,0.7-0.2,2.2,0.8c0.6-0.2,1.3-0.3,2-0.3c0.7,0,1.4,0.1,2,0.3c1.5-1,2.2-0.8,2.2-0.8
c0.4,1.1,0.2,1.9,0.1,2.1c0.5,0.6,0.8,1.3,0.8,2.1c0,3.1-1.9,3.7-3.7,3.9C9.7,12,10,12.5,10,13.2c0,1.1,0,1.9,0,2.2
c0,0.2,0.1,0.5,0.6,0.4c3.2-1.1,5.5-4.1,5.5-7.6C16,3.8,12.4,0.2,8,0.2z"
></path>
</svg>
Download on GitHub
</a>
</div>
</header>
<main>
<div id="container">
<video
controls
crossorigin
playsinline
data-poster="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg"
id="player"
>
<!-- Video files -->
<source
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4"
type="video/mp4"
size="576"
/>
<source
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-720p.mp4"
type="video/mp4"
size="720"
/>
<source
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4"
type="video/mp4"
size="1080"
/>
<!-- Caption files -->
<track
kind="captions"
label="English"
srclang="en"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt"
default
/>
<track
kind="captions"
label="Français"
srclang="fr"
src="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt"
/>
<!-- Fallback for browsers that don't support the <video> element -->
<a href="https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4" download>Download</a>
</video>
</div>
<ul>
<li class="plyr__cite plyr__cite--video" hidden>
<small>
<svg class="icon">
<title>HTML5</title>
<path
d="M14.738.326C14.548.118 14.28 0 14 0H2c-.28 0-.55.118-.738.326S.98.81 1.004 1.09l1 11c.03.317.208.603.48.767l5 3c.16.095.338.143.516.143s.356-.048.515-.143l5-3c.273-.164.452-.45.48-.767l1-11c.026-.28-.067-.557-.257-.764zM12 4H6v2h6v5.72l-4 1.334-4-1.333V9h2v1.28l2 .666 2-.667V8H4V2h8v2z"
></path>
</svg>
<a href="https://itunes.apple.com/au/movie/view-from-a-blue-moon/id1041586323" target="_blank"
>View From A Blue Moon</a
>
&copy; Brainfarm
</small>
</li>
<li class="plyr__cite plyr__cite--audio" hidden>
<small>
<svg class="icon" title="HTML5">
<title>HTML5</title>
<path
d="M14.738.326C14.548.118 14.28 0 14 0H2c-.28 0-.55.118-.738.326S.98.81 1.004 1.09l1 11c.03.317.208.603.48.767l5 3c.16.095.338.143.516.143s.356-.048.515-.143l5-3c.273-.164.452-.45.48-.767l1-11c.026-.28-.067-.557-.257-.764zM12 4H6v2h6v5.72l-4 1.334-4-1.333V9h2v1.28l2 .666 2-.667V8H4V2h8v2z"
></path>
</svg>
<a href="http://www.kishibashi.com/" target="_blank"
>Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;</a
>
&copy; Kishi Bashi
</small>
</li>
<li class="plyr__cite plyr__cite--youtube" hidden>
<small>
<a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a>
on&nbsp;
<span class="color--youtube">
<svg class="icon" role="presentation">
<title>YouTube</title>
<path
d="M15.8,4.8c-0.2-1.3-0.8-2.2-2.2-2.4C11.4,2,8,2,8,2S4.6,2,2.4,2.4C1,2.6,0.3,3.5,0.2,4.8C0,6.1,0,8,0,8
s0,1.9,0.2,3.2c0.2,1.3,0.8,2.2,2.2,2.4C4.6,14,8,14,8,14s3.4,0,5.6-0.4c1.4-0.3,2-1.1,2.2-2.4C16,9.9,16,8,16,8S16,6.1,15.8,4.8z
M6,11V5l5,3L6,11z"
></path></svg
>YouTube
</span>
</small>
</li>
<li class="plyr__cite plyr__cite--vimeo" hidden>
<small>
<a href="https://vimeo.com/40648169" target="_blank">Toob “Wavaphon” Music Video</a>
on&nbsp;
<span class="color--vimeo">
<svg class="icon" role="presentation">
<title>Vimeo</title>
<path
d="M16,4.3c-0.1,1.6-1.2,3.7-3.3,6.4c-2.2,2.8-4,4.2-5.5,4.2c-0.9,0-1.7-0.9-2.4-2.6C4,9.9,3.4,5,2,5
C1.9,5,1.5,5.3,0.8,5.8L0,4.8c0.8-0.7,3.5-3.4,4.7-3.5C5.9,1.2,6.7,2,7,3.8c0.3,2,0.8,6.1,1.8,6.1c0.9,0,2.5-3.4,2.6-4
c0.1-0.9-0.3-1.9-2.3-1.1c0.8-2.6,2.3-3.8,4.5-3.8C15.3,1.1,16.1,2.2,16,4.3z"
></path></svg
>Vimeo
</span>
</small>
</li>
</ul>
</main>
</div>
<aside>
<svg class="icon">
<title>Twitter</title>
<path
d="M16,3c-0.6,0.3-1.2,0.4-1.9,0.5c0.7-0.4,1.2-1,1.4-1.8c-0.6,0.4-1.3,0.6-2.1,0.8c-0.6-0.6-1.5-1-2.4-1
C9.3,1.5,7.8,3,7.8,4.8c0,0.3,0,0.5,0.1,0.7C5.2,5.4,2.7,4.1,1.1,2.1c-0.3,0.5-0.4,1-0.4,1.7c0,1.1,0.6,2.1,1.5,2.7
c-0.5,0-1-0.2-1.5-0.4c0,0,0,0,0,0c0,1.6,1.1,2.9,2.6,3.2C3,9.4,2.7,9.4,2.4,9.4c-0.2,0-0.4,0-0.6-0.1c0.4,1.3,1.6,2.3,3.1,2.3
c-1.1,0.9-2.5,1.4-4.1,1.4c-0.3,0-0.5,0-0.8,0c1.5,0.9,3.2,1.5,5,1.5c6,0,9.3-5,9.3-9.3c0-0.1,0-0.3,0-0.4C15,4.3,15.6,3.7,16,3z"
></path>
</svg>
<p>
If you think Plyr's good,
<a
href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&amp;url=http%3A%2F%2Fplyr.io&amp;via=Sam_Potts"
target="_blank"
class="js-shr"
>tweet it</a
>
👍
</p>
</aside>
<script src="dist/demo.js" crossorigin="anonymous"></script>
</body>
</html>

View File

@@ -0,0 +1,29 @@
WEBVTT FILE
1
00:00:09.500 --> 00:00:12.000
The ocean floor rises 5 miles to the shores
2
00:00:12.001 --> 00:00:16.500
of what people call, the seven mile miracle
3
00:00:25.500 --> 00:00:28.000
What would it be like to be born on this island?
4
00:00:32.500 --> 00:00:34.500
To grow up on these shores
5
00:00:37.500 --> 00:00:40.000
To witness this water, every day
6
00:00:43.500 --> 00:00:46.000
You're about to meet someone, who did
7
00:02:45.500 --> 00:02:49.000
This is a film about John John Florence

View File

@@ -0,0 +1,29 @@
WEBVTT FILE
1
00:00:09.500 --> 00:00:12.000
Le fond de l'océan monte 5 miles des rives
2
00:00:12.001 --> 00:00:16.500
de ce que les gens appellent le miracle de sept mile
3
00:00:25.500 --> 00:00:28.000
Que serait-il d'être né sur cette île?
4
00:00:32.500 --> 00:00:34.500
Pour grandir sur ces rivages
5
00:00:37.500 --> 00:00:40.000
Pour assister à cette eau, tous les jours
6
00:00:43.500 --> 00:00:46.000
Vous êtes sur le point de rencontrer quelqu'un, qui ne
7
00:02:45.500 --> 00:02:49.000
Ceci est un film sur John John Florence

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

14
demo/package.json Normal file
View File

@@ -0,0 +1,14 @@
{
"name": "plyr-demo",
"version": "1.0.0",
"description": "Demo for Plyr",
"homepage": "https://plyr.io",
"author": "Sam Potts <sam@potts.es>",
"dependencies": {
"@sentry/browser": "^5.22.3",
"core-js": "^3.6.5",
"custom-event-polyfill": "^1.0.7",
"shr-buttons": "2.0.3",
"url-polyfill": "^1.1.10"
}
}

177
demo/src/js/demo.js Normal file
View File

@@ -0,0 +1,177 @@
// ==========================================================================
// Plyr.io demo
// This code is purely for the https://plyr.io website
// Please see README.md in the root or github.com/sampotts/plyr
// ==========================================================================
import './tab-focus';
import 'custom-event-polyfill';
import 'url-polyfill';
import * as Sentry from '@sentry/browser';
import Shr from 'shr-buttons';
import Plyr from '../../../src/js/plyr';
import sources from './sources';
import toggleClass from './toggle-class';
(() => {
const production = 'plyr.io';
// Sentry for demo site (https://plyr.io) only
if (window.location.host === production) {
Sentry.init({
dsn: 'https://d4ad9866ad834437a4754e23937071e4@sentry.io/305555',
whitelistUrls: [production].map((d) => new RegExp(`https://(([a-z0-9])+(.))*${d}`)),
});
}
document.addEventListener('DOMContentLoaded', () => {
const selector = '#player';
// Setup share buttons
Shr.setup('.js-shr', {
count: {
className: 'button__count',
},
wrapper: {
className: 'button--with-count',
},
});
// Setup the player
const player = new Plyr(selector, {
debug: true,
title: 'View From A Blue Moon',
iconUrl: 'dist/demo.svg',
keyboard: {
global: true,
},
tooltips: {
controls: true,
},
captions: {
active: true,
},
ads: {
enabled: window.location.host.includes(production),
publisherId: '918848828995742',
},
previewThumbnails: {
enabled: true,
src: ['https://cdn.plyr.io/static/demo/thumbs/100p.vtt', 'https://cdn.plyr.io/static/demo/thumbs/240p.vtt'],
},
vimeo: {
// Prevent Vimeo blocking plyr.io demo site
referrerPolicy: 'no-referrer',
},
mediaMetadata: {
title: 'View From A Blue Moon',
album: 'Sports',
artist: 'Brainfarm',
artwork: [
{
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg',
type: 'image/jpeg',
},
],
},
markers: {
enabled: true,
points: [
{
time: 10,
label: 'first marker',
},
{
time: 40,
label: 'second marker',
},
{
time: 120,
label: '<strong>third</strong> marker',
},
],
},
});
// Expose for tinkering in the console
window.player = player;
// Setup type toggle
const buttons = document.querySelectorAll('[data-source]');
const types = Object.keys(sources);
const historySupport = Boolean(window.history && window.history.pushState);
let currentType = window.location.hash.substring(1);
const hasInitialType = currentType.length;
function render(type) {
// Remove active classes
Array.from(buttons).forEach((button) => toggleClass(button.parentElement, 'active', false));
// Set active on parent
toggleClass(document.querySelector(`[data-source="${type}"]`), 'active', true);
// Show cite
Array.from(document.querySelectorAll('.plyr__cite')).forEach((cite) => {
// eslint-disable-next-line no-param-reassign
cite.hidden = true;
});
document.querySelector(`.plyr__cite--${type}`).hidden = false;
}
// Set a new source
function setSource(type, init) {
// Bail if new type isn't known, it's the current type, or current type is empty (video is default) and new type is video
if (!types.includes(type) || (!init && type === currentType) || (!currentType.length && type === 'video')) {
return;
}
// Set the new source
player.source = sources[type];
// Set the current type for next time
currentType = type;
render(type);
}
// Bind to each button
Array.from(buttons).forEach((button) => {
button.addEventListener('click', () => {
const type = button.getAttribute('data-source');
setSource(type);
if (historySupport) {
window.history.pushState({ type }, '', `#${type}`);
}
});
});
// List for backwards/forwards
window.addEventListener('popstate', (event) => {
if (event.state && Object.keys(event.state).includes('type')) {
setSource(event.state.type);
}
});
// If there's no current type set, assume video
if (!hasInitialType) {
currentType = 'video';
}
// Replace current history state
if (historySupport && types.includes(currentType)) {
window.history.replaceState({ type: currentType }, '', hasInitialType ? `#${currentType}` : '');
}
// If it's not video, load the source
if (currentType !== 'video') {
setSource(currentType, true);
}
render(currentType);
});
})();

81
demo/src/js/sources.js Normal file
View File

@@ -0,0 +1,81 @@
const sources = {
video: {
type: 'video',
title: 'View From A Blue Moon',
sources: [
{
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-576p.mp4',
type: 'video/mp4',
size: 576,
},
{
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-720p.mp4',
type: 'video/mp4',
size: 720,
},
{
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1080p.mp4',
type: 'video/mp4',
size: 1080,
},
{
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-1440p.mp4',
type: 'video/mp4',
size: 1440,
},
],
poster: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.jpg',
tracks: [
{
kind: 'captions',
label: 'English',
srclang: 'en',
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.en.vtt',
default: true,
},
{
kind: 'captions',
label: 'French',
srclang: 'fr',
src: 'https://cdn.plyr.io/static/demo/View_From_A_Blue_Moon_Trailer-HD.fr.vtt',
},
],
previewThumbnails: {
src: ['https://cdn.plyr.io/static/demo/thumbs/100p.vtt', 'https://cdn.plyr.io/static/demo/thumbs/240p.vtt'],
},
},
audio: {
type: 'audio',
title: 'Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;',
sources: [
{
src: 'https://cdn.plyr.io/static/demo/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3',
type: 'audio/mp3',
},
{
src: 'https://cdn.plyr.io/static/demo/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg',
type: 'audio/ogg',
},
],
},
youtube: {
type: 'video',
sources: [
{
src: 'https://youtube.com/watch?v=bTqVqk7FSmY',
provider: 'youtube',
},
],
},
vimeo: {
type: 'video',
sources: [
{
src: 'https://vimeo.com/40648169',
provider: 'vimeo',
},
],
},
};
export default sources;

31
demo/src/js/tab-focus.js Normal file
View File

@@ -0,0 +1,31 @@
// Setup tab focus
const container = document.getElementById('container');
const tabClassName = 'tab-focus';
// Remove class on blur
document.addEventListener('focusout', (event) => {
if (!event.target.classList || container.contains(event.target)) {
return;
}
event.target.classList.remove(tabClassName);
});
// Add classname to tabbed elements
document.addEventListener('keydown', (event) => {
if (event.keyCode !== 9) {
return;
}
// Delay the adding of classname until the focus has changed
// This event fires before the focusin event
setTimeout(() => {
const focused = document.activeElement;
if (!focused || !focused.classList || container.contains(focused)) {
return;
}
focused.classList.add(tabClassName);
}, 10);
});

View File

@@ -0,0 +1,5 @@
// Toggle class on an element
const toggleClass = (element, className = '', toggle = false) =>
element && element.classList[toggle ? 'add' : 'remove'](className);
export default toggleClass;

View File

@@ -0,0 +1,49 @@
// ==========================================================================
// Plyr.io Demo Page
// ==========================================================================
@charset 'UTF-8';
@import '../../../../src/sass/lib/css-vars';
$css-vars-use-native: true;
// Settings
@import '../settings/breakpoints';
@import '../settings/colors';
@import '../settings/cosmetic';
@import '../settings/icons';
@import '../settings/layout';
@import '../settings/plyr';
@import '../settings/spacing';
@import '../settings/type';
// Libs
@import '../lib/fontface';
@import '../lib/animation';
@import '../lib/mixins';
@import '../lib/normalize';
@import '../lib/reset';
// Layout
@import '../layout/core';
@import '../layout/grid';
// Type
@import '../type/base';
@import '../type/headings';
// Components
@import '../components/buttons';
@import '../components/header';
@import '../components/icons';
@import '../components/links';
@import '../components/lists';
@import '../components/media';
@import '../components/navigation';
@import '../components/players';
// Plyr
@import '../../../../src/sass/plyr';
// Utils
@import '../utilities/cosmetic';
@import '../utilities/hidden';

View File

@@ -0,0 +1,29 @@
// ==========================================================================
// Plyr.io Error Page
// ==========================================================================
@charset 'UTF-8';
// Settings
@import '../settings/colors';
@import '../settings/cosmetic';
@import '../settings/icons';
@import '../settings/layout';
@import '../settings/spacing';
@import '../settings/type';
// Libs
@import '../lib/fontface';
@import '../lib/mixins';
@import '../lib/normalize';
@import '../lib/reset';
// Layout
@import '../layout/error';
// Type
@import '../type/base';
@import '../type/headings';
// Components
@import '../components/buttons';
@import '../components/links';

View File

@@ -0,0 +1,84 @@
// ==========================================================================
// Buttons
// ==========================================================================
// Shared
.button,
.button__count {
align-items: center;
border: 0;
border-radius: $border-radius-base;
box-shadow: 0 1px 1px rgba(#000, 0.1);
display: inline-flex;
padding: ($spacing-base * 0.75);
position: relative;
text-shadow: none;
user-select: none;
vertical-align: middle;
}
// Buttons
.button {
background: $color-button-background;
color: $color-button-text;
font-weight: $font-weight-bold;
padding-left: ($spacing-base * 1.25);
padding-right: ($spacing-base * 1.25);
transition: all 0.2s ease;
&:hover,
&:focus {
background: $color-button-background-hover;
// Remove the underline/border
&::after {
display: none;
}
}
&:hover {
box-shadow: 0 2px 2px rgba(#000, 0.1);
}
&:focus {
outline: 0;
}
&.tab-focus {
@include tab-focus;
}
&:active {
top: 1px;
}
}
// Button group
.button--with-count {
display: inline-flex;
.button .icon {
flex-shrink: 0;
}
}
// Count bubble
.button__count {
animation: fade-in 0.2s ease;
background: $color-button-count-background;
color: $color-button-count-text;
margin-left: ($spacing-base * 0.75);
&::before {
border: $arrow-size solid transparent;
border-left-width: 0;
border-right-color: $color-button-count-background;
content: '';
height: 0;
position: absolute;
right: 100%;
top: 50%;
transform: translateY(-50%);
width: 0;
}
}

View File

@@ -0,0 +1,30 @@
// ==========================================================================
// Header
// ==========================================================================
header {
padding-bottom: $spacing-base;
text-align: center;
h1 span {
animation: shrink-hide 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) 2s forwards;
display: inline-block;
font-weight: $font-weight-light;
opacity: 0.5;
}
.call-to-action {
margin-top: ($spacing-base * 1.5);
}
@media only screen and (min-width: $screen-md) {
margin-right: ($spacing-base * 3);
max-width: 360px;
padding-bottom: ($spacing-base * 2);
text-align: left;
p:first-of-type {
@include font-size($font-size-base + 1);
}
}
}

View File

@@ -2,12 +2,14 @@
// Icons
// ==========================================================================
@use 'sass:math';
// Base size icon styles
.icon {
fill: currentColor;
width: @icon-size;
height: @icon-size;
height: $icon-size;
vertical-align: -3px;
width: $icon-size;
}
// Within elements
@@ -16,11 +18,8 @@ button svg,
label svg {
pointer-events: none;
}
a .icon,
.btn .icon {
margin-right: (@padding-base / 2);
}
.btn:not(.btn-large) .icon {
width: (@icon-size - 2);
height: (@icon-size - 2);
margin-right: math.div($spacing-base, 4);
}

View File

@@ -0,0 +1,48 @@
// ==========================================================================
// Links
// ==========================================================================
// Make a <button> look like an <a>
button.faux-link {
@extend a; // stylelint-disable-line
@include cancel-button-styles;
}
// Links
a {
border-bottom: 1px dotted currentColor;
color: $color-link;
position: relative;
text-decoration: none;
transition: all 0.2s ease;
&::after {
background: currentColor;
content: '';
height: 1px;
left: 50%;
position: absolute;
top: 100%;
transform: translateX(-50%);
transition: width 0.2s ease;
width: 0;
}
&:hover,
&:focus {
border-bottom-color: transparent;
outline: 0;
&::after {
width: 100%;
}
}
&.tab-focus {
@include tab-focus;
}
&.no-border::after {
display: none;
}
}

View File

@@ -1,9 +1,11 @@
// ==========================================================================
// Animations
// Lists
// ==========================================================================
// Fade
@keyframes fade-in {
0% { opacity: 0 }
100% { opacity: 1 }
// Lists
ul,
li {
list-style: none;
margin: 0;
padding: 0;
}

View File

@@ -0,0 +1,10 @@
// ==========================================================================
// Basic media
// ==========================================================================
img,
video,
audio {
max-width: 100%;
vertical-align: middle;
}

View File

@@ -0,0 +1,9 @@
// ==========================================================================
// Navigation
// ==========================================================================
nav {
display: flex;
justify-content: center;
margin-bottom: $spacing-base;
}

View File

@@ -0,0 +1,38 @@
// ==========================================================================
// Examples
// ==========================================================================
@use 'sass:math';
// Example players
.plyr {
border-radius: $border-radius-large;
box-shadow: 0 2px 15px rgba(#000, 0.1);
margin: $spacing-base auto;
&.plyr--audio {
max-width: 480px;
}
}
.plyr__video-wrapper::after {
border: 1px solid rgba(#000, 0.15);
border-radius: inherit;
bottom: 0;
content: '';
left: 0;
pointer-events: none;
position: absolute;
right: 0;
top: 0;
z-index: 3;
}
// Style full supported player
.plyr__cite {
color: $color-gray-500;
.icon {
margin-right: math.div($spacing-base, 6);
}
}

View File

@@ -0,0 +1,65 @@
// ==========================================================================
// Core
// ==========================================================================
@use 'sass:math';
html,
body {
display: flex;
width: 100%;
}
html {
background: $page-background;
background-attachment: fixed;
height: 100%;
}
body {
align-items: center;
display: flex;
flex-direction: column;
min-height: 100%;
}
.grid {
flex: 1;
overflow: auto;
}
main {
margin: auto;
padding-bottom: 1px; // Collapsing margins
text-align: center;
}
aside {
align-items: center;
background: #fff;
display: flex;
flex-shrink: 0;
justify-content: center;
padding: $spacing-base;
position: relative;
text-align: center;
text-shadow: none;
width: 100%;
.icon {
fill: $color-twitter;
margin-right: math.div($spacing-base, 2);
}
p {
margin: 0;
}
a {
color: $color-twitter;
&.tab-focus {
@include tab-focus($color-twitter);
}
}
}

View File

@@ -0,0 +1,30 @@
// ==========================================================================
// Errors (AWS pages)
// ==========================================================================
// Error page
html.error,
.error body {
height: 100%;
}
html.error {
background: $page-background;
background-attachment: fixed;
}
.error body {
align-items: center;
display: flex;
width: 100%;
}
.error main {
padding: $spacing-base;
text-align: center;
width: 100%;
p {
@include font-size($font-size-large);
}
}

View File

@@ -0,0 +1,19 @@
// ==========================================================================
// Super basic grid
// ==========================================================================
.grid {
margin: 0 auto;
padding: $spacing-base;
@media only screen and (min-width: $screen-md) {
align-items: center;
display: flex;
max-width: $container-max-width;
width: 100%;
> * {
flex: 1;
}
}
}

View File

@@ -0,0 +1,30 @@
// ==========================================================================
// Animations
// ==========================================================================
// Fade
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes shrink-hide {
0% {
opacity: 0.5;
width: 38px;
}
20% {
width: 45px;
}
100% {
opacity: 0;
width: 0;
}
}

View File

@@ -0,0 +1,48 @@
// ==========================================================================
// Fonts
// ==========================================================================
@font-face {
font-display: swap;
font-family: Gordita;
font-style: normal;
font-weight: $font-weight-light;
src: url('https://cdn.plyr.io/static/fonts/gordita-light.woff2') format('woff2'),
url('https://cdn.plyr.io/static/fonts/gordita-light.woff') format('woff');
}
@font-face {
font-display: swap;
font-family: Gordita;
font-style: normal;
font-weight: $font-weight-regular;
src: url('https://cdn.plyr.io/static/fonts/gordita-regular.woff2') format('woff2'),
url('https://cdn.plyr.io/static/fonts/gordita-regular.woff') format('woff');
}
@font-face {
font-display: swap;
font-family: Gordita;
font-style: normal;
font-weight: $font-weight-medium;
src: url('https://cdn.plyr.io/static/fonts/gordita-medium.woff2') format('woff2'),
url('https://cdn.plyr.io/static/fonts/gordita-medium.woff') format('woff');
}
@font-face {
font-display: swap;
font-family: Gordita;
font-style: normal;
font-weight: $font-weight-bold;
src: url('https://cdn.plyr.io/static/fonts/gordita-bold.woff2') format('woff2'),
url('https://cdn.plyr.io/static/fonts/gordita-bold.woff') format('woff');
}
@font-face {
font-display: swap;
font-family: Gordita;
font-style: normal;
font-weight: $font-weight-black;
src: url('https://cdn.plyr.io/static/fonts/gordita-black.woff2') format('woff2'),
url('https://cdn.plyr.io/static/fonts/gordita-black.woff') format('woff');
}

View File

@@ -0,0 +1,56 @@
// ==========================================================================
// Mixins
// ==========================================================================
@use 'sass:math';
// Convert a <button> into an <a>
// ---------------------------------------
@mixin cancel-button-styles() {
background: transparent;
border: 0;
border-radius: 0;
cursor: pointer;
font: inherit;
line-height: $line-height-base;
margin: 0;
padding: 0;
position: relative;
text-align: inherit;
text-shadow: inherit;
user-select: text;
vertical-align: baseline;
width: auto;
}
// Nicer focus styles
// ---------------------------------------
@mixin tab-focus($color: $tab-focus-default-color) {
box-shadow: 0 0 0 3px rgba($color, 0.35);
outline: 0;
}
// Use rems for font sizing
// Leave <body> at 100%/16px
// ---------------------------------------
@function calculate-rem($size) {
$rem: math.div($size, 16);
@return #{$rem}rem;
}
@mixin font-size($size: $font-size-base) {
font-size: $size * 1px; // Fallback in px
font-size: calculate-rem($size);
}
// Font smoothing
// ---------------------------------------
@mixin font-smoothing($enabled: true) {
@if $enabled {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
} @else {
-moz-osx-font-smoothing: auto;
-webkit-font-smoothing: subpixel-antialiased;
}
}

449
demo/src/sass/lib/normalize.scss vendored Normal file
View File

@@ -0,0 +1,449 @@
/*! normalize.css v7.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in
* IE on Windows Phone and in iOS.
*/
html {
line-height: 1.15; /* 1 */
text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/**
* Add the correct display in IE 9-.
*/
article,
aside,
footer,
header,
nav,
section {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in IE.
*/
figcaption,
figure,
main {
/* 1 */
display: block;
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
text-decoration-skip: objects; /* 2 */
}
/**
* 1. Remove the bottom border in Chrome 57- and Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: 0; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
audio,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: sans-serif; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input {
/* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select {
/* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type='button'],
[type='reset'],
[type='submit'] {
appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type='checkbox'],
[type='radio'] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type='search'] {
appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type='search']::-webkit-search-cancel-button,
[type='search']::-webkit-search-decoration {
appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details,
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Scripting
========================================================================== */
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}
/**
* Add the correct display in IE.
*/
template {
display: none;
}
/* Hidden
========================================================================== */
/**
* Add the correct display in IE 10-.
*/
[hidden] {
display: none;
}

View File

@@ -0,0 +1,11 @@
// ==========================================================================
// Resets
// ==========================================================================
// BORDER-BOX ALL THE THINGS!
// http://paulirish.com/2012/box-sizing-border-box-ftw/
*,
*::after,
*::before {
box-sizing: border-box;
}

View File

@@ -0,0 +1,6 @@
// ==========================================================================
// Breakpoints
// ==========================================================================
$screen-sm: 480px;
$screen-md: 768px;

View File

@@ -0,0 +1,42 @@
// ==========================================================================
// Colors
// ==========================================================================
// Grayscale
$color-gray-900: hsl(210deg 15% 16%);
$color-gray-800: lighten($color-gray-900, 9%);
$color-gray-700: lighten($color-gray-800, 9%);
$color-gray-600: lighten($color-gray-700, 9%);
$color-gray-500: lighten($color-gray-600, 9%);
$color-gray-400: lighten($color-gray-500, 9%);
$color-gray-300: lighten($color-gray-400, 9%);
$color-gray-200: lighten($color-gray-300, 9%);
$color-gray-100: lighten($color-gray-200, 9%);
$color-gray-50: lighten($color-gray-100, 9%);
// Branding
$color-brand-primary: hsl(198deg 100% 50%);
// Text
$color-text: $color-gray-700;
$color-headings: $color-brand-primary;
// Brands
$color-twitter: #4baaf4;
// Elements
$color-link: $color-brand-primary;
// Background
$color-background-from: hsl(198deg 100% 94%);
$color-background-to: hsl(198deg 100% 98%);
// Buttons
$color-button-background: $color-brand-primary;
$color-button-text: #fff;
$color-button-background-hover: hsl(198deg 100% 55%);
$color-button-count-background: #fff;
$color-button-count-text: $color-gray-600;
// Focus
$tab-focus-default-color: #fff;

View File

@@ -0,0 +1,13 @@
// ==========================================================================
// Misc cosmetic
// ==========================================================================
// Button count arrow size
$arrow-size: 5px;
// Radii
$border-radius-base: 4px;
$border-radius-large: 8px;
// Background
$page-background: linear-gradient(to left top, $color-background-from, $color-background-to);

View File

@@ -0,0 +1,5 @@
// ==========================================================================
// Icons
// ==========================================================================
$icon-size: 16px;

View File

@@ -0,0 +1,5 @@
// ==========================================================================
// Layout
// ==========================================================================
$container-max-width: 1240px;

View File

@@ -0,0 +1,18 @@
// ==========================================================================
// Plyr Settings
// ==========================================================================
@include css-vars(
(
--plyr-color-main: $color-brand-primary,
--plyr-font-size-base: 13px,
--plyr-font-size-small: 12px,
--plyr-font-size-time: 11px,
--plyr-font-size-badges: 9px,
--plyr-font-size-menu: var(--plyr-font-size-base),
--plyr-font-weight-regular: 500,
--plyr-font-weight-bold: 600,
--plyr-font-size-captions-medium: 18px,
--plyr-font-size-captions-large: 21px,
)
);

View File

@@ -0,0 +1,5 @@
// ==========================================================================
// Colors
// ==========================================================================
$spacing-base: 16px;

View File

@@ -0,0 +1,17 @@
// ==========================================================================
// Typography
// ==========================================================================
$font-sans-serif: 'Gordita', 'Avenir', 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
$font-size-base: 15;
$font-size-small: 13;
$font-size-large: 18;
$font-size-h1: 64;
$font-weight-light: 300;
$font-weight-regular: 400;
$font-weight-medium: 500;
$font-weight-bold: 600;
$font-weight-black: 900;
$line-height-base: 1.75;
$letter-spacing-headings: -0.025em;

View File

@@ -0,0 +1,36 @@
// ==========================================================================
// Base
// ==========================================================================
// Set to 100% for rem sizing
html {
font-size: 100%;
}
body {
@include font-smoothing;
@include font-size($font-size-base);
color: $color-text;
font-family: $font-sans-serif;
font-weight: $font-weight-medium;
line-height: $line-height-base;
}
button,
input,
select,
textarea {
font: inherit;
}
p,
small {
margin: 0 0 ($spacing-base * 1.5);
}
small {
@include font-size($font-size-small);
display: block;
}

View File

@@ -0,0 +1,13 @@
// ==========================================================================
// Headings
// ==========================================================================
h1 {
@include font-size($font-size-h1);
color: $color-headings;
font-weight: $font-weight-bold;
letter-spacing: $letter-spacing-headings;
line-height: 1.2;
margin: 0 0 ($spacing-base * 1.5);
}

View File

@@ -0,0 +1,7 @@
// ==========================================================================
// Misc cosmetic
// ==========================================================================
.no-border {
border: 0;
}

View File

@@ -0,0 +1,20 @@
// ==========================================================================
// Hidden
// ==========================================================================
[hidden] {
display: none;
}
// Hide only visually, but have it available for screen readers: h5bp.com/v
.sr-only {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
opacity: 0.001;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}

80
demo/yarn.lock Normal file
View File

@@ -0,0 +1,80 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@sentry/browser@^5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.22.3.tgz#7a64bd1cf01bf393741a3e4bf35f82aa927f5b4e"
integrity sha512-2TzE/CoBa5ZkvxJizDdi1Iz1ldmXSJpFQ1mL07PIXBjCt0Wxf+WOuFSj5IP4L40XHfJE5gU8wEvSH0VDR8nXtA==
dependencies:
"@sentry/core" "5.22.3"
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/core@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.22.3.tgz#030f435f2b518f282ba8bd954dac90cd70888bd7"
integrity sha512-eGL5uUarw3o4i9QUb9JoFHnhriPpWCaqeaIBB06HUpdcvhrjoowcKZj1+WPec5lFg5XusE35vez7z/FPzmJUDw==
dependencies:
"@sentry/hub" "5.22.3"
"@sentry/minimal" "5.22.3"
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/hub@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.22.3.tgz#08309a70d2ea8d5e313d05840c1711f34f2fffe5"
integrity sha512-INo47m6N5HFEs/7GMP9cqxOIt7rmRxdERunA3H2L37owjcr77MwHVeeJ9yawRS6FMtbWXplgWTyTIWIYOuqVbw==
dependencies:
"@sentry/types" "5.22.3"
"@sentry/utils" "5.22.3"
tslib "^1.9.3"
"@sentry/minimal@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.22.3.tgz#706e4029ae5494123d3875c658ba8911aa5cc440"
integrity sha512-HoINpYnVYCpNjn2XIPIlqH5o4BAITpTljXjtAftOx6Hzj+Opjg8tR8PWliyKDvkXPpc4kXK9D6TpEDw8MO0wZA==
dependencies:
"@sentry/hub" "5.22.3"
"@sentry/types" "5.22.3"
tslib "^1.9.3"
"@sentry/types@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.22.3.tgz#d1d547b30ee8bd7771fa893af74c4f3d71f0fd18"
integrity sha512-cv+VWK0YFgCVDvD1/HrrBWOWYG3MLuCUJRBTkV/Opdy7nkdNjhCAJQrEyMM9zX0sac8FKWKOHT0sykNh8KgmYw==
"@sentry/utils@5.22.3":
version "5.22.3"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.22.3.tgz#e3bda3e789239eb16d436f768daa12829f33d18f"
integrity sha512-AHNryXMBvIkIE+GQxTlmhBXD0Ksh+5w1SwM5qi6AttH+1qjWLvV6WB4+4pvVvEoS8t5F+WaVUZPQLmCCWp6zKw==
dependencies:
"@sentry/types" "5.22.3"
tslib "^1.9.3"
core-js@^3.6.5:
version "3.6.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==
custom-event-polyfill@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz#9bc993ddda937c1a30ccd335614c6c58c4f87aee"
integrity sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==
shr-buttons@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/shr-buttons/-/shr-buttons-2.0.3.tgz#2ffd021fc3d789e1510ce2736b938bd09ea1da5a"
integrity sha512-sPAgHiw4uaIt9TnxTfyZEedDChcldSVtnBHE44cpe/mSC7rqm4IEKZRLYqnVlTcGM+FSDNBPUNpSf50Q2ntd+w==
tslib@^1.9.3:
version "1.11.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
url-polyfill@^1.1.10:
version "1.1.10"
resolved "https://registry.yarnpkg.com/url-polyfill/-/url-polyfill-1.1.10.tgz#fd5bbcf66c9491fa682b0cb6d6a855e1643a9281"
integrity sha512-vSaPpaRgBrf41+Uky1myiSh6gpcbw8FpwHYnEy0abxndojOBnIs+yh/49gKYFLtUMP9qoNWjn6j9aUVy23Ie2A==

12
deploy.json Normal file
View File

@@ -0,0 +1,12 @@
{
"cdn": {
"bucket": "plyr",
"domain": "cdn.plyr.io",
"region": "us-east-1"
},
"demo": {
"bucket": "plyr.io",
"domain": "plyr.io",
"region": "us-west-1"
}
}

1
dist/plyr.css vendored

File diff suppressed because one or more lines are too long

2
dist/plyr.js vendored

File diff suppressed because one or more lines are too long

1
dist/sprite.svg vendored
View File

@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg"><symbol id="icon-captions-off" viewBox="0 0 18 18"><path d="M1 2c-.552 0-1 .448-1 1v12c0 .552.448 1 1 1h16c.552 0 1-.448 1-1V3c0-.552-.448-1-1-1H1zm1 12V4h14v10H2z"/></symbol><symbol id="icon-captions-on" viewBox="0 0 18 18"><path d="M1 2c-.552 0-1 .448-1 1v12c0 .552.448 1 1 1h16c.552 0 1-.448 1-1V3c0-.552-.448-1-1-1H1zm1 12V4h14v10H2z"/><path d="M3 11h3v2H3zM12 11h3v2h-3zM7 11h4v2H7z"/></symbol><symbol id="icon-enter-fullscreen" viewBox="0 0 18 18"><path d="M10.3 9.7c.7.677 1.4 0 1.4 0L16 5.4V10h2V3c0-.6-.4-1-1-1h-7v2h4.6l-4.3 4.3s-.7.723 0 1.4z"/><path d="M7 2v2H2v10h14v-1h2v2c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1V3c0-.6.4-1 1-1h6z"/></symbol><symbol id="icon-exit-fullscreen" viewBox="0 0 18 18"><path d="M7.7 8.3c-.7-.677-1.4 0-1.4 0L2 12.6V8H0v7c0 .6.4 1 1 1h7v-2H3.4l4.3-4.3s.7-.723 0-1.4z"/><path d="M11 16v-2h5V4H2v1H0V3c0-.6.4-1 1-1h16c.6 0 1 .4 1 1v12c0 .6-.4 1-1 1h-6z"/></symbol><symbol id="icon-fast-forward" viewBox="0 0 18 18"><path d="M17.57 8.246L7 2c-.552 0-1 .448-1 1v1.954L1 2c-.552 0-1 .448-1 1v12c0 .552.448 1 1 1l5-2.955V15c0 .552.448 1 1 1l10.57-6.246c.266-.158.43-.444.43-.754s-.164-.597-.43-.754zM6 10.722l-4 2.364V4.914l4 2.364v3.444zm2 2.364V4.914L14.915 9 8 13.086z"/></symbol><symbol id="icon-muted" viewBox="0 0 18 18"><path d="M9.214 2c-.11 0-.225.032-.334.1L4.832 4.91C4.75 4.97 4.65 5 4.55 5H.995C.446 5 0 5.448 0 6v6c0 .552.446 1 .996 1H4.55c.1 0 .2.03.282.09L8.88 15.9c.11.068.223.1.334.1.392 0 .747-.4.747-.95V2.95c0-.55-.354-.95-.746-.95zM7.97 12.834L5.58 11.177c-.166-.115-.364-.178-.566-.178H2.49c-.274 0-.497-.225-.497-.5v-3c0-.277.223-.5.498-.5h2.526c.202 0 .4-.063.566-.18L7.97 5.165v7.67zM14.934 8.8c-.086-1.75-1.514-2.992-2.507-3.65-.47-.312-1.094-.122-1.325.408l-.038.086c-.188.43-.045.94.336 1.194.706.473 1.586 1.247 1.624 2.065.032.676-.553 1.468-1.663 2.27-.397.288-.528.84-.284 1.275l.042.075c.266.475.866.624 1.3.312 1.74-1.25 2.586-2.606 2.516-4.037z"/><path d="M13.957 9.2c.086 1.747 1.514 2.99 2.507 3.648.47.312 1.094.122 1.325-.408l.037-.086c.188-.43.045-.94-.336-1.194-.705-.473-1.585-1.247-1.623-2.065-.032-.676.553-1.468 1.663-2.27.398-.288.53-.84.285-1.275l-.042-.075c-.266-.475-.866-.624-1.3-.312-1.74 1.25-2.586 2.606-2.516 4.037z"/></symbol><symbol id="icon-pause" viewBox="0 0 18 18"><path d="M2 4v10c0 2 2 2 2 2h2s2 0 2-2V4c0-2-2-2-2-2H4S2 2 2 4zm2 0h2v10H4V4zM10 4v10c0 2 2 2 2 2h2s2 0 2-2V4c0-2-2-2-2-2h-2s-2 0-2 2zm2 0h2v10h-2V4z"/></symbol><symbol id="icon-play" viewBox="0 0 18 18"><path d="M5 4.914L11.915 9 5 13.086V4.914zM4 2c-.552 0-1 .448-1 1v12c0 .552.448 1 1 1l10.57-6.246c.266-.158.43-.444.43-.754s-.164-.597-.43-.754L4 2z"/></symbol><symbol id="icon-restart" viewBox="0 0 16 16"><path d="M7.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C4 2.6 2.9 3.2 2 4.1-.7 6.8-.7 11.2 2 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L14 1.9l-6.3-.7z"/></symbol><symbol id="icon-rewind" viewBox="0 0 18 21"><path d="M.43 10.754L11 17c.552 0 1-.448 1-1v-1.954L17 17c.552 0 1-.448 1-1V4c0-.552-.448-1-1-1l-5 2.955V4c0-.552-.448-1-1-1L.43 9.246C.165 9.404 0 9.69 0 10s.164.597.43.754zM12 8.278l4-2.364v8.172l-4-2.364V8.278zm-2-2.364v8.172L3.085 10 10 5.914z"/></symbol><symbol id="icon-volume" viewBox="0 0 18 18"><path d="M10.214 2c-.11 0-.225.032-.334.1L5.832 4.91C5.75 4.97 5.65 5 5.55 5H1.995C1.446 5 1 5.448 1 6v6c0 .552.446 1 .996 1H5.55c.1 0 .2.03.282.09L9.88 15.9c.11.068.223.1.334.1.392 0 .747-.4.747-.95V2.95c0-.55-.354-.95-.746-.95zM8.97 12.834L6.58 11.177c-.166-.115-.364-.178-.566-.178H3.49c-.274 0-.497-.225-.497-.5v-3c0-.277.223-.5.498-.5h2.526c.202 0 .4-.063.566-.18L8.97 5.165v7.67zM16.934 8.8c-.086-1.75-1.514-2.992-2.507-3.65-.47-.312-1.094-.122-1.325.408l-.038.086c-.188.43-.045.94.336 1.194.706.473 1.586 1.247 1.624 2.065.032.676-.553 1.468-1.663 2.27-.397.288-.528.84-.284 1.275l.042.075c.266.475.866.624 1.3.312 1.74-1.25 2.586-2.606 2.516-4.037z"/></symbol></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

1
docs/dist/docs.css vendored

File diff suppressed because one or more lines are too long

1
docs/dist/docs.js vendored
View File

@@ -1 +0,0 @@
"document"in self&&("classList"in document.createElement("_")?!function(){"use strict";var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var i,n=arguments.length;for(i=0;n>i;i++)e=arguments[i],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var i=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:i.call(this,e)}}e=null}():!function(e){"use strict";if("Element"in e){var t="classList",i="prototype",n=e.Element[i],s=Object,o=String[i].trim||function(){return this.replace(/^\s+|\s+$/g,"")},r=Array[i].indexOf||function(e){for(var t=0,i=this.length;i>t;t++)if(t in this&&this[t]===e)return t;return-1},a=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(""===t)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(t))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return r.call(e,t)},l=function(e){for(var t=o.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],n=0,s=i.length;s>n;n++)this.push(i[n]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},u=l[i]=[],d=function(){return new l(this)};if(a[i]=Error[i],u.item=function(e){return this[e]||null},u.contains=function(e){return e+="",-1!==c(this,e)},u.add=function(){var e,t=arguments,i=0,n=t.length,s=!1;do e=t[i]+"",-1===c(this,e)&&(this.push(e),s=!0);while(++i<n);s&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,n=0,s=i.length,o=!1;do for(e=i[n]+"",t=c(this,e);-1!==t;)this.splice(t,1),o=!0,t=c(this,e);while(++n<s);o&&this._updateClassName()},u.toggle=function(e,t){e+="";var i=this.contains(e),n=i?t!==!0&&"remove":t!==!1&&"add";return n&&this[n](e),t===!0||t===!1?t:!i},u.toString=function(){return this.join(" ")},s.defineProperty){var p={get:d,enumerable:!0,configurable:!0};try{s.defineProperty(n,t,p)}catch(h){-2146823252===h.number&&(p.enumerable=!1,s.defineProperty(n,t,p))}}else s[i].__defineGetter__&&n.__defineGetter__(t,d)}}(self)),plyr.setup(".js-media-player",{debug:!0,title:"Video demo",tooltips:{controls:!0},captions:{defaultActive:!0}}),shr.setup({count:{classname:"btn__count"}}),function(){function e(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var n=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=n+(i?" "+t:"")}}function t(t,o){if(!(t in n)||!o&&t==s||!s.length&&t==n.video)return void console.warn("Unregonized type.");var r=document.querySelector(".js-media-player").plyr;switch(t){case n.video:r.source({type:"video",title:"View From A Blue Moon",sources:[{src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4",type:"video/mp4"},{src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm",type:"video/webm"}],poster:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg",tracks:[{kind:"captions",label:"English",srclang:"en",src:"https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.vtt","default":!0}]});break;case n.audio:r.source({type:"audio",title:"Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;",sources:[{src:"https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3",type:"audio/mp3"},{src:"https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg",type:"audio/ogg"}]});break;case n.youtube:r.source({type:"video",title:"View From A Blue Moon",sources:[{src:"bTqVqk7FSmY",type:"youtube"}]});break;case n.vimeo:r.source({type:"video",title:"View From A Blue Moon",sources:[{src:"143418951",type:"vimeo"}]})}s=t;for(var a=i.length-1;a>=0;a--)e(i[a].parentElement,"active",!1);e(document.querySelector('[data-source="'+t+'"]').parentElement,"active",!0)}for(var i=document.querySelectorAll("[data-source]"),n={video:"video",audio:"audio",youtube:"youtube",vimeo:"vimeo"},s=window.location.hash.replace("#",""),o=window.history&&window.history.pushState,r=i.length-1;r>=0;r--)i[r].addEventListener("click",function(){var e=this.getAttribute("data-source");t(e),o&&history.pushState({type:e},"","#"+e)});if(window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),o){var a=!s.length;a&&(s=n.video),s in n&&history.replaceState({type:s},"",a?"":"#"+s),a||t(s,!0)}}(),document.domain.indexOf("plyr.io")>-1&&(!function(e,t,i,n,s,o,r){e.GoogleAnalyticsObject=s,e[s]=e[s]||function(){(e[s].q=e[s].q||[]).push(arguments)},e[s].l=1*new Date,o=t.createElement(i),r=t.getElementsByTagName(i)[0],o.async=1,o.src=n,r.parentNode.insertBefore(o,r)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-40881672-11","auto"),ga("send","pageview"));

1
docs/dist/docs.svg vendored
View File

@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg"><symbol id="icon-github" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 .2c-4.4 0-8 3.6-8 8 0 3.5 2.3 6.5 5.5 7.6.4.1.5-.2.5-.4V14c-2.2.5-2.7-1-2.7-1-.4-.9-.9-1.2-.9-1.2-.7-.5.1-.5.1-.5.8.1 1.2.8 1.2.8.7 1.3 1.9.9 2.3.7.1-.5.3-.9.5-1.1-1.8-.2-3.6-.9-3.6-4 0-.9.3-1.6.8-2.1-.1-.2-.4-1 .1-2.1 0 0 .7-.2 2.2.8.6-.2 1.3-.3 2-.3s1.4.1 2 .3c1.5-1 2.2-.8 2.2-.8.4 1.1.2 1.9.1 2.1.5.6.8 1.3.8 2.1 0 3.1-1.9 3.7-3.7 3.9.3.4.6.9.6 1.6v2.2c0 .2.1.5.6.4 3.2-1.1 5.5-4.1 5.5-7.6-.1-4.4-3.7-8-8.1-8z"/></symbol><symbol id="icon-twitter" viewBox="0 0 16 16"><title>Twitter</title><path d="M16 3c-.6.3-1.2.4-1.9.5.7-.4 1.2-1 1.4-1.8-.6.4-1.3.6-2.1.8-.6-.6-1.5-1-2.4-1-1.7 0-3.2 1.5-3.2 3.3 0 .3 0 .5.1.7-2.7-.1-5.2-1.4-6.8-3.4-.3.5-.4 1-.4 1.7 0 1.1.6 2.1 1.5 2.7-.5 0-1-.2-1.5-.4C.7 7.7 1.8 9 3.3 9.3c-.3.1-.6.1-.9.1-.2 0-.4 0-.6-.1.4 1.3 1.6 2.3 3.1 2.3-1.1.9-2.5 1.4-4.1 1.4H0c1.5.9 3.2 1.5 5 1.5 6 0 9.3-5 9.3-9.3v-.4C15 4.3 15.6 3.7 16 3z"/></symbol><symbol id="icon-vimeo" viewBox="0 0 16 16"><path d="M16 4.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C4 9.9 3.4 5 2 5c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"/></symbol><symbol id="icon-youtube" viewBox="0 0 16 16"><path d="M15.8 4.8c-.2-1.3-.8-2.2-2.2-2.4C11.4 2 8 2 8 2s-3.4 0-5.6.4C1 2.6.3 3.5.2 4.8 0 6.1 0 8 0 8s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C4.6 14 8 14 8 14s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4C16 9.9 16 8 16 8s0-1.9-.2-3.2zM6 11V5l5 3-5 3z"/></symbol></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,18 +0,0 @@
<!doctype html>
<html lang="en" class="error">
<head>
<meta charset="utf-8" />
<title>Doh. Looks like something went wrong.</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Docs styles -->
<link rel="stylesheet" href="dist/docs.css">
</head>
<body>
<main>
<h1>Doh.</h1>
<p>Looks like something went wrong.</p>
<a href="http://plyr.io" class="btn btn--primary">Back to plyr.io</a>
</main>
</body>
</html>

View File

@@ -1,127 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Plyr - A simple HTML5 media player</title>
<meta name="description" content="A simple HTML5 media player with custom controls and WebVTT captions.">
<meta name="author" content="Sam Potts">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Styles -->
<link rel="stylesheet" href="../dist/plyr.css">
<!-- Docs styles -->
<link rel="stylesheet" href="dist/docs.css">
</head>
<body>
<header>
<h1>Plyr</h1>
<p>A simple, accessible HTML5 media player by <a href="https://twitter.com/sam_potts" target="_blank">@sam_potts</a> from <a href="https://twitter.com/selz" target="_blank">@selz</a></p>
<nav>
<ul>
<li>
<a href="https://github.com/selz/plyr" target="_blank" class="btn btn--large btn--primary" data-shr-network="github">
<svg class="icon"><use xlink:href="#icon-github"/></svg>Download on GitHub
</a>
</li>
<li>
<a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts" target="_blank" class="btn btn--large btn--twitter" data-shr-network="twitter">
<svg class="icon"><use xlink:href="#icon-twitter"/></svg>Tweet
</a>
</li>
</ul>
</nav>
</header>
<main role="main" id="main">
<nav class="btn__bar">
<ul>
<li class="active">
<button type="button" class="btn" data-source="video">Video</button>
</li>
<li>
<button type="button" class="btn" data-source="audio">Audio</button>
</li>
<li>
<button type="button" class="btn btn--youtube" data-source="youtube"><svg class="icon"><use xlink:href="#icon-youtube"/></svg>YouTube</button>
</li>
<li>
<button type="button" class="btn btn--vimeo" data-source="vimeo"><svg class="icon"><use xlink:href="#icon-vimeo"/></svg>Vimeo</button>
</li>
</ul>
</nav>
<section>
<div class="js-media-player">
<video poster="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg" controls crossorigin>
<!-- Video files -->
<source src="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" type="video/mp4">
<source src="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm" type="video/webm">
<!-- Text track file -->
<track kind="captions" label="English" srclang="en" src="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.vtt" default>
<!-- Fallback for browsers that don't support the <video> element -->
<a href="https://cdn.selz.com/plyr/1.0/movie.mp4">Download</a>
</video>
</div>
<ul>
<li class="plyr__cite plyr__cite--video"><small><a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> &copy; Brainfarm</small></li>
<li class="plyr__cite plyr__cite--audio"><small><a href="http://www.kishibashi.com/" target="_blank">Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;</a> &copy; Kishi Bashi</small></li>
<li class="plyr__cite plyr__cite--youtube"><small><a href="https://www.youtube.com/watch?v=bTqVqk7FSmY" target="_blank">View From A Blue Moon</a> on <span class="color--youtube"><svg class="icon"><use xlink:href="#icon-youtube"/></svg>YouTube</span></small>
<li class="plyr__cite plyr__cite--vimeo"><small><a href="https://vimeo.com/ondemand/viewfromabluemoon4k" target="_blank">View From A Blue Moon</a> on <span class="color--vimeo"><svg class="icon"><use xlink:href="#icon-vimeo"/></svg>Vimeo</span></small>
</ul>
</section>
</main>
<!-- Load SVG defs -->
<!-- You should bundle all SVG/Icons into one file using a build tool such as gulp and svg store -->
<script>
(function() {
[
'../dist/sprite.svg',
'dist/docs.svg'
]
.forEach(function(u) {
var x = new XMLHttpRequest(),
b = document.body;
// Check for CORS support
// If you're loading from same domain, you can remove the whole if/else statement
// XHR for Chrome/Firefox/Opera/Safari/IE10+
if ('withCredentials' in x) {
x.open('GET', u, true);
}
// XDomainRequest for IE8 & IE9
else if (typeof XDomainRequest == 'function') {
x = new XDomainRequest();
x.open('GET', u);
}
else { return; }
// Inject hidden div with sprite on load
x.onload = function() {
var c = document.createElement('div');
c.setAttribute('hidden', '');
c.innerHTML = x.responseText;
b.insertBefore(c, b.childNodes[0]);
}
// Timeout for IE9
setTimeout(function () {
x.send();
}, 0);
});
})();
</script>
<!-- Plyr core script -->
<script src="../dist/plyr.js"></script>
<!-- Shr core script -->
<script src="https://cdn.shr.one/0.1.9/shr.js"></script>
<!-- Docs script -->
<script src="dist/docs.js"></script>
</body>
</html>

View File

@@ -1,180 +0,0 @@
// ==========================================================================
// Docs example
// ==========================================================================
/*global plyr, shr*/
// Setup the player
plyr.setup('.js-media-player', {
debug: true,
title: 'Video demo',
tooltips: {
controls: true
},
captions: {
defaultActive: true
}
});
// Setup shr
shr.setup({
count: {
classname: 'btn__count'
}
});
// General functions
(function() {
var buttons = document.querySelectorAll('[data-source]'),
types = {
video: 'video',
audio: 'audio',
youtube: 'youtube',
vimeo: 'vimeo'
},
currentType = window.location.hash.replace('#', ''),
historySupport = (window.history && window.history.pushState);
// Bind to each button
for (var i = buttons.length - 1; i >= 0; i--) {
buttons[i].addEventListener('click', function() {
var type = this.getAttribute('data-source');
newSource(type);
if (historySupport) {
history.pushState({ 'type': type }, '', '#' + type);
}
});
}
// List for backwards/forwards
window.addEventListener('popstate', function(event) {
if(event.state && 'type' in event.state) {
newSource(event.state.type);
}
});
// On load
if(historySupport) {
var video = !currentType.length;
if(video) {
currentType = types.video;
}
if(currentType in types) {
history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType));
}
if(!video) {
newSource(currentType, true);
}
}
// Toggle class on an element
function toggleClass(element, className, state) {
if (element) {
if (element.classList) {
element.classList[state ? 'add' : 'remove'](className);
}
else {
var name = (' ' + element.className + ' ').replace(/\s+/g, ' ').replace(' ' + className + ' ', '');
element.className = name + (state ? ' ' + className : '');
}
}
}
// Set a new source
function newSource(type, init) {
// Bail if new type isn't known, it's the current type, or current type is empty (video is default) and new type is video
if(!(type in types) || (!init && type == currentType) || (!currentType.length && type == types.video)) {
console.warn('Unregonized type.');
return;
}
// Get plyr instance
var player = document.querySelector('.js-media-player').plyr;
switch(type) {
case types.video:
player.source({
type: 'video',
title: 'View From A Blue Moon',
sources: [{
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4',
type: 'video/mp4'
},
{
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.webm',
type: 'video/webm'
}],
poster: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.jpg',
tracks: [{
kind: 'captions',
label: 'English',
srclang:'en',
src: 'https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.vtt',
default: true
}]
});
break;
case types.audio:
player.source({
type: 'audio',
title: 'Kishi Bashi &ndash; &ldquo;It All Began With A Burst&rdquo;',
sources: [{
src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.mp3',
type: 'audio/mp3'
},
{
src: 'https://cdn.selz.com/plyr/1.5/Kishi_Bashi_-_It_All_Began_With_a_Burst.ogg',
type: 'audio/ogg'
}]
});
break;
case types.youtube:
player.source({
type: 'video',
title: 'View From A Blue Moon',
sources: [{
src: 'bTqVqk7FSmY',
type: 'youtube'
}]
});
break;
case types.vimeo:
player.source({
type: 'video',
title: 'View From A Blue Moon',
sources: [{
src: '143418951',
type: 'vimeo'
}]
});
break;
}
// Set the current type for next time
currentType = type;
// Remove active classes
for (var x = buttons.length - 1; x >= 0; x--) {
toggleClass(buttons[x].parentElement, 'active', false);
}
// Set active on parent
toggleClass(document.querySelector('[data-source="'+ type +'"]').parentElement, 'active', true);
}
})();
// Google analytics
// For demo site (http://[www.]plyr.io) only
if(document.domain.indexOf('plyr.io') > -1) {
(function(i,s,o,g,r,a,m){i.GoogleAnalyticsObject=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-40881672-11', 'auto');
ga('send', 'pageview');
}

View File

@@ -1,237 +0,0 @@
/*
* classList.js: Cross-browser full element.classList implementation.
* 1.1.20150312
*
* By Eli Grey, http://eligrey.com
* License: Dedicated to the public domain.
* See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
*/
/*global self, document, DOMException */
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
if ("document" in self) {
// Full polyfill for browsers with no classList support
if (!("classList" in document.createElement("_"))) {
(function (view) {
"use strict";
if (!('Element' in view)) return;
var
classListProp = "classList"
, protoProp = "prototype"
, elemCtrProto = view.Element[protoProp]
, objCtr = Object
, strTrim = String[protoProp].trim || function () {
return this.replace(/^\s+|\s+$/g, "");
}
, arrIndexOf = Array[protoProp].indexOf || function (item) {
var
i = 0
, len = this.length
;
for (; i < len; i++) {
if (i in this && this[i] === item) {
return i;
}
}
return -1;
}
// Vendors: please allow content code to instantiate DOMExceptions
, DOMEx = function (type, message) {
this.name = type;
this.code = DOMException[type];
this.message = message;
}
, checkTokenAndGetIndex = function (classList, token) {
if (token === "") {
throw new DOMEx(
"SYNTAX_ERR"
, "An invalid or illegal string was specified"
);
}
if (/\s/.test(token)) {
throw new DOMEx(
"INVALID_CHARACTER_ERR"
, "String contains an invalid character"
);
}
return arrIndexOf.call(classList, token);
}
, ClassList = function (elem) {
var
trimmedClasses = strTrim.call(elem.getAttribute("class") || "")
, classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
, i = 0
, len = classes.length
;
for (; i < len; i++) {
this.push(classes[i]);
}
this._updateClassName = function () {
elem.setAttribute("class", this.toString());
};
}
, classListProto = ClassList[protoProp] = []
, classListGetter = function () {
return new ClassList(this);
}
;
// Most DOMException implementations don't allow calling DOMException's toString()
// on non-DOMExceptions. Error's toString() is sufficient here.
DOMEx[protoProp] = Error[protoProp];
classListProto.item = function (i) {
return this[i] || null;
};
classListProto.contains = function (token) {
token += "";
return checkTokenAndGetIndex(this, token) !== -1;
};
classListProto.add = function () {
var
tokens = arguments
, i = 0
, l = tokens.length
, token
, updated = false
;
do {
token = tokens[i] + "";
if (checkTokenAndGetIndex(this, token) === -1) {
this.push(token);
updated = true;
}
}
while (++i < l);
if (updated) {
this._updateClassName();
}
};
classListProto.remove = function () {
var
tokens = arguments
, i = 0
, l = tokens.length
, token
, updated = false
, index
;
do {
token = tokens[i] + "";
index = checkTokenAndGetIndex(this, token);
while (index !== -1) {
this.splice(index, 1);
updated = true;
index = checkTokenAndGetIndex(this, token);
}
}
while (++i < l);
if (updated) {
this._updateClassName();
}
};
classListProto.toggle = function (token, force) {
token += "";
var
result = this.contains(token)
, method = result ?
force !== true && "remove"
:
force !== false && "add"
;
if (method) {
this[method](token);
}
if (force === true || force === false) {
return force;
} else {
return !result;
}
};
classListProto.toString = function () {
return this.join(" ");
};
if (objCtr.defineProperty) {
var classListPropDesc = {
get: classListGetter
, enumerable: true
, configurable: true
};
try {
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
} catch (ex) { // IE 8 doesn't support enumerable:true
if (ex.number === -0x7FF5EC54) {
classListPropDesc.enumerable = false;
objCtr.defineProperty(elemCtrProto, classListProp, classListPropDesc);
}
}
} else if (objCtr[protoProp].__defineGetter__) {
elemCtrProto.__defineGetter__(classListProp, classListGetter);
}
}(self));
} else {
// There is full or partial native classList support, so just check if we need
// to normalize the add/remove and toggle APIs.
(function () {
"use strict";
var testElement = document.createElement("_");
testElement.classList.add("c1", "c2");
// Polyfill for IE 10/11 and Firefox <26, where classList.add and
// classList.remove exist but support only one argument at a time.
if (!testElement.classList.contains("c2")) {
var createMethod = function(method) {
var original = DOMTokenList.prototype[method];
DOMTokenList.prototype[method] = function(token) {
var i, len = arguments.length;
for (i = 0; i < len; i++) {
token = arguments[i];
original.call(this, token);
}
};
};
createMethod('add');
createMethod('remove');
}
testElement.classList.toggle("c3", false);
// Polyfill for IE 10 and Firefox <24, where classList.toggle does not
// support the second argument.
if (testElement.classList.contains("c3")) {
var _toggle = DOMTokenList.prototype.toggle;
DOMTokenList.prototype.toggle = function(token, force) {
if (1 in arguments && !this.contains(token) === !force) {
return force;
} else {
return _toggle.call(this, token);
}
};
}
testElement = null;
}());
}
}

View File

@@ -1,52 +0,0 @@
// ==========================================================================
// Base layout
// ==========================================================================
// BORDER-BOX ALL THE THINGS!
// http://paulirish.com/2012/box-sizing-border-box-ftw/
*, *::after, *::before {
box-sizing: border-box;
}
// Hidden
[hidden] {
display: none;
}
// Base
html {
height: 100%;
font-size: 100%;
background: linear-gradient(#fff, @body-background) fixed;
}
body {
font-family: "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 1.5;
text-align: center;
color: @gray;
.font-smoothing(on);
padding: 0 (@padding-base / 2);
}
// Header
header {
padding: @padding-base;
margin-bottom: @padding-base;
p {
.font-size(18);
}
@media (min-width: @screen-sm) {
padding-top: (@padding-base * 3);
padding-bottom: (@padding-base * 3);
}
}
// Sections
section {
padding-bottom: @padding-base;
@media (min-width: @screen-sm) {
padding-bottom: (@padding-base * 2);
}
}

View File

@@ -1,172 +0,0 @@
// ==========================================================================
// Buttons
// ==========================================================================
nav {
ul {
list-style: none;
margin: 0;
padding: 0;
font-size: 0;
}
li {
display: inline-block;
margin-top: (@padding-base / 2);
.font-size();
white-space: nowrap;
}
li + li {
margin-left: @padding-base;
}
}
// Tabs
.btn__bar {
position: relative;
margin: 0 auto @padding-base;
max-width: @example-width-video;
white-space: nowrap;
&::before {
content: "";
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 1px;
background: @gray-lighter;
}
ul {
position: relative;
z-index: 1;
display: inline-block;
user-select: none;
}
li {
margin: 0;
&:first-child .btn {
border-radius: 4px 0 0 4px;
}
&:last-child .btn {
border-radius: 0 4px 4px 0;
}
& + li .btn {
margin-left: -1px;
}
&.active .btn {
&:extend(.btn--primary);
box-shadow: inset 0 1px 1px rgba(0,0,0, .2);
position: relative;
z-index: 1;
.icon {
color: inherit;
}
}
&.active + li .btn:hover {
z-index: 0;
}
}
.btn {
position: relative;
display: block;
border-radius: 0;
&:hover,
&:focus {
z-index: 1;
}
}
@media (min-width: 560px) {
margin-bottom: (@padding-base * 2);
}
}
// Shared
.btn,
.btn__count {
display: inline-block;
vertical-align: middle;
border-radius: @border-radius-base;
font-weight: 600;
user-select: none;
}
// Buttons
.btn {
padding: (@padding-base / 2) ((@padding-base / 2) + 2);
background: linear-gradient(lighten(@body-background, 2%), darken(@body-background, 3%));
border: 1px solid @gray-light;
box-shadow: 0 1px 1px rgba(0,0,0, .05);
text-shadow: 0 1px 1px #fff;
color: @gray;
transition: background .1s ease, color .1s ease;
.font-size(@font-size-small);
&:hover,
&:focus {
border-color: darken(@gray-light, 8%);
color: @gray;
outline: 0;
}
}
// Sizes
.btn--large {
padding: (@padding-base / 2) @padding-base;
.font-size();
}
// Styles
.btn--primary {
background-image: linear-gradient(@link-color, darken(@link-color, 5%));
background-color: @link-color;
border-color: darken(@link-color, 10%);
box-shadow: 0 1px 1px rgba(0,0,0, .15);
text-shadow: 0 1px 1px rgba(0,0,0, .1);
color: #fff;
&:hover,
&:focus {
color: #fff;
border-color: darken(@link-color, 20%);
}
}
.btn--youtube .icon {
color: @color-youtube;
}
.btn--vimeo .icon {
color: @color-vimeo;
}
.btn--twitter .icon {
color: @color-twitter;
}
// Count bubble
.btn__count {
position: relative;
margin-left: (@padding-base / 2);
padding: (@padding-base / 2) (@padding-base * .75);
background: #fff;
border: 1px solid @gray-light;
&::before {
content: "";
position: absolute;
display: block;
width: @arrow-size;
height: @arrow-size;
left: 1px;
top: 50%;
margin-top: -(@arrow-size / 2);
background: inherit;
border: inherit;
border-width: 1px 0 0 1px;
transform: rotate(-45deg) translate(-50%, -50%);
}
}

View File

@@ -1,19 +0,0 @@
// ==========================================================================
// Errors (AWS pages)
// ==========================================================================
// Error page
html.error,
.error body {
height: 100%;
}
.error body {
width: 100%;
display: table;
table-layout: fixed;
}
.error main {
display: table-cell;
width: 100%;
vertical-align: middle;
}

View File

@@ -1,77 +0,0 @@
// ==========================================================================
// Examples
// ==========================================================================
section {
margin: 0 auto @padding-base;
max-width: @example-width-video;
}
video,
.plyr__video-embed {
border-radius: @border-radius-base;
max-width: 100%;
vertical-align: middle;
}
.plyr__video-embed {
-webkit-mask-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC);
}
// Example players
.plyr {
margin: 0 auto;
&__controls {
border-radius: 0 0 @border-radius-base @border-radius-base;
}
video,
.plyr__video-embed {
border-radius: @border-radius-base @border-radius-base 0 0;
}
&--fullscreen,
&--fullscreen-active {
max-width: none;
.plyr-controls,
video,
iframe {
border-radius: 0;
}
iframe {
-webkit-mask-image: none;
}
}
}
.plyr--audio {
max-width: @example-width-audio;
.plyr__controls {
border-radius: @border-radius-base;
}
.plyr__progress {
border-radius: @border-radius-base @border-radius-base 0 0;
progress,
[type='range'] {
border-radius: @border-radius-base @border-radius-base 0 0;
overflow: hidden;
}
}
}
// Style full supported player
.plyr__cite {
display: none;
margin-top: @padding-base;
.icon {
margin-right: (@padding-base / 4);
}
}
.plyr--video ~ ul .plyr__cite--video,
.plyr--audio ~ ul .plyr__cite--audio,
.plyr--youtube ~ ul .plyr__cite--youtube,
.plyr--vimeo ~ ul .plyr__cite--vimeo {
display: block;
}

View File

@@ -1,63 +0,0 @@
// ==========================================================================
// Typography
// ==========================================================================
// Headings
h1,
h2 {
letter-spacing: -.025em;
color: #2E3C44;
margin: 0 0 (@padding-base / 2);
line-height: 1.2;
.font-smoothing();
}
h1 {
.font-size(@font-size-h1);
color: #3498DB;
}
// Paragraph and small
p,
small {
margin: 0 0 @padding-base;
}
small {
display: block;
padding: 0 (@padding-base / 2);
.font-size(@font-size-small);
}
// Lists
ul,
li {
list-style: none;
margin: 0;
padding: 0;
}
// Links
a {
text-decoration: none;
color: @link-color;
border-bottom: 1px dotted currentColor;
transition: background .3s ease, color .3s ease, border .3s ease;
&:hover,
&:focus {
color: @gray-dark;
border-bottom-color: rgba(0,0,0,0);
}
&:focus {
.tab-focus();
}
&.logo {
border: 0;
}
}
.color--vimeo {
color: @color-vimeo;
}
.color--youtube {
color: @color-youtube;
}

View File

@@ -1,26 +0,0 @@
// ==========================================================================
// HTML5 Video Player Demo Page
// ==========================================================================
// CSS Reset
@import "lib/normalize.less";
// Mixins
@import "lib/mixins.less";
// Variables
@import "variables.less";
// Animation
@import "lib/animation.less";
// Type
@import "lib/fontface.less";
@import "components/type.less";
// Components
@import "components/base.less";
@import "components/icons.less";
@import "components/buttons.less";
@import "components/error.less";
@import "components/examples.less";

View File

@@ -1,18 +0,0 @@
// ==========================================================================
// Fonts
// ==========================================================================
@font-face {
font-family: "Avenir";
src: url("//cdn.plyr.io/fonts/avenir-medium.woff2") format("woff2"),
url("//cdn.plyr.io/fonts/avenir-medium.woff") format("woff");
font-style: normal;
font-weight: 400;
}
@font-face {
font-family: "Avenir";
src: url("//cdn.plyr.io/fonts/avenir-bold.woff2") format("woff2"),
url("//cdn.plyr.io/fonts/avenir-bold.woff") format("woff");
font-style: normal;
font-weight: 600;
}

View File

@@ -1,41 +0,0 @@
// ==========================================================================
// Mixins
// ==========================================================================
// Contain floats: nicolasgallagher.com/micro-clearfix-hack/
// ---------------------------------------
.clearfix() {
zoom: 1;
&:before,
&:after { content: ""; display: table; }
&:after { clear: both; }
}
// Webkit-style focus
// ---------------------------------------
.tab-focus() {
// Default
outline: thin dotted @gray-dark;
// Webkit
outline-offset: 1px;
}
// Use rems for font sizing
// Leave <body> at 100%/16px
// ---------------------------------------
.font-size(@font-size: 16){
@rem: round((@font-size / 16), 3);
font-size: (@font-size * 1px);
font-size: ~"@{rem}rem";
}
// Font smoothing
// ---------------------------------------
.font-smoothing(@mode: on) when (@mode = on) {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.font-smoothing(@mode: on) when (@mode = off) {
-moz-osx-font-smoothing: auto;
-webkit-font-smoothing: subpixel-antialiased;
}

View File

@@ -1,406 +0,0 @@
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 8/9.
*/
audio,
canvas,
video {
display: inline-block;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background: transparent;
}
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: #000;
}
/**
* Correct font family set oddly in Safari 5 and Chrome.
*/
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
pre {
white-space: pre-wrap;
}
/**
* Set consistent quote types.
*/
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9.
*/
img {
border: 0;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Correct font family not being inherited in all browsers.
* 2. Correct font size not being inherited in all browsers.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

View File

@@ -1,43 +0,0 @@
// ==========================================================================
// Variables
// ==========================================================================
// Colors
@blue: #3498db;
@gray-dark: #343f4a;
@gray: #55646b;
@gray-light: #cbd0d3;
@gray-lighter: #dbe3e8;
@off-white: #f2f5f7;
// Brands
@color-twitter: #4BAAF4;
@color-youtube: #cc181e;
@color-vimeo: #19b7ed;
// Base
@body-background: @off-white;
// Type
@font-size-base: 16;
@font-size-small: 14;
@font-size-h1: 64;
// Elements
@link-color: @blue;
@padding-base: 20px;
@arrow-size: 8px;
// Icons
@icon-size: 18px;
// Breakpoints
@screen-sm: 480px;
@screen-md: 768px;
// Radii
@border-radius-base: 4px;
// Examples
@example-width-audio: 520px;
@example-width-video: 1200px;

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" d="M8,0.2c-4.4,0-8,3.6-8,8c0,3.5,2.3,6.5,5.5,7.6
C5.9,15.9,6,15.6,6,15.4c0-0.2,0-0.7,0-1.4C3.8,14.5,3.3,13,3.3,13c-0.4-0.9-0.9-1.2-0.9-1.2c-0.7-0.5,0.1-0.5,0.1-0.5
c0.8,0.1,1.2,0.8,1.2,0.8C4.4,13.4,5.6,13,6,12.8c0.1-0.5,0.3-0.9,0.5-1.1c-1.8-0.2-3.6-0.9-3.6-4c0-0.9,0.3-1.6,0.8-2.1
c-0.1-0.2-0.4-1,0.1-2.1c0,0,0.7-0.2,2.2,0.8c0.6-0.2,1.3-0.3,2-0.3c0.7,0,1.4,0.1,2,0.3c1.5-1,2.2-0.8,2.2-0.8
c0.4,1.1,0.2,1.9,0.1,2.1c0.5,0.6,0.8,1.3,0.8,2.1c0,3.1-1.9,3.7-3.7,3.9C9.7,12,10,12.5,10,13.2c0,1.1,0,1.9,0,2.2
c0,0.2,0.1,0.5,0.6,0.4c3.2-1.1,5.5-4.1,5.5-7.6C16,3.8,12.4,0.2,8,0.2z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<title>Twitter</title>
<path d="M16,3c-0.6,0.3-1.2,0.4-1.9,0.5c0.7-0.4,1.2-1,1.4-1.8c-0.6,0.4-1.3,0.6-2.1,0.8c-0.6-0.6-1.5-1-2.4-1
C9.3,1.5,7.8,3,7.8,4.8c0,0.3,0,0.5,0.1,0.7C5.2,5.4,2.7,4.1,1.1,2.1c-0.3,0.5-0.4,1-0.4,1.7c0,1.1,0.6,2.1,1.5,2.7
c-0.5,0-1-0.2-1.5-0.4c0,0,0,0,0,0c0,1.6,1.1,2.9,2.6,3.2C3,9.4,2.7,9.4,2.4,9.4c-0.2,0-0.4,0-0.6-0.1c0.4,1.3,1.6,2.3,3.1,2.3
c-1.1,0.9-2.5,1.4-4.1,1.4c-0.3,0-0.5,0-0.8,0c1.5,0.9,3.2,1.5,5,1.5c6,0,9.3-5,9.3-9.3c0-0.1,0-0.3,0-0.4C15,4.3,15.6,3.7,16,3z"/>
</svg>

Before

Width:  |  Height:  |  Size: 981 B

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path d="M16,4.3c-0.1,1.6-1.2,3.7-3.3,6.4c-2.2,2.8-4,4.2-5.5,4.2c-0.9,0-1.7-0.9-2.4-2.6C4,9.9,3.4,5,2,5
C1.9,5,1.5,5.3,0.8,5.8L0,4.8c0.8-0.7,3.5-3.4,4.7-3.5C5.9,1.2,6.7,2,7,3.8c0.3,2,0.8,6.1,1.8,6.1c0.9,0,2.5-3.4,2.6-4
c0.1-0.9-0.3-1.9-2.3-1.1c0.8-2.6,2.3-3.8,4.5-3.8C15.3,1.1,16.1,2.2,16,4.3z"/>
</svg>

Before

Width:  |  Height:  |  Size: 779 B

View File

@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path d="M15.8,4.8c-0.2-1.3-0.8-2.2-2.2-2.4C11.4,2,8,2,8,2S4.6,2,2.4,2.4C1,2.6,0.3,3.5,0.2,4.8C0,6.1,0,8,0,8
s0,1.9,0.2,3.2c0.2,1.3,0.8,2.2,2.2,2.4C4.6,14,8,14,8,14s3.4,0,5.6-0.4c1.4-0.3,2-1.1,2.2-2.4C16,9.9,16,8,16,8S16,6.1,15.8,4.8z
M6,11V5l5,3L6,11z"/>
</svg>

Before

Width:  |  Height:  |  Size: 739 B

View File

@@ -1,277 +1,8 @@
// ==========================================================================
// Gulp build script
// ==========================================================================
/*global require, __dirname*/
/*jshint -W079 */
var fs = require("fs"),
path = require("path"),
gulp = require("gulp"),
gutil = require("gulp-util"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),
less = require("gulp-less"),
sass = require("gulp-sass"),
minify = require("gulp-minify-css"),
run = require("run-sequence"),
prefix = require("gulp-autoprefixer"),
svgstore = require("gulp-svgstore"),
svgmin = require("gulp-svgmin"),
rename = require("gulp-rename"),
s3 = require("gulp-s3"),
gzip = require("gulp-gzip"),
replace = require("gulp-replace"),
open = require("gulp-open"),
size = require("gulp-size");
const gulp = require('gulp');
const HubRegistry = require('gulp-hub');
var root = __dirname,
paths = {
plyr: {
// Source paths
src: {
less: path.join(root, "src/less/**/*"),
sass: path.join(root, "src/sass/**/*"),
js: path.join(root, "src/js/**/*"),
sprite: path.join(root, "src/sprite/*.svg")
},
// Output paths
output: path.join(root, "dist/")
},
docs: {
// Source paths
src: {
less: path.join(root, "docs/src/less/**/*"),
js: path.join(root, "docs/src/js/**/*"),
sprite: path.join(root, "docs/src/sprite/**/*")
},
// Output paths
output: path.join(root, "docs/dist/"),
// Docs
root: path.join(root, "docs/")
},
upload: [path.join(root, "dist/**"), path.join(root, "docs/dist/**")]
},
// Task arrays
tasks = {
less: [],
sass: [],
js: [],
sprite: []
},
// Fetch bundles from JSON
bundles = loadJSON(path.join(root, "bundles.json")),
package = loadJSON(path.join(root, "package.json"));
// Load json
function loadJSON(path) {
try {
return JSON.parse(fs.readFileSync(path));
}
catch(err) {
return {};
}
}
var build = {
js: function (files, bundle) {
for (var key in files) {
(function(key) {
var name = "js-" + key;
tasks.js.push(name);
gulp.task(name, function () {
return gulp
.src(bundles[bundle].js[key])
.pipe(concat(key))
.pipe(uglify())
.pipe(gulp.dest(paths[bundle].output));
});
})(key);
}
},
less: function(files, bundle) {
for (var key in files) {
(function (key) {
var name = "less-" + key;
tasks.less.push(name);
gulp.task(name, function () {
return gulp
.src(bundles[bundle].less[key])
.pipe(less())
.on("error", gutil.log)
.pipe(concat(key))
.pipe(prefix(["last 2 versions"], { cascade: true }))
.pipe(minify())
.pipe(gulp.dest(paths[bundle].output));
});
})(key);
}
},
sass: function(files, bundle) {
for (var key in files) {
(function (key) {
var name = "sass-" + key;
tasks.sass.push(name);
gulp.task(name, function () {
return gulp
.src(bundles[bundle].sass[key])
.pipe(sass())
.on("error", gutil.log)
.pipe(concat(key))
.pipe(prefix(["last 2 versions"], { cascade: true }))
.pipe(minify())
.pipe(gulp.dest(paths[bundle].output));
});
})(key);
}
},
sprite: function(bundle) {
var name = "sprite-" + bundle;
tasks.sprite.push(name);
// Process Icons
gulp.task(name, function () {
return gulp
.src(paths[bundle].src.sprite)
.pipe(svgmin({
plugins: [{
removeDesc: true
}]
}))
.pipe(svgstore())
.pipe(rename({ basename: (bundle == "plyr" ? "sprite" : bundle) }))
.pipe(gulp.dest(paths[bundle].output));
});
}
};
// Plyr core files
build.js(bundles.plyr.js, "plyr");
build.less(bundles.plyr.less, "plyr");
build.sass(bundles.plyr.sass, "plyr");
build.sprite("plyr");
// Docs files
build.less(bundles.docs.less, "docs");
build.js(bundles.docs.js, "docs");
build.sprite("docs");
// Build all JS
gulp.task("js", function(){
run(tasks.js);
});
// Build SASS (for testing, default is LESS)
gulp.task("sass", function(){
run(tasks.sass);
});
// Watch for file changes
gulp.task("watch", function () {
// Plyr core
gulp.watch(paths.plyr.src.js, tasks.js);
gulp.watch(paths.plyr.src.less, tasks.less);
gulp.watch(paths.plyr.src.sprite, tasks.sprite);
// Docs
gulp.watch(paths.docs.src.js, tasks.js);
gulp.watch(paths.docs.src.less, tasks.less);
gulp.watch(paths.docs.src.sprite, tasks.sprite);
});
// Default gulp task
gulp.task("default", function(){
run(tasks.js, tasks.less, tasks.sprite, "watch");
});
// Publish a version to CDN and docs
// --------------------------------------------
// Some options
var aws = loadJSON(path.join(root, "aws.json")),
version = package.version,
maxAge = 31536000, // seconds 1 year
options = {
cdn: {
headers: {
"Cache-Control": "max-age=" + maxAge,
"Vary": "Accept-Encoding"
},
gzippedOnly: true
},
docs: {
headers: {
"Cache-Control": "public, must-revalidate, proxy-revalidate, max-age=0",
"Vary": "Accept-Encoding"
},
gzippedOnly: true
}
};
// If aws is setup
if("cdn" in aws) {
var cdnpath = new RegExp(aws.cdn.bucket + "\/(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)","gi"),
localpath = new RegExp("(\.\.\/)?dist", "gi");
}
// Publish version to CDN bucket
gulp.task("cdn", function () {
console.log("Uploading " + version + " to " + aws.cdn.bucket);
// Upload to CDN
gulp.src(paths.upload)
.pipe(size({
showFiles: true,
gzip: true
}))
.pipe(rename(function (path) {
path.dirname = path.dirname.replace(".", version);
}))
.pipe(gzip())
.pipe(s3(aws.cdn, options.cdn));
});
// Publish to Docs bucket
gulp.task("docs", function () {
console.log("Uploading " + version + " docs to " + aws.docs.bucket);
// Replace versioned files in readme.md
gulp.src([root + "/readme.md"])
.pipe(replace(cdnpath, aws.cdn.bucket + "/" + version))
.pipe(gulp.dest(root));
// Replace local file paths with remote paths in docs
// e.g. "../dist/plyr.js" to "https://cdn.plyr.io/x.x.x/plyr.js"
gulp.src([paths.docs.root + "*.html"])
.pipe(replace(localpath, "https://" + aws.cdn.bucket + "/" + version))
.pipe(gzip())
.pipe(s3(aws.docs, options.docs));
// Upload error.html to cdn (as well as docs site)
gulp.src([paths.docs.root + "error.html"])
.pipe(replace(localpath, "https://" + aws.cdn.bucket + "/" + version))
.pipe(gzip())
.pipe(s3(aws.cdn, options.docs));
});
// Open the docs site to check it's sweet
gulp.task("open", function () {
console.log("Opening " + aws.docs.bucket + "...");
// A file must be specified or gulp will skip the task
// Doesn't matter which file since we set the URL above
// Weird, I know...
gulp.src([paths.docs.root + "index.html"])
.pipe(open("", {
url: "http://" + aws.docs.bucket
}));
});
// Do everything
gulp.task("publish", function () {
run(tasks.js, tasks.less, tasks.sprite, "cdn", "docs");
});
gulp.registry(new HubRegistry(['tasks/*.js']));

View File

@@ -1,40 +1,100 @@
{
"name": "plyr",
"version": "1.5.9",
"version": "3.7.0",
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
"homepage": "http://plyr.io",
"main": "gulpfile.js",
"dependencies": {},
"devDependencies": {
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-concat": "^2.3.3",
"gulp-gzip": "^1.0.0",
"gulp-less": "^3.0.5",
"gulp-minify-css": "^1.2.1",
"gulp-open": "^1.0.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.3",
"gulp-s3": "^0.3.0",
"gulp-sass": "^2.1.0",
"gulp-size": "^2.0.0",
"gulp-svgmin": "^1.0.0",
"gulp-svgstore": "^5.0.0",
"gulp-uglify": "^1.5.1",
"gulp-util": "^3.0.7",
"run-sequence": "^1.1.5"
},
"homepage": "https://plyr.io",
"author": "Sam Potts <sam@potts.es>",
"main": "dist/plyr.js",
"types": "src/js/plyr.d.ts",
"module": "dist/plyr.min.mjs",
"jsnext:main": "dist/plyr.min.mjs",
"browser": "dist/plyr.min.js",
"sass": "src/sass/plyr.scss",
"style": "dist/plyr.css",
"keywords": [
"HTML5 Video",
"HTML5 Audio",
"Media Player"
"Media Player",
"DASH",
"Shaka",
"WordPress",
"HLS"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/selz/plyr.git"
"url": "git://github.com/sampotts/plyr.git"
},
"authors": [
"Sam Potts <me@sampotts.me>"
],
"license": "MIT"
"bugs": {
"url": "https://github.com/sampotts/plyr/issues"
},
"browserslist": "> 1%",
"scripts": {
"build": "gulp build",
"lint": "eslint src/js && npm run remark && stylelint **/*.scss",
"lint:fix": "eslint --fix src/js && stylelint **/*.scss --fix",
"remark": "remark -f --use 'validate-links=repository:\"sampotts/plyr\"' '{,!(node_modules),.?**/}*.md'",
"deploy": "yarn lint && gulp version && gulp build && gulp deploy",
"format": "prettier --write \"./{src,demo/src}/**/*.{js,scss}\"",
"spellcheck": "cspell \"**/*.{js,md,scss,json}\" --no-must-find-files",
"start": "gulp"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/preset-env": "^7.16.11",
"@sampotts/eslint-config": "1.1.7",
"autoprefixer": "^10.4.4",
"aws-sdk": "^2.1116.0",
"babel-eslint": "^10.1.0",
"browser-sync": "^2.27.9",
"colorette": "2.0.16",
"cspell": "^5.19.7",
"cssnano": "^5.1.7",
"del": "^6.0.0",
"eslint": "^7.23.0",
"fancy-log": "^2.0.0",
"git-branch": "^2.0.1",
"gulp": "^4.0.2",
"gulp-awspublish": "^6.0.2",
"gulp-better-rollup": "^4.0.1",
"gulp-filter": "^7.0.0",
"gulp-header": "^2.0.9",
"gulp-hub": "^4.2.0",
"gulp-if": "^3.0.0",
"gulp-imagemin": "^7.1.0",
"gulp-open": "^3.0.1",
"gulp-plumber": "^1.2.1",
"gulp-postcss": "^9.0.1",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.1.3",
"gulp-sass": "^5.1.0",
"gulp-size": "^4.0.1",
"gulp-sourcemaps": "^3.0.0",
"gulp-svgstore": "^9.0.0",
"gulp-terser": "^2.1.0",
"postcss": "^8.4.12",
"postcss-custom-properties": "^12.1.7",
"postcss-scss": "^4.0.3",
"prettier-eslint": "^12.0.0",
"prettier-stylelint": "^0.4.2",
"remark-cli": "^10.0.1",
"remark-validate-links": "^11.0.2",
"rollup": "^2.70.2",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"sass": "^1.50.0",
"stylelint": "^14.7.1",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-sass-guidelines": "^9.0.1",
"stylelint-selector-bem-pattern": "^2.1.1"
},
"dependencies": {
"core-js": "^3.22.0",
"custom-event-polyfill": "^1.0.7",
"loadjs": "^4.2.0",
"rangetouch": "^2.0.1",
"url-polyfill": "^1.1.12"
}
}

39
plyr.code-workspace Normal file
View File

@@ -0,0 +1,39 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"search.exclude": {
"**/node_modules": true,
"**/dist": true
},
// Linting
"stylelint.enable": true,
"stylelint.validate": ["css", "scss"],
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"javascript.validate.enable": false,
// Formatting
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.formatOnSave": true,
// Trim on save
"files.trimTrailingWhitespace": true,
// Special file associations
"files.associations": {
".eslintrc": "jsonc"
},
"editor.codeActionsOnSave": {
"source.fixAll": true
}
}
}

Some files were not shown because too many files have changed in this diff Show More