Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
aa1fed0b16 | |||
22331ae9f1 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ node_modules
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
aws.json
|
aws.json
|
||||||
docs/index.dev.html
|
docs/index.dev.html
|
||||||
|
*.mp4
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## v1.0.30
|
||||||
|
- Fixed bug with media longer than 60 minutes (Fixes #69)
|
||||||
|
|
||||||
## v1.0.29
|
## 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
|
- Fixed a bug with caption toggle in 1.0.28
|
||||||
|
2
dist/plyr.js
vendored
2
dist/plyr.js
vendored
File diff suppressed because one or more lines are too long
@ -6,7 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<!-- Docs styles -->
|
<!-- Docs styles -->
|
||||||
<link rel="stylesheet" href="//cdn.plyr.io/1.0.29/docs.css">
|
<link rel="stylesheet" href="//cdn.plyr.io/1.0.30/docs.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link rel="stylesheet" href="//cdn.plyr.io/1.0.29/plyr.css">
|
<link rel="stylesheet" href="//cdn.plyr.io/1.0.30/plyr.css">
|
||||||
|
|
||||||
<!-- Docs styles -->
|
<!-- Docs styles -->
|
||||||
<link rel="stylesheet" href="//cdn.plyr.io/1.0.29/docs.css">
|
<link rel="stylesheet" href="//cdn.plyr.io/1.0.30/docs.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
@ -83,13 +83,13 @@
|
|||||||
b.insertBefore(c, b.childNodes[0]);
|
b.insertBefore(c, b.childNodes[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})(document, "https://cdn.plyr.io/1.0.29/sprite.svg");
|
})(document, "https://cdn.plyr.io/1.0.30/sprite.svg");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Plyr core script -->
|
<!-- Plyr core script -->
|
||||||
<script src="//cdn.plyr.io/1.0.29/plyr.js"></script>
|
<script src="//cdn.plyr.io/1.0.30/plyr.js"></script>
|
||||||
|
|
||||||
<!-- Docs script -->
|
<!-- Docs script -->
|
||||||
<script src="//cdn.plyr.io/1.0.29/docs.js"></script>
|
<script src="//cdn.plyr.io/1.0.30/docs.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "1.0.29",
|
"version": "1.0.30",
|
||||||
"description": "A simple HTML5 media player using custom controls",
|
"description": "A simple HTML5 media player using custom controls",
|
||||||
"homepage": "http://plyr.io",
|
"homepage": "http://plyr.io",
|
||||||
"main": "gulpfile.js",
|
"main": "gulpfile.js",
|
||||||
|
10
readme.md
10
readme.md
@ -38,7 +38,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.0.29/plyr.js` to `https://cdn.plyr.io/1.0.29/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.0.30/plyr.js` to `https://cdn.plyr.io/1.0.30/plyr.js`
|
||||||
|
|
||||||
### Bower
|
### Bower
|
||||||
If bower is your thang, you can grab Plyr using:
|
If bower is your thang, you can grab Plyr using:
|
||||||
@ -51,11 +51,11 @@ More info on setting up dependencies can be found in the [Bower Docs](http://bow
|
|||||||
If you want to use our CDN, you can use the following. HTTPS (SSL) is supported.
|
If you want to use our CDN, you can use the following. HTTPS (SSL) is supported.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="//cdn.plyr.io/1.0.29/plyr.css">
|
<link rel="stylesheet" href="//cdn.plyr.io/1.0.30/plyr.css">
|
||||||
<script src="//cdn.plyr.io/1.0.29/plyr.js"></script>
|
<script src="//cdn.plyr.io/1.0.30/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also access the `sprite.svg` file at `//cdn.plyr.io/1.0.29/sprite.svg`.
|
You can also access the `sprite.svg` file at `//cdn.plyr.io/1.0.30/sprite.svg`.
|
||||||
|
|
||||||
### CSS
|
### CSS
|
||||||
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.
|
||||||
@ -389,10 +389,12 @@ Plyr is developed by Sam Potts ([@sam_potts](https://twitter.com/sam_potts)) ([s
|
|||||||
## Mentions
|
## Mentions
|
||||||
- [The Changelog](http://thechangelog.com/plyr-simple-html5-media-player-custom-controls-webvtt-captions/)
|
- [The Changelog](http://thechangelog.com/plyr-simple-html5-media-player-custom-controls-webvtt-captions/)
|
||||||
- [HTML5 Weekly #177](http://html5weekly.com/issues/177)
|
- [HTML5 Weekly #177](http://html5weekly.com/issues/177)
|
||||||
|
- [Responsive Design #149](http://us4.campaign-archive2.com/?u=559bc631fe5294fc66f5f7f89&id=451a61490f)
|
||||||
- [Web Design Weekly #174](https://web-design-weekly.com/2015/02/24/web-design-weekly-174/)
|
- [Web Design Weekly #174](https://web-design-weekly.com/2015/02/24/web-design-weekly-174/)
|
||||||
- [Hacker News](https://news.ycombinator.com/item?id=9136774)
|
- [Hacker News](https://news.ycombinator.com/item?id=9136774)
|
||||||
- [Web Platform Daily](http://webplatformdaily.org/releases/2015-03-04)
|
- [Web Platform Daily](http://webplatformdaily.org/releases/2015-03-04)
|
||||||
- [LayerVault Designer News](https://news.layervault.com/stories/45394-plyr--a-simple-html5-media-player)
|
- [LayerVault Designer News](https://news.layervault.com/stories/45394-plyr--a-simple-html5-media-player)
|
||||||
|
- [The Treehouse Show #131](https://teamtreehouse.com/library/episode-131-origami-react-responsive-hero-images)
|
||||||
|
|
||||||
## Used by
|
## Used by
|
||||||
- [Selz.com](https://selz.com)
|
- [Selz.com](https://selz.com)
|
||||||
|
@ -1153,13 +1153,14 @@
|
|||||||
function _updateTimeDisplay() {
|
function _updateTimeDisplay() {
|
||||||
player.secs = parseInt(player.media.currentTime % 60);
|
player.secs = parseInt(player.media.currentTime % 60);
|
||||||
player.mins = parseInt((player.media.currentTime / 60) % 60);
|
player.mins = parseInt((player.media.currentTime / 60) % 60);
|
||||||
|
player.hours = parseInt(((player.media.currentTime / 60) / 60) % 60);
|
||||||
|
|
||||||
// Ensure it"s two digits. For example, 03 rather than 3.
|
// Ensure it"s two digits. For example, 03 rather than 3.
|
||||||
player.secs = ("0" + player.secs).slice(-2);
|
player.secs = ("0" + player.secs).slice(-2);
|
||||||
player.mins = ("0" + player.mins).slice(-2);
|
player.mins = ("0" + player.mins).slice(-2);
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
player.duration.innerHTML = player.mins + ":" + player.secs;
|
player.duration.innerHTML = (player.hours > 0 ? player.hours + ":" : "") + player.mins + ":" + player.secs;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle time change event
|
// Handle time change event
|
||||||
@ -1303,7 +1304,6 @@
|
|||||||
|
|
||||||
// Captions
|
// Captions
|
||||||
_on(player.buttons.captions, "change", function() {
|
_on(player.buttons.captions, "change", function() {
|
||||||
console.log(this.checked);
|
|
||||||
_toggleCaptions(this.checked);
|
_toggleCaptions(this.checked);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user