Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
5bb4d70cf7 | |||
67b2f2510b | |||
ba9434b6f2 | |||
26469452e1 | |||
6ae2655923 | |||
815100cff8 |
@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## v1.5.21
|
||||
- Bug fix for embeds: `play` not being defined (fixes #185 and #186)
|
||||
|
||||
## v1.5.20
|
||||
- Bug fix for autoplay option
|
||||
|
||||
## v1.5.19
|
||||
- Fix for accessing `embed` property after `ready` event fired
|
||||
|
||||
## v1.5.18
|
||||
- Added 'ready' event for initial setup complete or source change occurs
|
||||
- Fixed SASS stylesheet references to transparentize
|
||||
|
@ -81,7 +81,7 @@ var controls = ["<div class='plyr__controls'>",
|
||||
"</button>",
|
||||
"<span class='plyr__time'>",
|
||||
"<span class='plyr__sr-only'>Current time</span>",
|
||||
"<span class='plyr__time--curent'>00:00</span>",
|
||||
"<span class='plyr__time--current'>00:00</span>",
|
||||
"</span>",
|
||||
"<span class='plyr__time'>",
|
||||
"<span class='plyr__sr-only'>Duration</span>",
|
||||
|
2
dist/plyr.css
vendored
2
dist/plyr.css
vendored
File diff suppressed because one or more lines are too long
4
dist/plyr.js
vendored
4
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "plyr",
|
||||
"version": "1.5.19",
|
||||
"version": "1.5.21",
|
||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||
"homepage": "http://plyr.io",
|
||||
"main": "src/js/plyr.js",
|
||||
|
10
readme.md
10
readme.md
@ -40,7 +40,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
|
||||
## Implementation
|
||||
Check `docs/index.html` and `docs/dist/docs.js` for an example setup.
|
||||
|
||||
**Heads up:** the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.5.19/plyr.js` to `https://cdn.plyr.io/1.5.19/plyr.js`
|
||||
**Heads up:** the example `index.html` file needs to be served from a webserver (such as Apache, Nginx, IIS or similar) unless you change the file sources to include http or https. e.g. change `//cdn.plyr.io/1.5.21/plyr.js` to `https://cdn.plyr.io/1.5.21/plyr.js`
|
||||
|
||||
### Node Package Manager (NPM)
|
||||
[](https://badge.fury.io/js/plyr)
|
||||
@ -73,11 +73,11 @@ More info is on [npm](https://www.npmjs.com/package/ember-cli-plyr) and [GitHub]
|
||||
If you want to use our CDN, you can use the following:
|
||||
|
||||
```html
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.5.19/plyr.css">
|
||||
<script src="https://cdn.plyr.io/1.5.19/plyr.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.5.21/plyr.css">
|
||||
<script src="https://cdn.plyr.io/1.5.21/plyr.js"></script>
|
||||
```
|
||||
|
||||
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.5.19/sprite.svg`.
|
||||
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.5.21/sprite.svg`.
|
||||
|
||||
### CSS & Styling
|
||||
If you want to use the default css, add the `plyr.css` file from `/dist` into your head, or even better use `plyr.less` or `plyr.sass` file included in `/src` in your build to save a request.
|
||||
@ -179,7 +179,7 @@ Be sure to [validate your caption files](https://quuz.org/webvtt/)
|
||||
Here's an example of a default setup:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.plyr.io/1.5.19/plyr.js"></script>
|
||||
<script src="https://cdn.plyr.io/1.5.21/plyr.js"></script>
|
||||
<script>plyr.setup();</script>
|
||||
```
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
// ==========================================================================
|
||||
// Plyr
|
||||
// plyr.js v1.5.19
|
||||
// plyr.js v1.5.21
|
||||
// https://github.com/selz/plyr
|
||||
// License: The MIT License (MIT)
|
||||
// ==========================================================================
|
||||
// Credits: http://paypal.github.io/accessible-html5-video-player/
|
||||
// ==========================================================================
|
||||
|
||||
(function(root, factory) {
|
||||
;(function(root, factory) {
|
||||
'use strict';
|
||||
/*global define,module*/
|
||||
|
||||
@ -1319,12 +1319,6 @@
|
||||
// Clean up
|
||||
plyr.embedId = null;
|
||||
}
|
||||
else {
|
||||
// Autoplay
|
||||
if (config.autoplay) {
|
||||
_play();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Setup YouTube/Vimeo
|
||||
@ -1415,14 +1409,14 @@
|
||||
|
||||
// When embeds are ready
|
||||
function _embedReady() {
|
||||
// Set title
|
||||
_setTitle(_getElement('iframe'));
|
||||
|
||||
// Store reference to API
|
||||
plyr.container.plyr.embed = plyr.embed;
|
||||
|
||||
// Setup the UI
|
||||
_setupInterface();
|
||||
|
||||
// Set title
|
||||
_setTitle(_getElement('iframe'));
|
||||
}
|
||||
|
||||
// Handle YouTube API ready
|
||||
@ -1438,7 +1432,7 @@
|
||||
plyr.embed = new YT.Player(container.id, {
|
||||
videoId: videoId,
|
||||
playerVars: {
|
||||
autoplay: plyr.autoplay ? 1 : 0,
|
||||
autoplay: (config.autoplay ? 1 : 0),
|
||||
controls: (plyr.supported.full ? 0 : 1),
|
||||
rel: 0,
|
||||
showinfo: 0,
|
||||
@ -1626,12 +1620,12 @@
|
||||
});
|
||||
|
||||
// Always seek to 0
|
||||
//plyr.embed.api('seekTo', 0);
|
||||
// plyr.embed.api('seekTo', 0);
|
||||
|
||||
// Prevent autoplay if needed (seek will play)
|
||||
//if (!config.autoplay) {
|
||||
// plyr.embed.api('pause');
|
||||
//}
|
||||
// Autoplay
|
||||
if (config.autoplay) {
|
||||
plyr.embed.api('play');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -2277,6 +2271,11 @@
|
||||
// Inject the new element
|
||||
_prependChild(plyr.container, plyr.media);
|
||||
|
||||
// Autoplay the new source?
|
||||
if (typeof source.autoplay !== 'undefined') {
|
||||
config.autoplay = source.autoplay;
|
||||
}
|
||||
|
||||
// Set attributes for audio video
|
||||
if (_inArray(config.types.html5, plyr.type)) {
|
||||
if (config.crossorigin) {
|
||||
@ -2301,9 +2300,6 @@
|
||||
_toggleClass(plyr.container, config.classes.captions.active, plyr.captionsEnabled);
|
||||
_toggleStyleHook();
|
||||
|
||||
// Autoplay the new source?
|
||||
config.autoplay = (source.autoplay || config.autoplay);
|
||||
|
||||
// Set new sources for html5
|
||||
if (_inArray(config.types.html5, plyr.type)) {
|
||||
_insertChildElements('source', source.sources);
|
||||
@ -2329,11 +2325,6 @@
|
||||
_displayDuration();
|
||||
}
|
||||
|
||||
// Play if autoplay attribute is present
|
||||
if (config.autoplay) {
|
||||
_play();
|
||||
}
|
||||
|
||||
// Set aria title and iframe title
|
||||
config.title = source.title;
|
||||
_setTitle();
|
||||
@ -2668,6 +2659,11 @@
|
||||
|
||||
// Set title on button and frame
|
||||
_setTitle();
|
||||
|
||||
// Autoplay
|
||||
if (config.autoplay) {
|
||||
_play();
|
||||
}
|
||||
}
|
||||
|
||||
// Successful setup
|
||||
@ -2834,7 +2830,7 @@
|
||||
}
|
||||
|
||||
// Create a player instance for each element
|
||||
for (var i = elements.length - 1; i >= 0; i--) {
|
||||
for (var i = 0; i < elements.length; i++) {
|
||||
// Get the current element
|
||||
var element = elements[i];
|
||||
|
||||
|
@ -343,6 +343,7 @@
|
||||
bottom: 100%;
|
||||
margin-bottom: @plyr-tooltip-padding;
|
||||
padding: @plyr-tooltip-padding (@plyr-tooltip-padding * 1.5);
|
||||
pointer-events: none;
|
||||
|
||||
opacity: 0;
|
||||
background: @plyr-tooltip-bg;
|
||||
|
@ -343,6 +343,7 @@ $plyr-bp-captions-large: 768px !default; // When captions jump to th
|
||||
bottom: 100%;
|
||||
margin-bottom: $plyr-tooltip-padding;
|
||||
padding: $plyr-tooltip-padding ($plyr-tooltip-padding * 1.5);
|
||||
pointer-events: none;
|
||||
|
||||
opacity: 0;
|
||||
background: $plyr-tooltip-bg;
|
||||
|
Reference in New Issue
Block a user