Compare commits
130 Commits
Author | SHA1 | Date | |
---|---|---|---|
6694c1e6cf | |||
19ca906e50 | |||
12e94775d6 | |||
df7f52d885 | |||
d5b5faafbb | |||
a318e8588b | |||
51fb252cd8 | |||
86b2f61b56 | |||
232a9fe868 | |||
e8bfe73b1d | |||
ab0d762675 | |||
a6a314e011 | |||
514bdff92e | |||
745e56a3a3 | |||
130fb78b4c | |||
3718ec69ba | |||
4610f4a8c9 | |||
a8062354ec | |||
aac0a5a3a9 | |||
92b9e3400b | |||
bea513f5dd | |||
9d109bf02d | |||
fc45ab48c9 | |||
58e9b02405 | |||
b578fb4840 | |||
f18d9589eb | |||
35c6ec9461 | |||
56d9730d0a | |||
6e18bc8b31 | |||
81756a1af9 | |||
05e1ab1165 | |||
a0ddc5e6eb | |||
dc40b1f93a | |||
d7cc29f2fb | |||
0505e49038 | |||
6ff1e47341 | |||
e72a91de6e | |||
52ec4c012d | |||
ae89c92ab6 | |||
57ad124ce8 | |||
a85d45d2e5 | |||
a6f57fc034 | |||
04c9653b86 | |||
b8cdc71001 | |||
277ebf0fd1 | |||
7682d998e7 | |||
05b9b9a831 | |||
eee699cec6 | |||
3c9e9862d8 | |||
39dc651a9d | |||
4effda125a | |||
bf9de231d8 | |||
ef12332505 | |||
1b735f1727 | |||
7f7ecf852e | |||
931672895f | |||
0952bc8239 | |||
7e7508ca82 | |||
095d100ba4 | |||
c61fad51c1 | |||
7b11c6803d | |||
9b75436380 | |||
be19b72719 | |||
2fdcc18356 | |||
6425a33ccd | |||
12c5dbd290 | |||
cb591dac0c | |||
4c1cdea56e | |||
80cfabbaf9 | |||
c7d28b09c0 | |||
161dd48312 | |||
383515c1b7 | |||
98792168e4 | |||
01437a4a38 | |||
03ed86f5c2 | |||
1a745e1eaa | |||
70646ca907 | |||
af774b6f02 | |||
7a9eac093a | |||
4afd311ef6 | |||
7eec6c6739 | |||
521431e093 | |||
24bc415faf | |||
552f448ccd | |||
152e94f229 | |||
cb318dd6ad | |||
9ee0d00a35 | |||
c0909095e3 | |||
1e732694eb | |||
30922246e9 | |||
edf5a14171 | |||
1c9f7901bc | |||
1bd6ffc84d | |||
845ed000fc | |||
c7b2347ccd | |||
a2f18c4e31 | |||
37c8948d2c | |||
351e1540c5 | |||
b3299b4641 | |||
be2e7d4c99 | |||
7238eab737 | |||
3c2921b994 | |||
179c6fca0b | |||
69194915d4 | |||
341fd59cf6 | |||
a6c8b7e506 | |||
98e4c5acea | |||
1496b21c83 | |||
ac0061b83e | |||
0b7dc51bd1 | |||
126f80ed78 | |||
e0ef7482c6 | |||
6ffb971226 | |||
72187a89dd | |||
a461500ab9 | |||
c830af492c | |||
1f6f841fcb | |||
99960c0dc5 | |||
e8a8b08215 | |||
a989e87a2d | |||
0bceeb4674 | |||
5a433f2fc8 | |||
c86b824a04 | |||
4a69ef3874 | |||
d351f9f172 | |||
3f20462943 | |||
3470d5f5e6 | |||
bb976ccf4b | |||
f02cb5635f | |||
fad3f41ca7 |
@ -8,11 +8,11 @@
|
||||
"node" : false,
|
||||
"rhino" : false,
|
||||
"couch" : false,
|
||||
"wsh" : true, // Windows Scripting Host.
|
||||
"wsh" : false, // Windows Scripting Host.
|
||||
"jquery" : false,
|
||||
|
||||
// Development.
|
||||
"debug" : false, // Allow debugger statements e.g. browser breakpoints.
|
||||
"debug" : true, // Allow debugger statements e.g. browser breakpoints.
|
||||
"devel" : true, // Allow developments statements e.g. `console.log();`.
|
||||
|
||||
// ECMAScript 5.
|
||||
@ -25,7 +25,7 @@
|
||||
"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. `===`.
|
||||
"eqeqeq" : true, // Require triple equals i.e. `===`.
|
||||
"eqnull" : false, // Tolerate use of `== null`.
|
||||
"evil" : false, // Tolerate use of `eval`.
|
||||
"expr" : false, // Tolerate `ExpressionStatement` as Programs.
|
||||
|
@ -15,7 +15,7 @@
|
||||
"main": [
|
||||
"dist/plyr.css",
|
||||
"dist/plyr.js",
|
||||
"dist/sprite.svg",
|
||||
"dist/plyr.svg",
|
||||
"src/less/plyr.less",
|
||||
"src/scss/plyr.scss",
|
||||
"src/js/plyr.js"
|
||||
|
10
bundles.json
@ -10,14 +10,14 @@
|
||||
"plyr.js": ["src/js/plyr.js"]
|
||||
}
|
||||
},
|
||||
"docs": {
|
||||
"demo": {
|
||||
"less": {
|
||||
"docs.css": ["docs/src/less/docs.less"]
|
||||
"demo.css": ["demo/src/less/demo.less"]
|
||||
},
|
||||
"js": {
|
||||
"docs.js": [
|
||||
"docs/src/js/lib/classlist.js",
|
||||
"docs/src/js/docs.js"
|
||||
"demo.js": [
|
||||
"demo/src/js/lib/classlist.js",
|
||||
"demo/src/js/main.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
180
changelog.md
@ -1,5 +1,145 @@
|
||||
# Changelog
|
||||
|
||||
## v2.0.4
|
||||
- Fix for Firefox full screen (fixes #343)
|
||||
|
||||
## v2.0.3
|
||||
- Set 'global' keyboard shortcut option to false as default, added `<textarea>` to editable elements to be ignored.
|
||||
|
||||
## v2.0.2
|
||||
- Added 'global' keyboard shortcut option
|
||||
|
||||
## v2.0.1
|
||||
- Version bump for NPM
|
||||
|
||||
# v2.0.0
|
||||
This version contains several potential ***breaking changes***:
|
||||
|
||||
- `setup()` has been reverted to pre v1.8.0 behaviour; meaning it will return the *instance* rather than the *element*. This is because the reference to the instance is no longer added to the original element (see below).
|
||||
- The reference to the `plyr` instance is now added to the media element rather than original container. This is because if a container with multiple children was passed to `setup()` the references to all instances would have been added to the container, creating issues. I would recommend using the return value from `setup()` or the new `get()` method to access the instance.
|
||||
- Players will always be wrapped in their own div now - this makes `setup()` and `destroy()` cleaner. This *may* break any custom styling based on DOM position.
|
||||
- Players no longer seek to 0 on 'ended' - this is to fix a bug with Microsoft Edge as it triggers 'ended' on media change for whatever reason. They'll never change ;-)
|
||||
|
||||
And some other changes and bug fixes:
|
||||
|
||||
- New `get()` method on the global plyr object to get all instances inside a container
|
||||
- New API methods:
|
||||
- `getOriginal()` to get the original, *unmodified* element plyr was setup on (`<video>`, `<audio>` or empty `<div>` for YouTube and Vimeo)
|
||||
- `getContainer()` to get the players outer wrapper element
|
||||
- `getMedia()` to get the players media element (`<video>`, `<audio>` or empty `<div>` for YouTube and Vimeo)
|
||||
- `getEmbed()` to access the YouTube or Vimeo API directly
|
||||
- `getType()` to get the type of the player
|
||||
- `isReady()` to determine if an instance has completed setup and necessary APIs are loaded (for YouTube / Vimeo)
|
||||
- `on()` to provide an easy way to listen to events
|
||||
- `stop()` to, you guessed it, stop the player
|
||||
- `destroy()` now works correctly for YouTube and Vimeo (fixes #272)
|
||||
- New `destroyed` event when `destroy()` has completed (original element is passed as event.target)
|
||||
- Default volume is now 10 (max) rather than 5
|
||||
- Sprite is only loaded once (fixes #259)
|
||||
- Fixes for Vimeo post message bugs on source change or destroy (fixes #318)
|
||||
- Save caption state in storage (fixes #311)
|
||||
- Added keyboard shortcuts to the current focused player (with `keyboardShortcuts` boolean option to disable) (fixes #309)
|
||||
- Fix for captions bug (fixes #332)
|
||||
- Change to AMD (fixes #298)
|
||||
|
||||
## v1.8.12
|
||||
- Vimeo keyboard focus fix (Fixes #317)
|
||||
- Fix for Vimeo on basic support devices
|
||||
|
||||
## v1.8.11
|
||||
- Fix for keyboard navigation on Vimeo (Fixes #317)
|
||||
- Fix for bug introduced in v1.8.9 related to additional controls
|
||||
- Vimeo API upgrade
|
||||
- Fix for YouTube bug introduced in v1.8.9
|
||||
- Added support for passing array to .setup() (Fixes #319)
|
||||
|
||||
## v1.8.10
|
||||
- Fix for seek issues introduced in v1.8.9
|
||||
|
||||
## v1.8.9
|
||||
- Fix for fullscreen not being defined (Fixes #295)
|
||||
- Fix for multiline captions (Fixes #314)
|
||||
- Clean up of type checks and fix for `restart()` (Fixes #315)
|
||||
- Fix for `MEDIA_ERR_SRC_NOT_SUPPORTED` when calling `.source()` API method
|
||||
|
||||
## v1.8.8
|
||||
- Added getCurrentTime API method (fixes #292)
|
||||
- Fix for !hideControls on touch devices (fixes #303)
|
||||
|
||||
## v1.8.7
|
||||
- Line height fix
|
||||
|
||||
## v1.8.6
|
||||
- Reverted font size change
|
||||
|
||||
## v1.8.5
|
||||
- Fixed overflow issues (fixes #286)
|
||||
|
||||
## v1.8.4
|
||||
- Fix for large play button on small videos
|
||||
|
||||
## 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
|
||||
|
||||
## v1.8.2
|
||||
- Fixed event bubbling
|
||||
|
||||
## v1.8.1
|
||||
- Fixed inaccurate log message
|
||||
|
||||
# v1.8.0
|
||||
- ***(Important)*** `setup()` now returns the element Plyr was setup on rather than the `plyr` object. This means `var player = plyr.setup()[0];` would now be `var player = plyr.setup()[0].plyr;`. This improves support for React and other virtual dom frameworks as mentioned in #254
|
||||
- Fixed using a relative URL for `iconUrl` in IE (fixes #269)
|
||||
|
||||
# v1.7.0
|
||||
- SASS cleanup (fixes #265)
|
||||
- Docs tidy up to help quick start (fixes #253)
|
||||
- Fix for issues with data attribute options passing (fixes #257)
|
||||
- ***(Important)*** Removed the requirement for a wrapper div to setup Plyr and removed the dependency on the `plyr` classname as a JS hook. By default it will now look for `<video>`, `<audio>` and `[data-type]` elements. If you are just calling `setup()` with a `<div class="plyr">` you may want to give it a good test after upgrading. You can probably remove the wrapper div. The reason behind this is to make setup easier for newcomers and prevent the styling being used on unsupported players (because the plyr classname was used as a CSS and JS hook - which isn't ideal)
|
||||
- Renamed the 'docs' folder to `demo` to avoid confusion - the readme is the docs after all
|
||||
|
||||
## v1.6.20
|
||||
- Fix for multiple sprites being requested (fixes #259)
|
||||
|
||||
## v1.6.19
|
||||
- Fix for scroll direction issues on volume control (fixes #258)
|
||||
|
||||
## v1.6.18
|
||||
- Reduced rounding of seek value from 1 decimal point to 4 (fixes #242)
|
||||
|
||||
## v1.6.17
|
||||
- Added `disableContextMenu` option to hide the right click context menu (fixes #248 and #225)
|
||||
|
||||
## v1.6.16
|
||||
- Always hide standard controls (fixes #225)
|
||||
- Fix for Tooltips overflowing (fixes #230)
|
||||
|
||||
## v1.6.15
|
||||
- Restore scroll position when exiting full screen (fixes #236)
|
||||
|
||||
## v1.6.14
|
||||
- SVG sprite loading automatically for an easier setup
|
||||
- Touch devices now show controls on touch rather than pausing playback
|
||||
|
||||
## v1.6.13
|
||||
- Decreased sensitivity and inverted scroll on volume slider (scroll up to increase, down to decrease)
|
||||
|
||||
## v1.6.12
|
||||
- Fix for undefined buffer error
|
||||
- Add scroll listener on volume slider (PR #227 bty @igoradamenko)
|
||||
|
||||
## v1.6.11
|
||||
- Fix for Vimeo fullscreen (fixes #214)
|
||||
|
||||
## v1.6.10
|
||||
- Changed default icon prefix from 'icon' to 'plyr' to avoid clashes
|
||||
|
||||
## v1.6.9
|
||||
- Added 'latest' CDN option
|
||||
- Renamed `sprite.svg` to `plyr.svg` to be inline with the other package files
|
||||
@ -65,18 +205,18 @@
|
||||
- Docs fixes inc controls HTML (fixes #180)
|
||||
|
||||
## v1.5.17
|
||||
- Expose YouTube and Vimeo API (docs update required) (Fixes #176)
|
||||
- Expose YouTube and Vimeo API (docs update required) (fixes #176)
|
||||
- Auto set title based on YouTube getVideoData() title property
|
||||
- Bug fix for Vimeo API change (Uncaught TypeError: Cannot read property 'value' of undefined) due to a change their end
|
||||
|
||||
## v1.5.16
|
||||
- Cancel requests on source change (Fixes #174)
|
||||
- Cancel requests on source change (fixes #174)
|
||||
|
||||
## v1.5.15
|
||||
- Fix for CustomEvent polyfill and related bug (See #172)
|
||||
- Fix for CustomEvent polyfill and related bug (see #172)
|
||||
|
||||
## v1.5.14
|
||||
- Volume storage fix (Fixes #171)
|
||||
- Volume storage fix (fixes #171)
|
||||
|
||||
## v1.5.13
|
||||
- Fix for manual caption rendering
|
||||
@ -179,11 +319,11 @@
|
||||
## v1.2.3
|
||||
- Fix for YouTube on iPhone or unsupported browsers (fallback to YouTube native)
|
||||
- Docs tidy up
|
||||
- Fullscreen for Safari fix (Fixes #96)
|
||||
- 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)
|
||||
- Fix for :focus keyboard vs mouse (fixes #61)
|
||||
- Fix for caption positioning in full screen (fixes #92)
|
||||
|
||||
## v1.2.1
|
||||
- Tooltip bug fix
|
||||
@ -210,7 +350,7 @@
|
||||
- Bug fix for 1.1.8
|
||||
|
||||
## v1.1.8
|
||||
- setVolume API method improvements (Fixes #83)
|
||||
- setVolume API method improvements (fixes #83)
|
||||
|
||||
## v1.1.7
|
||||
- Restore classname on destroy()
|
||||
@ -219,7 +359,7 @@
|
||||
- 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)
|
||||
- Fix for incorrect `isFullscreen()` return value in Mozilla (fixes #38)
|
||||
|
||||
## v1.1.4
|
||||
- Minor bug fixes
|
||||
@ -243,17 +383,17 @@
|
||||
- Display duration on `metadataloaded`
|
||||
|
||||
## v1.0.30
|
||||
- Fixed bug with media longer than 60 minutes (Fixes #69)
|
||||
- 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)
|
||||
- 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)
|
||||
- Keyboard accessibility improvements (fixes #66)
|
||||
|
||||
## v1.0.26
|
||||
- Fixes for SASS (cheers @brunowego)
|
||||
@ -264,29 +404,29 @@
|
||||
- Classnames for left/right controls changed
|
||||
|
||||
## v1.0.24
|
||||
- Added tooltip option to display labels as tooltips (Fixes #50)
|
||||
- Added tooltip option to display labels as tooltips (fixes #50)
|
||||
|
||||
## v1.0.23
|
||||
- Handling loading states in the UI (Fixes #36)
|
||||
- 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 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)
|
||||
- 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)
|
||||
- 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)
|
||||
- Fixed firefox fullscreen issue (fixes #38)
|
||||
|
||||
## v1.0.18
|
||||
- Added CDN references
|
||||
@ -310,7 +450,7 @@
|
||||
- Minor tweaks
|
||||
|
||||
## v1.0.12
|
||||
- Handle native events (Issue #34)
|
||||
- Handle native events (issue #34)
|
||||
|
||||
## v1.0.11
|
||||
- Bug fixes for fullscreen mode
|
||||
|
22
controls.md
@ -47,23 +47,23 @@ This is an example `html` option with all controls.
|
||||
```javascript
|
||||
var controls = ["<div class='plyr__controls'>",
|
||||
"<button type='button' data-plyr='restart'>",
|
||||
"<svg><use xlink:href='#icon-restart'></use></svg>",
|
||||
"<svg><use xlink:href='#plyr-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>",
|
||||
"<svg><use xlink:href='#plyr-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>",
|
||||
"<svg><use xlink:href='#plyr-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>",
|
||||
"<svg><use xlink:href='#plyr-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>",
|
||||
"<svg><use xlink:href='#plyr-fast-forward'></use></svg>",
|
||||
"<span class='plyr__sr-only'>Forward {seektime} secs</span>",
|
||||
"</button>",
|
||||
"<span class='plyr__progress'>",
|
||||
@ -84,8 +84,8 @@ var controls = ["<div class='plyr__controls'>",
|
||||
"<span class='plyr__time--duration'>00:00</span>",
|
||||
"</span>",
|
||||
"<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>",
|
||||
"<svg class='icon--muted'><use xlink:href='#plyr-muted'></use></svg>",
|
||||
"<svg><use xlink:href='#plyr-volume'></use></svg>",
|
||||
"<span class='plyr__sr-only'>Toggle Mute</span>",
|
||||
"</button>",
|
||||
"<span class='plyr__volume'>",
|
||||
@ -94,13 +94,13 @@ var controls = ["<div class='plyr__controls'>",
|
||||
"<progress class='plyr__volume--display' max='10' value='0' role='presentation'></progress>",
|
||||
"</span>",
|
||||
"<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>",
|
||||
"<svg class='icon--captions-on'><use xlink:href='#plyr-captions-on'></use></svg>",
|
||||
"<svg><use xlink:href='#plyr-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>",
|
||||
"<svg class='icon--exit-fullscreen'><use xlink:href='#plyr-exit-fullscreen'></use></svg>",
|
||||
"<svg><use xlink:href='#plyr-enter-fullscreen'></use></svg>",
|
||||
"<span class='plyr__sr-only'>Toggle Fullscreen</span>",
|
||||
"</button>",
|
||||
"</div>"].join("");
|
||||
|
1
demo/dist/demo.css
vendored
Normal file
1
demo/dist/demo.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
"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,s=arguments.length;for(i=0;s>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",s=e.Element[i],o=Object,n=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=n.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],s=0,o=i.length;o>s;s++)this.push(i[s]);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,s=t.length,o=!1;do e=t[i]+"",-1===c(this,e)&&(this.push(e),o=!0);while(++i<s);o&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,s=0,o=i.length,n=!1;do for(e=i[s]+"",t=c(this,e);-1!==t;)this.splice(t,1),n=!0,t=c(this,e);while(++s<o);n&&this._updateClassName()},u.toggle=function(e,t){e+="";var i=this.contains(e),s=i?t!==!0&&"remove":t!==!1&&"add";return s&&this[s](e),t===!0||t===!1?t:!i},u.toString=function(){return this.join(" ")},o.defineProperty){var p={get:d,enumerable:!0,configurable:!0};try{o.defineProperty(s,t,p)}catch(h){-2146823252===h.number&&(p.enumerable=!1,o.defineProperty(s,t,p))}}else o[i].__defineGetter__&&s.__defineGetter__(t,d)}}(self)),function(){function e(e,t,i){if(e)if(e.classList)e.classList[i?"add":"remove"](t);else{var s=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=s+(i?" "+t:"")}}function t(t,i){if(t in n&&(i||t!=r)&&(r.length||t!=n.video)){switch(t){case n.video:s.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.en.vtt","default":!0}]});break;case n.audio:s.source({type:"audio",title:"Kishi Bashi – “It All Began With A Burst”",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:s.source({type:"video",title:"View From A Blue Moon",sources:[{src:"bTqVqk7FSmY",type:"youtube"}]});break;case n.vimeo:s.source({type:"video",title:"View From A Blue Moon",sources:[{src:"143418951",type:"vimeo"}]})}r=t;for(var a=o.length-1;a>=0;a--)e(o[a].parentElement,"active",!1);e(document.querySelector('[data-source="'+t+'"]').parentElement,"active",!0)}}var i=plyr.setup({debug:!0,title:"Video demo",iconUrl:"../dist/plyr.svg",tooltips:{controls:!0},captions:{defaultActive:!0}});plyr.loadSprite("dist/demo.svg");for(var s=i[0],o=document.querySelectorAll("[data-source]"),n={video:"video",audio:"audio",youtube:"youtube",vimeo:"vimeo"},r=window.location.hash.replace("#",""),a=window.history&&window.history.pushState,c=o.length-1;c>=0;c--)o[c].addEventListener("click",function(){var e=this.getAttribute("data-source");t(e),a&&history.pushState({type:e},"","#"+e)});if(window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),a){var l=!r.length;l&&(r=n.video),r in n&&history.replaceState({type:r},"",l?"":"#"+r),r!==n.video&&t(r,!0)}}(),document.domain.indexOf("plyr.io")>-1&&(!function(e,t,i,s,o,n,r){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,n=t.createElement(i),r=t.getElementsByTagName(i)[0],n.async=1,n.src=s,r.parentNode.insertBefore(n,r)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-40881672-11","auto"),ga("send","pageview"));
|
0
docs/dist/docs.svg → demo/dist/demo.svg
vendored
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@ -11,7 +11,7 @@
|
||||
<link rel="stylesheet" href="../dist/plyr.css">
|
||||
|
||||
<!-- Docs styles -->
|
||||
<link rel="stylesheet" href="dist/docs.css">
|
||||
<link rel="stylesheet" href="dist/demo.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@ -51,19 +51,17 @@
|
||||
</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">
|
||||
<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.en.vtt" default>
|
||||
<!-- 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.en.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>
|
||||
<!-- Fallback for browsers that don't support the <video> element -->
|
||||
<a href="https://cdn.selz.com/plyr/1.5/View_From_A_Blue_Moon_Trailer-HD.mp4" download>Download</a>
|
||||
</video>
|
||||
|
||||
<ul>
|
||||
<li class="plyr__cite plyr__cite--video"><small><a href="http://viewfromabluemoon.com/" target="_blank">View From A Blue Moon</a> © Brainfarm</small></li>
|
||||
@ -74,55 +72,14 @@
|
||||
</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/plyr.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>
|
||||
|
||||
<!-- Docs script -->
|
||||
<script src="dist/docs.js"></script>
|
||||
<script src="dist/demo.js"></script>
|
||||
|
||||
<!-- Rangetouch to fix <input type="range"> on touch devices (see https://rangetouch.com) -->
|
||||
<script src="https://cdn.rangetouch.com/0.0.9/rangetouch.js"></script>
|
||||
<script src="https://cdn.rangetouch.com/0.0.9/rangetouch.js" async></script>
|
||||
|
||||
<!-- Sharing libary (https://shr.one) -->
|
||||
<script src="https://cdn.shr.one/0.1.9/shr.js"></script>
|
185
demo/src/js/main.js
Normal file
@ -0,0 +1,185 @@
|
||||
// ==========================================================================
|
||||
// Plyr.io demo
|
||||
// This code is purely for the plyr.io website
|
||||
// Please see readme.md in the root or github.com/selz/plyr
|
||||
// ==========================================================================
|
||||
|
||||
/*global plyr*/
|
||||
|
||||
// General functions
|
||||
;(function() {
|
||||
//document.body.addEventListener('ready', function(event) { console.log(event); });
|
||||
|
||||
// Setup the player
|
||||
var instances = plyr.setup({
|
||||
debug: true,
|
||||
title: 'Video demo',
|
||||
iconUrl: '../dist/plyr.svg',
|
||||
tooltips: {
|
||||
controls: true
|
||||
},
|
||||
captions: {
|
||||
defaultActive: true
|
||||
}
|
||||
});
|
||||
plyr.loadSprite('dist/demo.svg');
|
||||
|
||||
// Plyr returns an array regardless
|
||||
var player = instances[0];
|
||||
|
||||
// Setup type toggle
|
||||
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 there's no current type set, assume video
|
||||
if(video) {
|
||||
currentType = types.video;
|
||||
}
|
||||
|
||||
// Replace current history state
|
||||
if(currentType in types) {
|
||||
history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType));
|
||||
}
|
||||
|
||||
// If it's not video, load the source
|
||||
if(currentType !== types.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)) {
|
||||
return;
|
||||
}
|
||||
|
||||
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.en.vtt',
|
||||
default: true
|
||||
}]
|
||||
});
|
||||
break;
|
||||
|
||||
case types.audio:
|
||||
player.source({
|
||||
type: 'audio',
|
||||
title: 'Kishi Bashi – “It All Began With A Burst”',
|
||||
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');
|
||||
}
|
@ -39,9 +39,10 @@ header {
|
||||
|
||||
// Sections
|
||||
section {
|
||||
padding-bottom: @padding-base;
|
||||
max-width: @example-width-video;
|
||||
margin: 0 auto @padding-base;
|
||||
|
||||
@media (min-width: @screen-sm) {
|
||||
padding-bottom: (@padding-base * 2);
|
||||
margin-bottom: (@padding-base * 2);
|
||||
}
|
||||
}
|
@ -2,11 +2,6 @@
|
||||
// Examples
|
||||
// ==========================================================================
|
||||
|
||||
section {
|
||||
margin: 0 auto @padding-base;
|
||||
max-width: @example-width-video;
|
||||
}
|
||||
|
||||
// For non supported browsers
|
||||
video {
|
||||
max-width: 100%;
|
||||
@ -21,7 +16,7 @@ video {
|
||||
.plyr--audio {
|
||||
max-width: @example-width-audio;
|
||||
}
|
||||
.plyr--video::after {
|
||||
.plyr__video-wrapper::after {
|
||||
content: "";
|
||||
pointer-events: none;
|
||||
position: absolute;
|
@ -1,5 +1,5 @@
|
||||
// ==========================================================================
|
||||
// HTML5 Video Player Demo Page
|
||||
// Plyr.io Demo Page
|
||||
// ==========================================================================
|
||||
|
||||
// CSS Reset
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 981 B |
Before Width: | Height: | Size: 779 B After Width: | Height: | Size: 779 B |
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
2
dist/plyr.css
vendored
4
dist/plyr.js
vendored
2
dist/plyr.svg
vendored
@ -1 +1 @@
|
||||
<?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 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd" fill-opacity=".5"/></symbol><symbol id="icon-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"/></symbol><symbol id="icon-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/></symbol><symbol id="icon-exit-fullscreen" viewBox="0 0 18 18"><path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/></symbol><symbol id="icon-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"/></symbol><symbol id="icon-muted" viewBox="0 0 18 18"><path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol><symbol id="icon-pause" viewBox="0 0 18 18"><path d="M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zM12 1c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"/></symbol><symbol id="icon-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225C3.052-.337 2 .225 2 1.125v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"/></symbol><symbol id="icon-restart" viewBox="0 0 18 18"><path d="M9.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.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 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.9L16 1.9l-6.3-.7z"/></symbol><symbol id="icon-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"/></symbol><symbol id="icon-volume" viewBox="0 0 18 18"><path d="M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"/><path d="M11.282 5.282a.909.909 0 0 0 0 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 0 0 0 1.316c.145.145.636.262 1.018.156a.725.725 0 0 0 .298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 0 0-1.316 0zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol></svg>
|
||||
<?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="plyr-captions-off" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd" fill-opacity=".5"/></symbol><symbol id="plyr-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"/></symbol><symbol id="plyr-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/></symbol><symbol id="plyr-exit-fullscreen" viewBox="0 0 18 18"><path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/></symbol><symbol id="plyr-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"/></symbol><symbol id="plyr-muted" viewBox="0 0 18 18"><path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol><symbol id="plyr-pause" viewBox="0 0 18 18"><path d="M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zM12 1c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"/></symbol><symbol id="plyr-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225C3.052-.337 2 .225 2 1.125v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"/></symbol><symbol id="plyr-restart" viewBox="0 0 18 18"><path d="M9.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.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 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.9L16 1.9l-6.3-.7z"/></symbol><symbol id="plyr-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"/></symbol><symbol id="plyr-volume" viewBox="0 0 18 18"><path d="M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"/><path d="M11.282 5.282a.909.909 0 0 0 0 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 0 0 0 1.316c.145.145.636.262 1.018.156a.725.725 0 0 0 .298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 0 0-1.316 0zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol></svg>
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
1
docs/dist/docs.css
vendored
1
docs/dist/docs.js
vendored
@ -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],o=Object,s=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=s.call(e.getAttribute("class")||""),i=t?t.split(/\s+/):[],n=0,o=i.length;o>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,o=!1;do e=t[i]+"",-1===c(this,e)&&(this.push(e),o=!0);while(++i<n);o&&this._updateClassName()},u.remove=function(){var e,t,i=arguments,n=0,o=i.length,s=!1;do for(e=i[n]+"",t=c(this,e);-1!==t;)this.splice(t,1),s=!0,t=c(this,e);while(++n<o);s&&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(" ")},o.defineProperty){var p={get:d,enumerable:!0,configurable:!0};try{o.defineProperty(n,t,p)}catch(h){-2146823252===h.number&&(p.enumerable=!1,o.defineProperty(n,t,p))}}else o[i].__defineGetter__&&n.__defineGetter__(t,d)}}(self)),plyr.setup(".js-media-player",{debug:!0,title:"Video demo",tooltips:{controls:!0},captions:{defaultActive:!0}}),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,s){if(t in n&&(s||t!=o)&&(o.length||t!=n.video)){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.en.vtt","default":!0}]});break;case n.audio:r.source({type:"audio",title:"Kishi Bashi – “It All Began With A Burst”",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"}]})}o=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"},o=window.location.hash.replace("#",""),s=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),s&&history.pushState({type:e},"","#"+e)});if(window.addEventListener("popstate",function(e){e.state&&"type"in e.state&&t(e.state.type)}),s){var a=!o.length;a&&(o=n.video),o in n&&history.replaceState({type:o},"",a?"":"#"+o),o!==n.video&&t(o,!0)}}(),document.domain.indexOf("plyr.io")>-1&&(!function(e,t,i,n,o,s,r){e.GoogleAnalyticsObject=o,e[o]=e[o]||function(){(e[o].q=e[o].q||[]).push(arguments)},e[o].l=1*new Date,s=t.createElement(i),r=t.getElementsByTagName(i)[0],s.async=1,s.src=n,r.parentNode.insertBefore(s,r)}(window,document,"script","//www.google-analytics.com/analytics.js","ga"),ga("create","UA-40881672-11","auto"),ga("send","pageview"));
|
@ -1,178 +0,0 @@
|
||||
// ==========================================================================
|
||||
// Docs example
|
||||
// ==========================================================================
|
||||
|
||||
/*global plyr*/
|
||||
|
||||
// Setup the player
|
||||
plyr.setup('.js-media-player', {
|
||||
debug: true,
|
||||
title: 'Video demo',
|
||||
tooltips: {
|
||||
controls: true
|
||||
},
|
||||
captions: {
|
||||
defaultActive: true
|
||||
}
|
||||
});
|
||||
|
||||
// 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 there's no current type set, assume video
|
||||
if(video) {
|
||||
currentType = types.video;
|
||||
}
|
||||
|
||||
// Replace current history state
|
||||
if(currentType in types) {
|
||||
history.replaceState({ 'type': currentType }, '', (video ? '' : '#' + currentType));
|
||||
}
|
||||
|
||||
// If it's not video, load the source
|
||||
if(currentType !== types.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)) {
|
||||
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.en.vtt',
|
||||
default: true
|
||||
}]
|
||||
});
|
||||
break;
|
||||
|
||||
case types.audio:
|
||||
player.source({
|
||||
type: 'audio',
|
||||
title: 'Kishi Bashi – “It All Began With A Burst”',
|
||||
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');
|
||||
}
|
79
gulpfile.js
@ -37,19 +37,19 @@ paths = {
|
||||
// Output paths
|
||||
output: path.join(root, "dist/")
|
||||
},
|
||||
docs: {
|
||||
demo: {
|
||||
// Source paths
|
||||
src: {
|
||||
less: path.join(root, "docs/src/less/**/*"),
|
||||
js: path.join(root, "docs/src/js/**/*"),
|
||||
sprite: path.join(root, "docs/src/sprite/**/*")
|
||||
less: path.join(root, "demo/src/less/**/*"),
|
||||
js: path.join(root, "demo/src/js/**/*"),
|
||||
sprite: path.join(root, "demo/src/sprite/**/*")
|
||||
},
|
||||
// Output paths
|
||||
output: path.join(root, "docs/dist/"),
|
||||
// Docs
|
||||
root: path.join(root, "docs/")
|
||||
output: path.join(root, "demo/dist/"),
|
||||
// Demo
|
||||
root: path.join(root, "demo/")
|
||||
},
|
||||
upload: [path.join(root, "dist/**"), path.join(root, "docs/dist/**")]
|
||||
upload: [path.join(root, "dist/**"), path.join(root, "demo/dist/**")]
|
||||
},
|
||||
|
||||
// Task arrays
|
||||
@ -178,10 +178,10 @@ build.less(bundles.plyr.less, "plyr");
|
||||
build.scss(bundles.plyr.scss, "plyr");
|
||||
build.sprite("plyr");
|
||||
|
||||
// Docs files
|
||||
build.less(bundles.docs.less, "docs");
|
||||
build.js(bundles.docs.js, "docs");
|
||||
build.sprite("docs");
|
||||
// Demo files
|
||||
build.less(bundles.demo.less, "demo");
|
||||
build.js(bundles.demo.js, "demo");
|
||||
build.sprite("demo");
|
||||
|
||||
// Build all JS
|
||||
gulp.task("js", function(){
|
||||
@ -200,10 +200,10 @@ gulp.task("watch", function () {
|
||||
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);
|
||||
// Demo
|
||||
gulp.watch(paths.demo.src.js, tasks.js);
|
||||
gulp.watch(paths.demo.src.less, tasks.less);
|
||||
gulp.watch(paths.demo.src.sprite, tasks.sprite);
|
||||
});
|
||||
|
||||
// Default gulp task
|
||||
@ -211,7 +211,7 @@ gulp.task("default", function(){
|
||||
run(tasks.js, tasks.less, tasks.sprite, "watch");
|
||||
});
|
||||
|
||||
// Publish a version to CDN and docs
|
||||
// Publish a version to CDN and demo
|
||||
// --------------------------------------------
|
||||
|
||||
// Some options
|
||||
@ -225,7 +225,7 @@ options = {
|
||||
"Vary": "Accept-Encoding"
|
||||
}
|
||||
},
|
||||
docs: {
|
||||
demo: {
|
||||
headers: {
|
||||
"Cache-Control": "no-cache, no-store, must-revalidate, max-age=0",
|
||||
"Vary": "Accept-Encoding"
|
||||
@ -234,7 +234,8 @@ options = {
|
||||
symlinks: function(version, filename) {
|
||||
return {
|
||||
headers: {
|
||||
"X-Amz-Website-Redirect-Location": "/" + version + "/" + filename,
|
||||
// http://stackoverflow.com/questions/2272835/amazon-s3-object-redirect
|
||||
"x-amz-website-redirect-location": "/" + version + "/" + filename,
|
||||
"Cache-Control": "no-cache, no-store, must-revalidate, max-age=0"
|
||||
}
|
||||
}
|
||||
@ -246,8 +247,8 @@ if("cdn" in aws) {
|
||||
var regex = "(?:0|[1-9][0-9]*)\\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[\\da-z\\-]+(?:\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\.[\\da-z\\-]+)*)?",
|
||||
cdnpath = new RegExp(aws.cdn.bucket + "\/" + regex, "gi"),
|
||||
semver = new RegExp("v" + regex, "gi"),
|
||||
localpath = new RegExp("(\.\.\/)?dist", "gi"),
|
||||
latest = "https://" + aws.cdn.bucket + "/latest";
|
||||
localPath = new RegExp("(\.\.\/)?dist", "gi"),
|
||||
versionPath = "https://" + aws.cdn.bucket + "/" + version;
|
||||
}
|
||||
|
||||
// Publish version to CDN bucket
|
||||
@ -263,12 +264,13 @@ gulp.task("cdn", function () {
|
||||
.pipe(rename(function (path) {
|
||||
path.dirname = path.dirname.replace(".", version);
|
||||
}))
|
||||
.pipe(replace(localPath, versionPath))
|
||||
.pipe(s3(aws.cdn, options.cdn));
|
||||
});
|
||||
|
||||
// Publish to Docs bucket
|
||||
gulp.task("docs", function () {
|
||||
console.log("Uploading " + version + " docs to " + aws.docs.bucket + "...");
|
||||
// Publish to demo bucket
|
||||
gulp.task("demo", function () {
|
||||
console.log("Uploading " + version + " demo to " + aws.demo.bucket + "...");
|
||||
|
||||
// Replace versioned files in readme.md
|
||||
gulp.src([root + "/readme.md"])
|
||||
@ -278,21 +280,22 @@ gulp.task("docs", function () {
|
||||
// Replace versioned files in plyr.js
|
||||
gulp.src(path.join(root, "src/js/plyr.js"))
|
||||
.pipe(replace(semver, "v" + version))
|
||||
.pipe(replace(cdnpath, aws.cdn.bucket + "/" + version))
|
||||
.pipe(gulp.dest(path.join(root, "src/js/")));
|
||||
|
||||
// Replace local file paths with remote paths in docs
|
||||
// Replace local file paths with remote paths in demo HTML
|
||||
// e.g. "../dist/plyr.js" to "https://cdn.plyr.io/x.x.x/plyr.js"
|
||||
gulp.src([paths.docs.root + "*.html"])
|
||||
.pipe(replace(localpath, latest))
|
||||
.pipe(s3(aws.docs, options.docs));
|
||||
gulp.src([paths.demo.root + "*.html"])
|
||||
.pipe(replace(localPath, versionPath))
|
||||
.pipe(s3(aws.demo, options.demo));
|
||||
|
||||
// Upload error.html to cdn (as well as docs site)
|
||||
return gulp.src([paths.docs.root + "error.html"])
|
||||
.pipe(replace(localpath, latest))
|
||||
.pipe(s3(aws.cdn, options.docs));
|
||||
// Upload error.html to cdn (as well as demo site)
|
||||
return gulp.src([paths.demo.root + "error.html"])
|
||||
.pipe(replace(localPath, versionPath))
|
||||
.pipe(s3(aws.cdn, options.demo));
|
||||
});
|
||||
|
||||
// Open the docs site to check it's sweet
|
||||
// Open the demo site to check it's sweet
|
||||
gulp.task("symlinks", function () {
|
||||
console.log("Updating symlinks...");
|
||||
|
||||
@ -315,20 +318,20 @@ gulp.task("symlinks", function () {
|
||||
}));
|
||||
});
|
||||
|
||||
// Open the docs site to check it's sweet
|
||||
// Open the demo site to check it's sweet
|
||||
gulp.task("open", function () {
|
||||
console.log("Opening " + aws.docs.bucket + "...");
|
||||
console.log("Opening " + aws.demo.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...
|
||||
return gulp.src([paths.docs.root + "index.html"])
|
||||
return gulp.src([paths.demo.root + "index.html"])
|
||||
.pipe(open("", {
|
||||
url: "http://" + aws.docs.bucket
|
||||
url: "http://" + aws.demo.bucket
|
||||
}));
|
||||
});
|
||||
|
||||
// Do everything
|
||||
gulp.task("publish", function () {
|
||||
run(tasks.js, tasks.less, tasks.sprite, "cdn", "docs", "symlinks");
|
||||
run(tasks.js, tasks.less, tasks.sprite, "cdn", "demo", "symlinks");
|
||||
});
|
||||
|
10
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plyr",
|
||||
"version": "1.6.9",
|
||||
"version": "2.0.4",
|
||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||
"homepage": "http://plyr.io",
|
||||
"main": "src/js/plyr.js",
|
||||
@ -27,7 +27,11 @@
|
||||
"keywords": [
|
||||
"HTML5 Video",
|
||||
"HTML5 Audio",
|
||||
"Media Player"
|
||||
"Media Player",
|
||||
"DASH",
|
||||
"Shaka",
|
||||
"WordPress",
|
||||
"HLS"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -38,7 +42,7 @@
|
||||
"url": "https://github.com/selz/plyr/issues"
|
||||
},
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
"doc": "readme.md"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
1892
src/js/plyr.js
@ -19,7 +19,8 @@
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
min-width: 200px;
|
||||
font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
font-family: @plyr-font-family;
|
||||
direction: ltr;
|
||||
|
||||
& when (@plyr-border-box = true) {
|
||||
// border-box everything
|
||||
@ -39,6 +40,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Focus
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
// Media elements
|
||||
video,
|
||||
audio {
|
||||
@ -177,7 +183,6 @@
|
||||
padding-bottom: 56.25%; /* 16:9 */
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
border-radius: inherit;
|
||||
|
||||
iframe {
|
||||
position: absolute;
|
||||
@ -225,6 +230,8 @@
|
||||
border-radius: 2px;
|
||||
padding: floor(@plyr-control-spacing / 3) @plyr-control-spacing;
|
||||
background: @plyr-captions-bg;
|
||||
box-decoration-break: clone;
|
||||
line-height: 150%;
|
||||
}
|
||||
span:empty {
|
||||
display: none;
|
||||
@ -246,16 +253,18 @@
|
||||
|
||||
// Controls
|
||||
// --------------------------------------------------------------
|
||||
// Hide native controls
|
||||
.plyr ::-webkit-media-controls {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Playback controls
|
||||
.plyr__controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
|
||||
transition: opacity .3s ease;
|
||||
|
||||
// Spacing
|
||||
> button,
|
||||
.plyr__progress,
|
||||
@ -280,7 +289,7 @@
|
||||
flex-shrink: 0;
|
||||
overflow: visible; // IE11
|
||||
vertical-align: middle;
|
||||
padding: (@plyr-control-spacing * .7);
|
||||
padding: @plyr-control-padding;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
border-radius: 3px;
|
||||
@ -289,8 +298,8 @@
|
||||
color: inherit;
|
||||
|
||||
svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
width: @plyr-control-icon-size;
|
||||
height: @plyr-control-icon-size;
|
||||
display: block;
|
||||
fill: currentColor;
|
||||
}
|
||||
@ -319,6 +328,7 @@
|
||||
// Hide controls
|
||||
.plyr--hide-controls .plyr__controls {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
// Video controls
|
||||
@ -332,6 +342,7 @@
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
color: @plyr-video-control-color;
|
||||
transition: opacity .3s ease;
|
||||
|
||||
button {
|
||||
// Hover and tab focus
|
||||
@ -349,7 +360,6 @@
|
||||
border-radius: inherit;
|
||||
background: @plyr-audio-controls-bg;
|
||||
border: @plyr-audio-controls-border;
|
||||
box-shadow: @plyr-audio-controls-box-shadow;
|
||||
color: @plyr-audio-control-color;
|
||||
|
||||
button {
|
||||
@ -366,6 +376,7 @@
|
||||
.plyr__play-large {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
@ -373,9 +384,9 @@
|
||||
background: @plyr-video-control-bg-hover;
|
||||
border: 4px solid currentColor;
|
||||
border-radius: 100%;
|
||||
box-shadow: 0 1px 1px fade(@plyr-video-controls-bg, 15%);
|
||||
box-shadow: 0 1px 1px fade(#000, 15%);
|
||||
color: @plyr-video-control-color;
|
||||
transition: opacity .3s ease, visibility .3s ease;
|
||||
transition: all .3s ease;
|
||||
|
||||
svg {
|
||||
position: relative;
|
||||
@ -480,6 +491,40 @@
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
// First tooltip
|
||||
.plyr__controls button:first-child .plyr__tooltip {
|
||||
left: 0;
|
||||
transform: translate(0, 10px) scale(.8);
|
||||
transform-origin: 0 100%;
|
||||
|
||||
&::before {
|
||||
left: (@plyr-control-icon-size / 2) + @plyr-control-padding;
|
||||
}
|
||||
}
|
||||
|
||||
// Last tooltip
|
||||
.plyr__controls button:last-child .plyr__tooltip {
|
||||
right: 0;
|
||||
transform: translate(0, 10px) scale(.8);
|
||||
transform-origin: 100% 100%;
|
||||
|
||||
&::before {
|
||||
left: auto;
|
||||
right: (@plyr-control-icon-size / 2) + @plyr-control-padding;
|
||||
transform: translateX(50%);
|
||||
}
|
||||
}
|
||||
|
||||
.plyr__controls button:first-child,
|
||||
.plyr__controls button:last-child {
|
||||
&:hover .plyr__tooltip,
|
||||
&.tab-focus:focus .plyr__tooltip,
|
||||
.plyr__tooltip--visible {
|
||||
transform: translate(0, 0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Playback progress
|
||||
// --------------------------------------------------------------
|
||||
// <progress> element
|
||||
@ -624,7 +669,6 @@
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: @plyr-font-size-small;
|
||||
line-height: .95;
|
||||
}
|
||||
// Media duration hidden on small screens
|
||||
.plyr__time + .plyr__time {
|
||||
@ -673,7 +717,6 @@
|
||||
|
||||
// Fullscreen
|
||||
// --------------------------------------------------------------
|
||||
.plyr--fullscreen,
|
||||
.plyr--fullscreen-active {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@ -684,7 +727,7 @@
|
||||
width: 100%;
|
||||
z-index: 10000000;
|
||||
background: #000;
|
||||
border-radius: 0;
|
||||
border-radius: 0 !important;
|
||||
|
||||
video {
|
||||
height: 100%;
|
||||
@ -699,4 +742,11 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
// Vimeo requires some different styling
|
||||
&.plyr--vimeo .plyr__video-wrapper {
|
||||
height: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
@ -11,33 +11,35 @@
|
||||
// Colors
|
||||
@plyr-color-main: #3498db;
|
||||
|
||||
// Font sizes
|
||||
// Font
|
||||
@plyr-font-family: Avenir, 'Avenir Next', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
|
||||
@plyr-font-size-small: 14px;
|
||||
@plyr-font-size-base: 16px;
|
||||
|
||||
// Captions
|
||||
@plyr-captions-bg: fade(#000, 70%);
|
||||
@plyr-captions-color: #fff;
|
||||
@plyr-captions-bg: fade(#000, 70%);
|
||||
@plyr-captions-color: #fff;
|
||||
@plyr-font-size-captions-base: @plyr-font-size-base;
|
||||
@plyr-font-size-captions-medium: ceil(@plyr-font-size-base * 1.5);
|
||||
@plyr-font-size-captions-large: (@plyr-font-size-base * 2);
|
||||
|
||||
// Controls
|
||||
@plyr-control-icon-size: 18px;
|
||||
@plyr-control-spacing: 10px;
|
||||
@plyr-control-padding: (@plyr-control-spacing * .7);
|
||||
@plyr-video-controls-bg: #000;
|
||||
@plyr-video-control-color: #fff;
|
||||
@plyr-video-control-color-hover: #fff;
|
||||
@plyr-video-control-bg-hover: @plyr-color-main;
|
||||
@plyr-audio-controls-bg: #fff;
|
||||
@plyr-audio-controls-border: 1px solid #dbe3e8;
|
||||
@plyr-audio-controls-box-shadow: 0 1px 1px fade(#000, 5%);
|
||||
@plyr-audio-control-color: #565D64;
|
||||
@plyr-audio-control-color-hover: #fff;
|
||||
@plyr-audio-control-bg-hover: @plyr-color-main;
|
||||
|
||||
// Tooltips
|
||||
@plyr-tooltip-bg: fade(#000, 70%);
|
||||
@plyr-tooltip-color: #fff;
|
||||
@plyr-tooltip-color: #fff;
|
||||
@plyr-tooltip-padding: (@plyr-control-spacing / 2);
|
||||
@plyr-tooltip-arrow-size: 4px;
|
||||
@plyr-tooltip-radius: 3px;
|
||||
@ -62,7 +64,7 @@
|
||||
@plyr-range-thumb-active-scale: 1.25;
|
||||
@plyr-video-range-track-bg: @plyr-video-progress-buffered-bg;
|
||||
@plyr-audio-range-track-bg: @plyr-audio-progress-buffered-bg;
|
||||
@plyr-range-selected-bg: @plyr-color-main;
|
||||
@plyr-range-selected-bg: @plyr-color-main;
|
||||
|
||||
// Breakpoints
|
||||
@plyr-bp-screen-sm: 480px;
|
||||
|
@ -19,7 +19,8 @@
|
||||
position: relative;
|
||||
max-width: 100%;
|
||||
min-width: 200px;
|
||||
font-family: Avenir, "Avenir Next", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
font-family: $plyr-font-family;
|
||||
direction: ltr;
|
||||
|
||||
@if $plyr-border-box == true {
|
||||
// border-box everything
|
||||
@ -39,6 +40,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Focus
|
||||
&:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
// Media elements
|
||||
video,
|
||||
audio {
|
||||
@ -224,6 +230,8 @@
|
||||
border-radius: 2px;
|
||||
padding: floor($plyr-control-spacing / 3) $plyr-control-spacing;
|
||||
background: $plyr-captions-bg;
|
||||
box-decoration-break: clone;
|
||||
line-height: 150%;
|
||||
}
|
||||
span:empty {
|
||||
display: none;
|
||||
@ -245,16 +253,18 @@
|
||||
|
||||
// Controls
|
||||
// --------------------------------------------------------------
|
||||
// Hide native controls
|
||||
.plyr ::-webkit-media-controls {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// Playback controls
|
||||
.plyr__controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
|
||||
transition: opacity .3s ease;
|
||||
|
||||
// Spacing
|
||||
> button,
|
||||
.plyr__progress,
|
||||
@ -288,8 +298,8 @@
|
||||
color: inherit;
|
||||
|
||||
svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
width: $plyr-control-icon-size;
|
||||
height: $plyr-control-icon-size;
|
||||
display: block;
|
||||
fill: currentColor;
|
||||
}
|
||||
@ -318,6 +328,7 @@
|
||||
// Hide controls
|
||||
.plyr--hide-controls .plyr__controls {
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
// Video controls
|
||||
@ -331,6 +342,7 @@
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
color: $plyr-video-control-color;
|
||||
transition: opacity .3s ease;
|
||||
|
||||
button {
|
||||
// Hover and tab focus
|
||||
@ -348,7 +360,6 @@
|
||||
border-radius: inherit;
|
||||
background: $plyr-audio-controls-bg;
|
||||
border: $plyr-audio-controls-border;
|
||||
box-shadow: $plyr-audio-controls-box-shadow;
|
||||
color: $plyr-audio-control-color;
|
||||
|
||||
button {
|
||||
@ -365,6 +376,7 @@
|
||||
.plyr__play-large {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
@ -372,9 +384,9 @@
|
||||
background: $plyr-video-control-bg-hover;
|
||||
border: 4px solid currentColor;
|
||||
border-radius: 100%;
|
||||
box-shadow: 0 1px 1px transparentize($plyr-video-controls-bg, .85);
|
||||
box-shadow: 0 1px 1px transparentize(#000, .85);
|
||||
color: $plyr-video-control-color;
|
||||
transition: opacity .3s ease, visibility .3s ease;
|
||||
transition: all .3s ease;
|
||||
|
||||
svg {
|
||||
position: relative;
|
||||
@ -479,6 +491,39 @@
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
// First tooltip
|
||||
.plyr__controls button:first-child .plyr__tooltip {
|
||||
left: 0;
|
||||
transform: translate(0, 10px) scale(.8);
|
||||
transform-origin: 0 100%;
|
||||
|
||||
&::before {
|
||||
left: ($plyr-control-icon-size / 2) + $plyr-control-padding;
|
||||
}
|
||||
}
|
||||
|
||||
// Last tooltip
|
||||
.plyr__controls button:last-child .plyr__tooltip {
|
||||
right: 0;
|
||||
transform: translate(0, 10px) scale(.8);
|
||||
transform-origin: 100% 100%;
|
||||
|
||||
&::before {
|
||||
left: auto;
|
||||
right: ($plyr-control-icon-size / 2) + $plyr-control-padding;
|
||||
transform: translateX(50%);
|
||||
}
|
||||
}
|
||||
|
||||
.plyr__controls button:first-child,
|
||||
.plyr__controls button:last-child {
|
||||
&:hover .plyr__tooltip,
|
||||
&.tab-focus:focus .plyr__tooltip,
|
||||
.plyr__tooltip--visible {
|
||||
transform: translate(0, 0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
// Playback progress
|
||||
// --------------------------------------------------------------
|
||||
// <progress> element
|
||||
@ -623,7 +668,6 @@
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: $plyr-font-size-small;
|
||||
line-height: .95;
|
||||
}
|
||||
// Media duration hidden on small screens
|
||||
.plyr__time + .plyr__time {
|
||||
@ -672,7 +716,6 @@
|
||||
|
||||
// Fullscreen
|
||||
// --------------------------------------------------------------
|
||||
.plyr--fullscreen,
|
||||
.plyr--fullscreen-active {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@ -683,7 +726,7 @@
|
||||
width: 100%;
|
||||
z-index: 10000000;
|
||||
background: #000;
|
||||
border-radius: 0;
|
||||
border-radius: 0 !important;
|
||||
|
||||
video {
|
||||
height: 100%;
|
||||
@ -698,4 +741,11 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
// Vimeo requires some different styling
|
||||
&.plyr--vimeo .plyr__video-wrapper {
|
||||
height: 0;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
@ -13,25 +13,27 @@ $plyr-sr-only-important: true !default;
|
||||
$plyr-color-main: #3498db !default;
|
||||
|
||||
// Font sizes
|
||||
$plyr-font-family: Avenir, 'Avenir Next', 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif !default;
|
||||
$plyr-font-size-small: 14px !default;
|
||||
$plyr-font-size-base: 16px !default;
|
||||
|
||||
// Captions
|
||||
$plyr-captions-bg: transparentize(#000, .3) !default;
|
||||
$plyr-captions-color: #fff !default;
|
||||
$plyr-captions-bg: transparentize(#000, .3) !default;
|
||||
$plyr-captions-color: #fff !default;
|
||||
$plyr-font-size-captions-base: $plyr-font-size-base !default;
|
||||
$plyr-font-size-captions-medium: ceil($plyr-font-size-base * 1.5) !default;
|
||||
$plyr-font-size-captions-large: ($plyr-font-size-base * 2) !default;
|
||||
|
||||
// Controls
|
||||
$plyr-control-icon-size: 18px !default;
|
||||
$plyr-control-spacing: 10px !default;
|
||||
$plyr-control-padding: ($plyr-control-spacing * .7) !default;
|
||||
$plyr-video-controls-bg: #000 !default;
|
||||
$plyr-video-control-color: #fff !default;
|
||||
$plyr-video-control-color-hover: #fff !default;
|
||||
$plyr-video-control-bg-hover: $plyr-color-main !default;
|
||||
$plyr-audio-controls-bg: #fff !default;
|
||||
$plyr-audio-controls-border: 1px solid #dbe3e8 !default;
|
||||
$plyr-audio-controls-box-shadow: 0 1px 1px transparentize(#000, .95) !default;
|
||||
$plyr-audio-control-color: #565D64 !default;
|
||||
$plyr-audio-control-color-hover: #fff !default;
|
||||
$plyr-audio-control-bg-hover: $plyr-color-main;
|
||||
@ -63,7 +65,7 @@ $plyr-range-thumb-active-bg: $plyr-video-control-bg-hover !default;
|
||||
$plyr-range-thumb-active-scale: 1.25 !default;
|
||||
$plyr-video-range-track-bg: $plyr-video-progress-buffered-bg !default;
|
||||
$plyr-audio-range-track-bg: $plyr-audio-progress-buffered-bg !default;
|
||||
$plyr-range-selected-bg: $plyr-color-main !default;
|
||||
$plyr-range-selected-bg: $plyr-color-main !default;
|
||||
|
||||
// Breakpoints
|
||||
$plyr-bp-screen-sm: 480px !default;
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 401 B |
Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 403 B |
Before Width: | Height: | Size: 325 B After Width: | Height: | Size: 325 B |
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
Before Width: | Height: | Size: 503 B After Width: | Height: | Size: 503 B |
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 570 B After Width: | Height: | Size: 570 B |
Before Width: | Height: | Size: 330 B After Width: | Height: | Size: 330 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |