SASS fixes, docs changes (fixes #180), 'ready' event
This commit is contained in:
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.5.18
|
||||||
|
- Added 'ready' event for initial setup complete or source change occurs
|
||||||
|
- Fixed SASS stylesheet references to transparentize
|
||||||
|
- Added default font stack to controls
|
||||||
|
- Docs fixes inc controls HTML (fixes #180)
|
||||||
|
|
||||||
## v1.5.17
|
## 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
|
- Auto set title based on YouTube getVideoData() title property
|
||||||
|
@ -81,11 +81,11 @@ var controls = ["<div class='plyr__controls'>",
|
|||||||
"</button>",
|
"</button>",
|
||||||
"<span class='plyr__time'>",
|
"<span class='plyr__time'>",
|
||||||
"<span class='plyr__sr-only'>Current time</span>",
|
"<span class='plyr__sr-only'>Current time</span>",
|
||||||
"<span class='plyr__current-time'>00:00</span>",
|
"<span class='plyr__time--curent'>00:00</span>",
|
||||||
"</span>",
|
"</span>",
|
||||||
"<span class='plyr__time'>",
|
"<span class='plyr__time'>",
|
||||||
"<span class='plyr__sr-only'>Duration</span>",
|
"<span class='plyr__sr-only'>Duration</span>",
|
||||||
"<span class='plyr__duration'>00:00</span>",
|
"<span class='plyr__time--duration'>00:00</span>",
|
||||||
"</span>",
|
"</span>",
|
||||||
"</span>",
|
"</span>",
|
||||||
"<span class='plyr__controls--right'>",
|
"<span class='plyr__controls--right'>",
|
||||||
|
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",
|
"name": "plyr",
|
||||||
"version": "1.5.17",
|
"version": "1.5.18",
|
||||||
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
"description": "A simple, accessible and customizable HTML5, YouTube and Vimeo media player",
|
||||||
"homepage": "http://plyr.io",
|
"homepage": "http://plyr.io",
|
||||||
"main": "src/js/plyr.js",
|
"main": "src/js/plyr.js",
|
||||||
|
19
readme.md
19
readme.md
@ -40,7 +40,7 @@ If you have any cool ideas or features, please let me know by [creating an issue
|
|||||||
|
|
||||||
Check `docs/index.html` and `docs/dist/docs.js` for an example setup.
|
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.17/plyr.js` to `https://cdn.plyr.io/1.5.17/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.18/plyr.js` to `https://cdn.plyr.io/1.5.18/plyr.js`
|
||||||
|
|
||||||
### Node Package Manager (NPM)
|
### Node Package Manager (NPM)
|
||||||
Using NPM, you can grab Plyr:
|
Using NPM, you can grab Plyr:
|
||||||
@ -69,11 +69,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:
|
If you want to use our CDN, you can use the following:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.5.17/plyr.css">
|
<link rel="stylesheet" href="https://cdn.plyr.io/1.5.18/plyr.css">
|
||||||
<script src="https://cdn.plyr.io/1.5.17/plyr.js"></script>
|
<script src="https://cdn.plyr.io/1.5.18/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.5.17/sprite.svg`.
|
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.5.18/sprite.svg`.
|
||||||
|
|
||||||
### CSS & Styling
|
### 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.
|
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.
|
||||||
@ -175,7 +175,7 @@ Be sure to [validate your caption files](https://quuz.org/webvtt/)
|
|||||||
Here's an example of a default setup:
|
Here's an example of a default setup:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/1.5.17/plyr.js"></script>
|
<script src="https://cdn.plyr.io/1.5.18/plyr.js"></script>
|
||||||
<script>plyr.setup();</script>
|
<script>plyr.setup();</script>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ You can listen for events on the element you setup Plyr on. Some events only app
|
|||||||
<td>Sent when an error occurs. The element's <code>error</code> attribute contains more information.</td>
|
<td>Sent when an error occurs. The element's <code>error</code> attribute contains more information.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><code>loadeddata/code></td>
|
<td><code>loadeddata</code></td>
|
||||||
<td>✔</td>
|
<td>✔</td>
|
||||||
<td>The first frame of the media has finished loading.</td>
|
<td>The first frame of the media has finished loading.</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -759,6 +759,11 @@ You can listen for events on the element you setup Plyr on. Some events only app
|
|||||||
<td></td>
|
<td></td>
|
||||||
<td>Captions toggled off</td>
|
<td>Captions toggled off</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><code>ready</code></td>
|
||||||
|
<td></td>
|
||||||
|
<td>Triggered when initial setup is done or a source change has occurred.</td>
|
||||||
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -767,7 +772,7 @@ Details borrowed from: [https://developer.mozilla.org/en-US/docs/Web/Guide/Event
|
|||||||
Here's an example of binding an event listener:
|
Here's an example of binding an event listener:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
document.querySelector(".js-plyr").addEventListener("playing", function() {
|
document.querySelector(".js-plyr").addEventListener("ready", function() {
|
||||||
/* Magic happens */
|
/* Magic happens */
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr
|
// Plyr
|
||||||
// plyr.js v1.5.17
|
// plyr.js v1.5.18
|
||||||
// https://github.com/selz/plyr
|
// https://github.com/selz/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
@ -1242,7 +1242,7 @@
|
|||||||
|
|
||||||
// Toggle style hook
|
// Toggle style hook
|
||||||
function _toggleStyleHook() {
|
function _toggleStyleHook() {
|
||||||
_toggleClass(plyr.container, defaults.selectors.container.replace('.', ''), plyr.supported.full);
|
_toggleClass(plyr.container, config.selectors.container.replace('.', ''), plyr.supported.full);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Toggle native controls
|
// Toggle native controls
|
||||||
@ -2730,6 +2730,9 @@
|
|||||||
|
|
||||||
// Display duration
|
// Display duration
|
||||||
_displayDuration();
|
_displayDuration();
|
||||||
|
|
||||||
|
// Ready event
|
||||||
|
_triggerEvent(plyr.container, 'ready');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize instance
|
// Initialize instance
|
||||||
|
Reference in New Issue
Block a user