Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2fb922d73 | |||
| a6cc85c437 | |||
| d061be5d2b | |||
| dc2feedd79 | |||
| f8e4ba36e5 | |||
| f3d5389587 | |||
| d9ffb10b93 | |||
| 1186377b25 | |||
| 8616895e57 | |||
| 2cf5a22c85 | |||
| 763eb2df80 | |||
| 8bbf66a0fb | |||
| 676b46e4a7 | |||
| 82a119c67f | |||
| 6fd4389887 | |||
| 1e1a548459 | |||
| 8db9b53a8f | |||
| ba33fd8277 | |||
| 8071feda18 | |||
| a49b73cd01 | |||
| 8226493a9e | |||
| 38a8a0e8a1 | |||
| 6eeca8b5d1 | |||
| bf51ce4414 | |||
| 5ad614e251 | |||
| 93c890603d | |||
| 29fb4dfc2b |
@@ -10,6 +10,7 @@
|
|||||||
"jQuery": false
|
"jQuery": false
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"import/no-cycle": 1,
|
||||||
"no-const-assign": 1,
|
"no-const-assign": 1,
|
||||||
"no-shadow": 0,
|
"no-shadow": 0,
|
||||||
"no-this-before-super": 1,
|
"no-this-before-super": 1,
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
<!---
|
*Please _use this issue template_ as it makes replicating and fixing the issue easier for us. If you decide not to use it or you are vague your issue may be close instantly.*
|
||||||
Please use this issue template as it makes replicating and fixing the issue easier!
|
|
||||||
--->
|
|
||||||
|
|
||||||
### Expected behaviour
|
### Expected behaviour
|
||||||
|
|
||||||
|
|||||||
@@ -4,5 +4,5 @@
|
|||||||
|
|
||||||
### Checklist
|
### Checklist
|
||||||
- [ ] Use `develop` as the base branch
|
- [ ] Use `develop` as the base branch
|
||||||
- [ ] Exclude the gulp build from the PR
|
- [ ] Exclude the gulp build (`/dist` changes) from the PR
|
||||||
- [ ] Test on [supported browsers](https://github.com/sampotts/plyr#browser-support)
|
- [ ] Test on [supported browsers](https://github.com/sampotts/plyr#browser-support)
|
||||||
|
|||||||
+2
-1
@@ -5,6 +5,7 @@ aws.json
|
|||||||
!dist/blank.mp4
|
!dist/blank.mp4
|
||||||
index-*.html
|
index-*.html
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
*.webm
|
yarn-error.log
|
||||||
package-lock.json
|
package-lock.json
|
||||||
|
*.webm
|
||||||
.idea/
|
.idea/
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
linters:
|
||||||
|
eslint:
|
||||||
|
files:
|
||||||
|
ignore:
|
||||||
|
- 'node_modules/*'
|
||||||
+5
-4
@@ -1,7 +1,8 @@
|
|||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js: lts/*
|
||||||
- 'lts/*'
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- npm run lint
|
- bash .travis/prevent-base-master.sh
|
||||||
- npm run build
|
- bash .travis/omit-dist.sh
|
||||||
|
- npm run lint
|
||||||
|
- npm run build
|
||||||
|
|||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ $TRAVIS_BRANCH == "develop" ] && $(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE "^(demo/)?dist/"); then
|
||||||
|
echo 'Build output ("dist" and "demo/dist") not permitted in develop' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Executable
+5
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ $TRAVIS_BRANCH == "master" ] && $(git diff --name-only $TRAVIS_COMMIT_RANGE | grep -q "^src/"); then
|
||||||
|
echo 'The base branch for pull requests must be "develop"' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
# v3.3.22
|
||||||
|
|
||||||
|
- Travis & CI improvements (thanks @friday)
|
||||||
|
- Add navigator.languages fallback for iOS 9 (thanks @friday)
|
||||||
|
|
||||||
# v3.3.21
|
# v3.3.21
|
||||||
|
|
||||||
|
|||||||
Vendored
+9
-2
@@ -1874,7 +1874,7 @@ typeof navigator === "object" && (function () {
|
|||||||
// webpack (using a build step causes webpack #1617). Grunt verifies that
|
// webpack (using a build step causes webpack #1617). Grunt verifies that
|
||||||
// this value matches package.json during build.
|
// this value matches package.json during build.
|
||||||
// See: https://github.com/getsentry/raven-js/issues/465
|
// See: https://github.com/getsentry/raven-js/issues/465
|
||||||
VERSION: '3.26.2',
|
VERSION: '3.26.3',
|
||||||
|
|
||||||
debug: false,
|
debug: false,
|
||||||
|
|
||||||
@@ -2351,7 +2351,9 @@ typeof navigator === "object" && (function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._globalOptions.stacktrace || (options && options.stacktrace)) {
|
// Always attempt to get stacktrace if message is empty.
|
||||||
|
// It's the only way to provide any helpful information to the user.
|
||||||
|
if (this._globalOptions.stacktrace || options.stacktrace || data.message === '') {
|
||||||
// fingerprint on msg, not stack trace (legacy behavior, could be revisited)
|
// fingerprint on msg, not stack trace (legacy behavior, could be revisited)
|
||||||
data.fingerprint = data.fingerprint == null ? msg : data.fingerprint;
|
data.fingerprint = data.fingerprint == null ? msg : data.fingerprint;
|
||||||
|
|
||||||
@@ -3508,6 +3510,11 @@ typeof navigator === "object" && (function () {
|
|||||||
options
|
options
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var ex = data.exception.values[0];
|
||||||
|
if (ex.type == null && ex.value === '') {
|
||||||
|
ex.value = 'Unrecoverable error caught';
|
||||||
|
}
|
||||||
|
|
||||||
// Move mechanism from options to exception interface
|
// Move mechanism from options to exception interface
|
||||||
// We do this, as requiring user to pass `{exception:{mechanism:{ ... }}}` would be
|
// We do this, as requiring user to pass `{exception:{mechanism:{ ... }}}` would be
|
||||||
// too much
|
// too much
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -2891,7 +2891,7 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
// * active: The state preferred by user settings or config
|
// * active: The state preferred by user settings or config
|
||||||
// * toggled: The real captions state
|
// * toggled: The real captions state
|
||||||
|
|
||||||
var languages = dedupe(Array.from(navigator.languages || navigator.userLanguage).map(function (language) {
|
var languages = dedupe(Array.from(navigator.languages || navigator.language || navigator.userLanguage).map(function (language) {
|
||||||
return language.split('-')[0];
|
return language.split('-')[0];
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -8277,7 +8277,7 @@ typeof navigator === "object" && (function (global, factory) {
|
|||||||
// * active: The state preferred by user settings or config
|
// * active: The state preferred by user settings or config
|
||||||
// * toggled: The real captions state
|
// * toggled: The real captions state
|
||||||
|
|
||||||
var languages = dedupe(Array.from(navigator.languages || navigator.userLanguage).map(function (language) {
|
var languages = dedupe(Array.from(navigator.languages || navigator.language || navigator.userLanguage).map(function (language) {
|
||||||
return language.split('-')[0];
|
return language.split('-')[0];
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+19
-7
@@ -1,10 +1,19 @@
|
|||||||
{
|
{
|
||||||
"name": "plyr",
|
"name": "plyr",
|
||||||
"version": "3.3.21",
|
"version": "3.3.22",
|
||||||
"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": "https://plyr.io",
|
"homepage": "https://plyr.io",
|
||||||
"author": "Sam Potts <sam@potts.es>",
|
"author": "Sam Potts <sam@potts.es>",
|
||||||
"keywords": ["HTML5 Video", "HTML5 Audio", "Media Player", "DASH", "Shaka", "WordPress", "HLS"],
|
"keywords": [
|
||||||
|
"HTML5 Video",
|
||||||
|
"HTML5 Audio",
|
||||||
|
"Media Player",
|
||||||
|
"DASH",
|
||||||
|
"Shaka",
|
||||||
|
"WordPress",
|
||||||
|
"HLS"
|
||||||
|
],
|
||||||
"main": "./dist/plyr.js",
|
"main": "./dist/plyr.js",
|
||||||
"browser": "./dist/plyr.min.js",
|
"browser": "./dist/plyr.min.js",
|
||||||
"sass": "./src/sass/plyr.scss",
|
"sass": "./src/sass/plyr.scss",
|
||||||
@@ -22,16 +31,17 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp build",
|
"build": "gulp build",
|
||||||
"lint": "eslint src/js",
|
"lint": "eslint src/js && npm run-script remark",
|
||||||
|
"remark": "remark -f --use 'validate-links=repository:\"sampotts/plyr\"' '{,!(node_modules),.?**/}*.md'",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^6.26.3",
|
"babel-core": "^6.26.3",
|
||||||
"babel-eslint": "^7.2.3",
|
"babel-eslint": "^8.2.6",
|
||||||
"babel-plugin-external-helpers": "^6.22.0",
|
"babel-plugin-external-helpers": "^6.22.0",
|
||||||
"babel-preset-env": "^1.7.0",
|
"babel-preset-env": "^1.7.0",
|
||||||
"del": "^3.0.0",
|
"del": "^3.0.0",
|
||||||
"eslint": "^5.0.1",
|
"eslint": "^5.1.0",
|
||||||
"eslint-config-airbnb-base": "^13.0.0",
|
"eslint-config-airbnb-base": "^13.0.0",
|
||||||
"eslint-config-prettier": "^2.9.0",
|
"eslint-config-prettier": "^2.9.0",
|
||||||
"eslint-plugin-import": "^2.13.0",
|
"eslint-plugin-import": "^2.13.0",
|
||||||
@@ -58,7 +68,9 @@
|
|||||||
"postcss-custom-properties": "^7.0.0",
|
"postcss-custom-properties": "^7.0.0",
|
||||||
"prettier-eslint": "^8.8.2",
|
"prettier-eslint": "^8.8.2",
|
||||||
"prettier-stylelint": "^0.4.2",
|
"prettier-stylelint": "^0.4.2",
|
||||||
"rollup-plugin-babel": "^3.0.5",
|
"remark-cli": "^5.0.0",
|
||||||
|
"remark-validate-links": "^7.0.0",
|
||||||
|
"rollup-plugin-babel": "^3.0.7",
|
||||||
"rollup-plugin-commonjs": "^9.1.3",
|
"rollup-plugin-commonjs": "^9.1.3",
|
||||||
"rollup-plugin-node-resolve": "^3.3.0",
|
"rollup-plugin-node-resolve": "^3.3.0",
|
||||||
"run-sequence": "^2.2.1",
|
"run-sequence": "^2.2.1",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ A simple, lightweight, accessible and customizable HTML5, YouTube and Vimeo medi
|
|||||||
* **HTML Video & Audio** - support for both formats
|
* **HTML Video & Audio** - support for both formats
|
||||||
* **[Embedded Video](#embeds)** - support for YouTube and Vimeo video playback
|
* **[Embedded Video](#embeds)** - support for YouTube and Vimeo video playback
|
||||||
* **[Monetization](#ads)** - make money from your videos
|
* **[Monetization](#ads)** - make money from your videos
|
||||||
* **[Streaming](#streaming)** - support for hls.js, Shaka and dash.js streaming playback
|
* **[Streaming](#try-plyr-online)** - support for hls.js, Shaka and dash.js streaming playback
|
||||||
* **[API](#api)** - toggle playback, volume, seeking, and more through a standardized API
|
* **[API](#api)** - toggle playback, volume, seeking, and more through a standardized API
|
||||||
* **[Events](#events)** - no messing around with Vimeo and YouTube APIs, all events are standardized across formats
|
* **[Events](#events)** - no messing around with Vimeo and YouTube APIs, all events are standardized across formats
|
||||||
* **[Fullscreen](#fullscreen)** - supports native fullscreen with fallback to "full window" modes
|
* **[Fullscreen](#fullscreen)** - supports native fullscreen with fallback to "full window" modes
|
||||||
@@ -132,13 +132,13 @@ See [initialising](#initialising) for more information on advanced setups.
|
|||||||
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills seperately as part of your application but to make life easier you can use the polyfilled build.
|
You can use our CDN (provided by [Fastly](https://www.fastly.com/)) for the JavaScript. There's 2 versions; one with and one without [polyfills](#polyfills). My recommendation would be to manage polyfills seperately as part of your application but to make life easier you can use the polyfilled build.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/3.3.21/plyr.js"></script>
|
<script src="https://cdn.plyr.io/3.3.22/plyr.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
...or...
|
...or...
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<script src="https://cdn.plyr.io/3.3.21/plyr.polyfilled.js"></script>
|
<script src="https://cdn.plyr.io/3.3.22/plyr.polyfilled.js"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
### CSS
|
### CSS
|
||||||
@@ -152,13 +152,13 @@ Include the `plyr.css` stylsheet into your `<head>`
|
|||||||
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
|
If you want to use our CDN (provided by [Fastly](https://www.fastly.com/)) for the default CSS, you can use the following:
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<link rel="stylesheet" href="https://cdn.plyr.io/3.3.21/plyr.css">
|
<link rel="stylesheet" href="https://cdn.plyr.io/3.3.22/plyr.css">
|
||||||
```
|
```
|
||||||
|
|
||||||
### SVG Sprite
|
### SVG Sprite
|
||||||
|
|
||||||
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
|
The SVG sprite is loaded automatically from our CDN (provided by [Fastly](https://www.fastly.com/)). To change this, see the [options](#options) below. For
|
||||||
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.3.21/plyr.svg`.
|
reference, the CDN hosted SVG sprite can be found at `https://cdn.plyr.io/3.3.22/plyr.svg`.
|
||||||
|
|
||||||
## Ads
|
## Ads
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ player.fullscreen.active; // false;
|
|||||||
| `speed` | ✓ | ✓ | Gets or sets the speed for the player. The setter accepts a value in the options specified in your config. Generally the minimum should be 0.5. |
|
| `speed` | ✓ | ✓ | Gets or sets the speed for the player. The setter accepts a value in the options specified in your config. Generally the minimum should be 0.5. |
|
||||||
| `quality`¹ | ✓ | ✓ | Gets or sets the quality for the player. The setter accepts a value from the options specified in your config. |
|
| `quality`¹ | ✓ | ✓ | Gets or sets the quality for the player. The setter accepts a value from the options specified in your config. |
|
||||||
| `loop` | ✓ | ✓ | Gets or sets the current loop state of the player. The setter accepts a boolean. |
|
| `loop` | ✓ | ✓ | Gets or sets the current loop state of the player. The setter accepts a boolean. |
|
||||||
| `source` | ✓ | ✓ | Gets or sets the current source for the player. The setter accepts an object. See [source setter](#source-setter) below for examples. |
|
| `source` | ✓ | ✓ | Gets or sets the current source for the player. The setter accepts an object. See [source setter](#the-source-setter) below for examples. |
|
||||||
| `poster` | ✓ | ✓ | Gets or sets the current poster image for the player. The setter accepts a string; the URL for the updated poster image. |
|
| `poster` | ✓ | ✓ | Gets or sets the current poster image for the player. The setter accepts a string; the URL for the updated poster image. |
|
||||||
| `autoplay` | ✓ | ✓ | Gets or sets the autoplay state of the player. The setter accepts a boolean. |
|
| `autoplay` | ✓ | ✓ | Gets or sets the autoplay state of the player. The setter accepts a boolean. |
|
||||||
| `currentTrack` | ✓ | ✓ | Gets or sets the caption track by index. `-1` means the track is missing or captions is not active |
|
| `currentTrack` | ✓ | ✓ | Gets or sets the caption track by index. `-1` means the track is missing or captions is not active |
|
||||||
@@ -435,10 +435,12 @@ player.source = {
|
|||||||
{
|
{
|
||||||
src: '/path/to/movie.mp4',
|
src: '/path/to/movie.mp4',
|
||||||
type: 'video/mp4',
|
type: 'video/mp4',
|
||||||
|
size: 720,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
src: '/path/to/movie.webm',
|
src: '/path/to/movie.webm',
|
||||||
type: 'video/webm',
|
type: 'video/webm',
|
||||||
|
size: 1080,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
poster: '/path/to/poster.jpg',
|
poster: '/path/to/poster.jpg',
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@ const captions = {
|
|||||||
// * toggled: The real captions state
|
// * toggled: The real captions state
|
||||||
|
|
||||||
const languages = dedupe(
|
const languages = dedupe(
|
||||||
Array.from(navigator.languages || navigator.userLanguage).map(language => language.split('-')[0]),
|
Array.from(navigator.languages || navigator.language || navigator.userLanguage).map(language => language.split('-')[0]),
|
||||||
);
|
);
|
||||||
|
|
||||||
let language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase();
|
let language = (this.storage.get('language') || this.config.captions.language || 'auto').toLowerCase();
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr
|
// Plyr
|
||||||
// plyr.js v3.3.21
|
// plyr.js v3.3.22
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
// Plyr Polyfilled Build
|
// Plyr Polyfilled Build
|
||||||
// plyr.js v3.3.21
|
// plyr.js v3.3.22
|
||||||
// https://github.com/sampotts/plyr
|
// https://github.com/sampotts/plyr
|
||||||
// License: The MIT License (MIT)
|
// License: The MIT License (MIT)
|
||||||
// ==========================================================================
|
// ==========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user