Compare commits
25 Commits
Author | SHA1 | Date | |
---|---|---|---|
66969f1a65 | |||
e964c1a298 | |||
6543fc1e5b | |||
9133247cdf | |||
bf7f6f40bd | |||
43a904917f | |||
9fe6e5ffcb | |||
a46e421bf6 | |||
20090aee03 | |||
c4ca7fe0d2 | |||
6b41752415 | |||
2bc53d12ea | |||
2f6dc5279b | |||
c8b2867b1f | |||
e56132ae3b | |||
45d4091c20 | |||
60c53a5894 | |||
032c823d3a | |||
66f724a3be | |||
bf0c81b484 | |||
aa72a17f44 | |||
8825e82634 | |||
f700d50dc8 | |||
a585270d21 | |||
7a23dda294 |
12
changelog.md
12
changelog.md
@ -1,5 +1,17 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# v1.3.5
|
||||||
|
- Fixed bug with API use on basic supported browsers
|
||||||
|
|
||||||
|
# v1.3.4
|
||||||
|
- Code cleanup by @calvintam236
|
||||||
|
|
||||||
|
# v1.3.3
|
||||||
|
- Removed captions being read by screen readers
|
||||||
|
|
||||||
|
# v1.3.2
|
||||||
|
- Voiceover fix for captions
|
||||||
|
|
||||||
# v1.3.1
|
# v1.3.1
|
||||||
- ARIA improvements for captions being read
|
- ARIA improvements for captions being read
|
||||||
|
|
||||||
|
@ -88,14 +88,14 @@ This is an example `html` option with all controls.
|
|||||||
"</span>",
|
"</span>",
|
||||||
"</span>",
|
"</span>",
|
||||||
"<span class='player-controls-right'>",
|
"<span class='player-controls-right'>",
|
||||||
"<button type="button" data-player="mute">",
|
"<button type='button' data-player='mute'>",
|
||||||
"<svg class='icon-muted'><use xlink:href='#icon-muted'></use></svg>",
|
"<svg class='icon-muted'><use xlink:href='#icon-muted'></use></svg>",
|
||||||
"<svg><use xlink:href='#icon-volume'></use></svg>",
|
"<svg><use xlink:href='#icon-volume'></use></svg>",
|
||||||
"<span class='sr-only'>Toggle Mute</span>",
|
"<span class='sr-only'>Toggle Mute</span>",
|
||||||
"</button>",
|
"</button>",
|
||||||
"<label for='volume{id}' class='sr-only'>Volume</label>",
|
"<label for='volume{id}' class='sr-only'>Volume</label>",
|
||||||
"<input id='volume{id}' class='player-volume' type='range' min='0' max='10' value='5' data-player='volume'>",
|
"<input id='volume{id}' class='player-volume' type='range' min='0' max='10' value='5' data-player='volume'>",
|
||||||
"<button type="button" data-player="captions">",
|
"<button type='button' data-player='captions'>",
|
||||||
"<svg class='icon-captions-on'><use xlink:href='#icon-captions-on'></use></svg>",
|
"<svg class='icon-captions-on'><use xlink:href='#icon-captions-on'></use></svg>",
|
||||||
"<svg><use xlink:href='#icon-captions-off'></use></svg>",
|
"<svg><use xlink:href='#icon-captions-off'></use></svg>",
|
||||||
"<span class='sr-only'>Toggle Captions</span>",
|
"<span class='sr-only'>Toggle Captions</span>",
|
||||||
|
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.3.1/docs.css">
|
<link rel="stylesheet" href="//cdn.plyr.io/1.3.6/docs.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
|
@ -8,15 +8,15 @@
|
|||||||
<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="https://cdn.plyr.io/1.3.1/plyr.css?3">
|
<link rel="stylesheet" href="https://cdn.plyr.io/1.3.6/plyr.css">
|
||||||
|
|
||||||
<!-- Docs styles -->
|
<!-- Docs styles -->
|
||||||
<link rel="stylesheet" href="https://cdn.plyr.io/1.3.1/docs.css?1">
|
<link rel="stylesheet" href="https://cdn.plyr.io/1.3.6/docs.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<h1>Plyr</h1>
|
<h1>Plyr</h1>
|
||||||
<p>A simple HTML5 media player with custom controls and WebVTT captions by <a href="https://twitter.com/sam_potts" target="_blank">@sam_potts</a></p>
|
<p>A simple HTML5 media player with custom controls and WebVTT captions by <a href="https://twitter.com/sam_potts" target="_blank">@sam_potts</a> from <a href="https://twitter.com/selz" target="_blank">@selz</a></p>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<span class="btn-count js-stargazers-count">…</span>
|
<span class="btn-count js-stargazers-count">…</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=http%3A%2F%2Fplyr.io&via=Sam_Potts" target="_blank" class="btn js-popup" data-window-height="250" data-window-width="500">Tweet</a>
|
<a href="https://twitter.com/intent/tweet?text=A+simple+HTML5+media+player+with+custom+controls+and+WebVTT+captions.&url=https%3A%2F%2Fplyr.io&via=Sam_Potts" target="_blank" class="btn js-popup" data-window-height="250" data-window-width="500">Tweet</a>
|
||||||
<span class="btn-count js-tweet-count">…</span>
|
<span class="btn-count js-tweet-count">…</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -42,13 +42,13 @@
|
|||||||
<div class="panels">
|
<div class="panels">
|
||||||
<section class="panel example-video active" id="video">
|
<section class="panel example-video active" id="video">
|
||||||
<div class="player">
|
<div class="player">
|
||||||
<video poster="https://cdn.plyr.io/static/poster.jpg" controls crossorigin>
|
<video poster="poster.jpg" controls crossorigin>
|
||||||
<!-- Video files -->
|
<!-- Video files -->
|
||||||
<source src="https://cdn.selz.com/plyr/1.0/movie.mp4" type="video/mp4">
|
<source src="https://cdn.selz.com/plyr/1.0/movie.mp4" type="video/mp4">
|
||||||
<source src="https://cdn.selz.com/plyr/1.0/movie.webm" type="video/webm">
|
<source src="https://cdn.selz.com/plyr/1.0/movie.webm" type="video/webm">
|
||||||
|
|
||||||
<!-- Text track file -->
|
<!-- Text track file -->
|
||||||
<track kind="captions" label="English" srclang="en" src="https://cdn.selz.com/plyr/1.0/en.vtt" default>
|
<track kind="captions" label="English" srclang="en" src="https://cdn.selz.com/plyr/1.0/example_captions_en.vtt" default>
|
||||||
|
|
||||||
<!-- Fallback for browsers that don't support the <video> element -->
|
<!-- Fallback for browsers that don't support the <video> element -->
|
||||||
<a href="https://cdn.selz.com/plyr/1.0/movie.mp4">Download</a>
|
<a href="https://cdn.selz.com/plyr/1.0/movie.mp4">Download</a>
|
||||||
@ -97,13 +97,13 @@
|
|||||||
b.insertBefore(c, b.childNodes[0]);
|
b.insertBefore(c, b.childNodes[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})(document, "https://cdn.plyr.io/1.3.1/sprite.svg");
|
})(document, "https://cdn.plyr.io/1.3.6/sprite.svg");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Plyr core script -->
|
<!-- Plyr core script -->
|
||||||
<script src="https://cdn.plyr.io/1.3.1/plyr.js?1"></script>
|
<script src="https://cdn.plyr.io/1.3.6/plyr.js"></script>
|
||||||
|
|
||||||
<!-- Docs script -->
|
<!-- Docs script -->
|
||||||
<script src="https://cdn.plyr.io/1.3.1/docs.js?1"></script>
|
<script src="https://cdn.plyr.io/1.3.6/docs.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
BIN
docs/poster.jpg
Normal file
BIN
docs/poster.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 171 KiB |
15
gulpfile.js
15
gulpfile.js
@ -66,7 +66,12 @@ package = loadJSON(path.join(root, "package.json"));
|
|||||||
|
|
||||||
// Load json
|
// Load json
|
||||||
function loadJSON(path) {
|
function loadJSON(path) {
|
||||||
return JSON.parse(fs.readFileSync(path));
|
try {
|
||||||
|
return JSON.parse(fs.readFileSync(path));
|
||||||
|
}
|
||||||
|
catch(err) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var build = {
|
var build = {
|
||||||
@ -215,8 +220,12 @@ options = {
|
|||||||
},
|
},
|
||||||
gzippedOnly: true
|
gzippedOnly: true
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
cdnpath = new RegExp(aws.cdn.bucket + "\/(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)","gi");
|
|
||||||
|
// If aws is setup
|
||||||
|
if("cdn" in aws) {
|
||||||
|
var cdnpath = new RegExp(aws.cdn.bucket + "\/(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)","gi");
|
||||||
|
}
|
||||||
|
|
||||||
// Publish version to CDN bucket
|
// Publish version to CDN bucket
|
||||||
gulp.task("cdn", function () {
|
gulp.task("cdn", function () {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "1.3.1",
|
"version": "1.3.6",
|
||||||
"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",
|
||||||
|
12
readme.md
12
readme.md
@ -27,9 +27,9 @@ Oh and yes, it works with Bootstrap.
|
|||||||
Check out [the changelog](changelog.md)
|
Check out [the changelog](changelog.md)
|
||||||
|
|
||||||
## Planned development
|
## Planned development
|
||||||
- Playlists
|
- Vimeo support
|
||||||
- ~~YouTube~~ and Vimeo support
|
|
||||||
- Playback speed
|
- Playback speed
|
||||||
|
- Playlists
|
||||||
- Multiple language captions (with selection)
|
- Multiple language captions (with selection)
|
||||||
- Audio captions
|
- Audio captions
|
||||||
... and whatever else has been raised in [issues](https://github.com/Selz/plyr/issues)
|
... and whatever else has been raised in [issues](https://github.com/Selz/plyr/issues)
|
||||||
@ -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.3.1/plyr.js` to `https://cdn.plyr.io/1.3.1/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.3.6/plyr.js` to `https://cdn.plyr.io/1.3.6/plyr.js`
|
||||||
|
|
||||||
### Bower
|
### Bower
|
||||||
If bower is your thang, you can grab Plyr using:
|
If bower is your thang, you can grab Plyr using:
|
||||||
@ -60,11 +60,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.3.1/plyr.css">
|
<link rel="stylesheet" href="https://cdn.plyr.io/1.3.6/plyr.css">
|
||||||
<script src="https://cdn.plyr.io/1.3.1/plyr.js"></script>
|
<script src="https://cdn.plyr.io/1.3.6/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.3.1/sprite.svg`.
|
You can also access the `sprite.svg` file at `https://cdn.plyr.io/1.3.6/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.
|
||||||
|
967
src/js/plyr.js
967
src/js/plyr.js
File diff suppressed because it is too large
Load Diff
@ -19,9 +19,9 @@ $font-size-small: 14px !default;
|
|||||||
$font-size-base: 16px !default;
|
$font-size-base: 16px !default;
|
||||||
|
|
||||||
// Captions
|
// Captions
|
||||||
$font-size-captions-base: ceil(@font-size-base * 1.25) !default;
|
$font-size-captions-base: ceil($font-size-base * 1.25) !default;
|
||||||
$font-size-captions-medium: ceil(@font-size-base * 1.5) !default;
|
$font-size-captions-medium: ceil($font-size-base * 1.5) !default;
|
||||||
$font-size-captions-large: (@font-size-base * 2) !default;
|
$font-size-captions-large: ($font-size-base * 2) !default;
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
$control-spacing: 10px !default;
|
$control-spacing: 10px !default;
|
||||||
@ -211,7 +211,7 @@ $bp-captions-large: 768px !default; // When captions jump to the larger
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: @bp-captions-large) {
|
@media (min-width: $bp-captions-large) {
|
||||||
font-size: $font-size-captions-medium;
|
font-size: $font-size-captions-medium;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user