Merge pull request #30 from seedboxtech/master

fix: Change the way we update the quality selector item to solve an issues with VideoJS 7...
This commit is contained in:
Jeremy Thomerson 2019-06-07 11:20:01 -04:00 committed by GitHub
commit 031b7be692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2158 additions and 1360 deletions

View File

@ -5,7 +5,6 @@ node_js:
- "10"
- "8"
- "8.10"
- "6"
before_install: if [[ `npm -v` != 6* ]]; then npm i -g npm@6.4.1; fi

View File

@ -8,6 +8,8 @@
var path = require('path'),
getCodeVersion = require('silvermine-serverless-utils/src/get-code-version');
const sass = require('node-sass');
module.exports = function(grunt) {
var DEBUG = !!grunt.option('debug'),
@ -70,6 +72,7 @@ module.exports = function(grunt) {
sass: {
options: {
implementation: sass,
sourceMap: DEBUG,
indentWidth: 3,
outputStyle: DEBUG ? 'expanded' : 'compressed',

View File

@ -3,8 +3,8 @@
<head>
<meta charset=utf-8 />
<title>videojs-quality-selector Demo</title>
<link href="https://unpkg.com/video.js@7.4.1/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@7.4.1/dist/video.js"></script>
<link href="https://unpkg.com/video.js@7.5.4/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js@7.5.4/dist/video.js"></script>
<script src="../../dist/js/silvermine-videojs-quality-selector.min.js"></script>
<link href="../../dist/css/quality-selector.css" rel="stylesheet">
</head>

3471
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
"description": "video.js plugin for selecting a video quality or resolution",
"main": "src/js/index.js",
"scripts": {
"prepublish": "grunt build",
"prepare": "grunt build",
"test": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- -R spec 'tests/**/*.test.js'"
},
"author": "Jeremy Thomerson",
@ -25,32 +25,33 @@
},
"homepage": "https://github.com/silvermine/videojs-quality-selector#readme",
"devDependencies": {
"@silvermine/eslint-config": "1.5.0",
"@silvermine/eslint-config": "2.2.1",
"@silvermine/sass-lint-config": "1.1.0",
"autoprefixer": "7.1.1",
"coveralls": "3.0.2",
"eslint": "4.0.0",
"autoprefixer": "9.5.1",
"coveralls": "3.0.3",
"eslint": "5.16.0",
"expect.js": "0.3.1",
"grunt": "1.0.3",
"grunt": "1.0.4",
"grunt-browserify": "5.3.0",
"grunt-contrib-uglify": "3.0.1",
"grunt-contrib-uglify": "4.0.1",
"grunt-contrib-watch": "1.1.0",
"grunt-eslint": "20.0.0",
"grunt-postcss": "0.8.0",
"grunt-sass": "2.0.0",
"grunt-sass-lint": "0.2.2",
"grunt-eslint": "21.0.0",
"grunt-postcss": "0.9.0",
"grunt-sass": "3.0.2",
"node-sass": "4.12.0",
"grunt-sass-lint": "0.2.4",
"istanbul": "0.4.5",
"mocha": "5.2.0",
"mocha": "6.1.4",
"mocha-lcov-reporter": "1.3.0",
"rewire": "2.5.2",
"rewire": "4.0.1",
"silvermine-serverless-utils": "git+https://github.com/silvermine/serverless-utils.git#910f1149af824fc8d0fa840878079c7d3df0f414",
"sinon": "2.3.5"
"sinon": "7.3.2"
},
"peerDependencies": {
"video.js": ">= 6.0.0"
"video.js": ">=6.0.0"
},
"dependencies": {
"class.extend": "0.9.2",
"underscore": "1.8.3"
"underscore": "1.9.1"
}
}

View File

@ -59,7 +59,11 @@ module.exports = function(videojs) {
if (this.selectedSrc !== src) {
this.selectedSrc = src;
this.update();
_.each(this.items, function(item) {
if (item.source.src !== src) {
item.selected(item.source.src === src);
}
});
}
},