Repository: videojs/videojs-contrib-quality-levels
Branch: main
Commit: 0452c163bc3f
Files: 26
Total size: 45.2 KB
Directory structure:
gitextract_g3efd7_y/
├── .editorconfig
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── ci.yml
├── .gitignore
├── .husky/
│ ├── pre-commit
│ └── pre-push
├── .npmignore
├── .nvmrc
├── .travis.yml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── index.html
├── package.json
├── scripts/
│ ├── jsdoc.config.json
│ ├── karma.conf.js
│ └── rollup.config.js
├── src/
│ ├── plugin.js
│ ├── quality-level-list.js
│ └── quality-level.js
├── test/
│ ├── plugin.test.js
│ ├── quality-level-list.test.js
│ └── test-helpers.js
└── tsconfig.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
## Description
Briefly describe the issue.
Include a [reduced test case](https://css-tricks.com/reduced-test-cases/).
## Steps to reproduce
Explain in detail the exact steps necessary to reproduce the issue.
1.
2.
3.
## Results
### Expected
Please describe what you expected to see.
### Actual
Please describe what actually happened.
### Error output
If there are any errors at all, please include them here.
## Additional Information
Please include any additional information necessary here. Including the following:
### versions
#### videojs
what version of videojs does this occur with?
#### browsers
what browser are affected?
#### OSes
what platforms (operating systems and devices) are affected?
### plugins
are any videojs plugins being used on the page? If so, please list them below.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
## Description
Please describe the change as necessary.
If it's a feature or enhancement please be as detailed as possible.
If it's a bug fix, please link the issue that it fixes or describe the bug in as much detail.
## Specific Changes proposed
Please list the specific changes involved in this pull request.
## Requirements Checklist
- [ ] Feature implemented / Bug fixed
- [ ] If necessary, more likely in a feature request than a bug fix
- [ ] Unit Tests updated or fixed
- [ ] Docs/guides updated
- [ ] Reviewed by Two Core Contributors
================================================
FILE: .github/workflows/ci.yml
================================================
name: ci
on: [push, pull_request]
jobs:
should-skip:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should-skip-job: ${{steps.skip-check.outputs.should_skip}}
steps:
- id: skip-check
uses: fkirc/skip-duplicate-actions@v5.3.0
with:
github_token: ${{github.token}}
ci:
needs: should-skip
if: ${{needs.should-skip.outputs.should-skip-job != 'true' || github.ref == 'refs/heads/main'}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
test-type: ['unit', 'coverage']
env:
BROWSER_STACK_USERNAME: ${{secrets.BROWSER_STACK_USERNAME}}
BROWSER_STACK_ACCESS_KEY: ${{secrets.BROWSER_STACK_ACCESS_KEY}}
CI_TEST_TYPE: ${{matrix.test-type}}
runs-on: ${{matrix.os}}
steps:
- name: checkout code
uses: actions/checkout@v3
- name: read node version from .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
shell: bash
id: nvm
- name: update apt cache on linux w/o browserstack
run: sudo apt-get update
- name: install ffmpeg/pulseaudio for firefox on linux w/o browserstack
run: sudo apt-get install ffmpeg pulseaudio
- name: start pulseaudio for firefox on linux w/o browserstack
run: pulseaudio -D
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '${{steps.nvm.outputs.NVMRC}}'
cache: npm
# turn off the default setup-node problem watchers...
- run: echo "::remove-matcher owner=eslint-compact::"
- run: echo "::remove-matcher owner=eslint-stylish::"
- run: echo "::remove-matcher owner=tsc::"
- name: npm install
run: npm i --prefer-offline --no-audit
- name: run npm test
uses: coactions/setup-xvfb@v1
with:
run: npm run test
- name: coverage
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
files: './test/dist/coverage/coverage-final.json'
fail_ci_if_error: true
if: ${{startsWith(env.CI_TEST_TYPE, 'coverage')}}
================================================
FILE: .gitignore
================================================
# OS
Thumbs.db
ehthumbs.db
Desktop.ini
.DS_Store
._*
# Editors
*~
*.swp
*.tmproj
*.tmproject
*.sublime-*
.idea/
.project/
.settings/
.vscode/
# Logs
logs
*.log
npm-debug.log*
# Dependency directories
bower_components/
node_modules/
# Build-related directories
dist/
es/
cjs/
docs/api/
test/dist/
.eslintcache
.yo-rc.json
================================================
FILE: .husky/pre-commit
================================================
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
================================================
FILE: .husky/pre-push
================================================
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npm run test
================================================
FILE: .npmignore
================================================
# Intentionally left blank, so that npm does not ignore anything by default,
# but relies on the package.json "files" array to explicitly define what ends
# up in the package.
================================================
FILE: .nvmrc
================================================
16
================================================
FILE: .travis.yml
================================================
sudo: false
dist: trusty
language: node_js
# node version is specified using the .nvmrc file
before_install:
- npm install -g greenkeeper-lockfile@1
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- greenkeeper-lockfile-update
after_script:
- greenkeeper-lockfile-upload
addons:
firefox: latest
chrome: stable
================================================
FILE: CHANGELOG.md
================================================
# [4.1.0](https://github.com/videojs/videojs-contrib-quality-levels/compare/v4.0.0...v4.1.0) (2024-03-06)
### Features
* add types support (#149) ([7bc330e](https://github.com/videojs/videojs-contrib-quality-levels/commit/7bc330e)), closes [#149](https://github.com/videojs/videojs-contrib-quality-levels/issues/149)
### Chores
* Update CI workflow (#144) ([f088ede](https://github.com/videojs/videojs-contrib-quality-levels/commit/f088ede)), closes [#144](https://github.com/videojs/videojs-contrib-quality-levels/issues/144)
# [4.0.0](https://github.com/videojs/videojs-contrib-quality-levels/compare/v3.0.0...v4.0.0) (2023-03-31)
### Features
* make quality level list iterable (#136) ([c054f8c](https://github.com/videojs/videojs-contrib-quality-levels/commit/c054f8c)), closes [#136](https://github.com/videojs/videojs-contrib-quality-levels/issues/136)
* update to support only Video.js 8 and eliminate deprecation warnings (#138) ([ccab6ca](https://github.com/videojs/videojs-contrib-quality-levels/commit/ccab6ca)), closes [#138](https://github.com/videojs/videojs-contrib-quality-levels/issues/138)
### BREAKING CHANGES
* This breaks compatibility with all versions of Internet Explorer.
* With this change, videojs-contrib-quality-levels supports only Video.js 8 and newer.
# [3.0.0](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.2.1...v3.0.0) (2022-12-22)
### Features
* Don't transpile classes ([7b01bb3](https://github.com/videojs/videojs-contrib-quality-levels/commit/7b01bb3))
### Chores
* skip vjsverify es check ([89460b1](https://github.com/videojs/videojs-contrib-quality-levels/commit/89460b1))
## [2.2.1](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.2.0...v2.2.1) (2022-11-23)
### Chores
* do not run tests on npm version (#141) ([e598158](https://github.com/videojs/videojs-contrib-quality-levels/commit/e598158)), closes [#141](https://github.com/videojs/videojs-contrib-quality-levels/issues/141)
* **package:** add Video.js 8 as a compatible version (#140) ([5e61e71](https://github.com/videojs/videojs-contrib-quality-levels/commit/5e61e71)), closes [#140](https://github.com/videojs/videojs-contrib-quality-levels/issues/140)
# [2.2.0](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.1.0...v2.2.0) (2022-09-09)
### Features
* add frameRate property to the quality level (#134) ([13998a7](https://github.com/videojs/videojs-contrib-quality-levels/commit/13998a7)), closes [#134](https://github.com/videojs/videojs-contrib-quality-levels/issues/134)
### Chores
* update jsdoc (#132) ([dbcc7b4](https://github.com/videojs/videojs-contrib-quality-levels/commit/dbcc7b4)), closes [#132](https://github.com/videojs/videojs-contrib-quality-levels/issues/132)
### Code Refactoring
* remove IE8 specific changes (#133) ([316f405](https://github.com/videojs/videojs-contrib-quality-levels/commit/316f405)), closes [#133](https://github.com/videojs/videojs-contrib-quality-levels/issues/133)
### Documentation
* Fix typo in README (#135) ([7036132](https://github.com/videojs/videojs-contrib-quality-levels/commit/7036132)), closes [#135](https://github.com/videojs/videojs-contrib-quality-levels/issues/135)
### Tests
* update karma-config to fix local tests (#137) ([77bb0f1](https://github.com/videojs/videojs-contrib-quality-levels/commit/77bb0f1)), closes [#137](https://github.com/videojs/videojs-contrib-quality-levels/issues/137)
# [2.1.0](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.9...v2.1.0) (2021-04-05)
### Features
* mark Video.js as a peer dependency (#125) ([1115f78](https://github.com/videojs/videojs-contrib-quality-levels/commit/1115f78)), closes [#125](https://github.com/videojs/videojs-contrib-quality-levels/issues/125)
### Chores
* **package:** update npm-run-all to 4.1.5 (#72) ([a9e7ff5](https://github.com/videojs/videojs-contrib-quality-levels/commit/a9e7ff5)), closes [#72](https://github.com/videojs/videojs-contrib-quality-levels/issues/72)
* **package:** update videojs-generate-karma-config to version 5.0.2 (#77) ([72190a4](https://github.com/videojs/videojs-contrib-quality-levels/commit/72190a4)), closes [#77](https://github.com/videojs/videojs-contrib-quality-levels/issues/77)
* Update videojs-generate-karma-config to the latest version 🚀 (#65) ([50b2b42](https://github.com/videojs/videojs-contrib-quality-levels/commit/50b2b42)), closes [#65](https://github.com/videojs/videojs-contrib-quality-levels/issues/65)
### Documentation
* Fixed grammar and removed some unnecessary words (#83) ([63da16f](https://github.com/videojs/videojs-contrib-quality-levels/commit/63da16f)), closes [#83](https://github.com/videojs/videojs-contrib-quality-levels/issues/83)
* **README:** Fix minor typo (#114) ([153583e](https://github.com/videojs/videojs-contrib-quality-levels/commit/153583e)), closes [#114](https://github.com/videojs/videojs-contrib-quality-levels/issues/114)
* update description in readme (#84) ([433df96](https://github.com/videojs/videojs-contrib-quality-levels/commit/433df96)), closes [#84](https://github.com/videojs/videojs-contrib-quality-levels/issues/84)
## [2.0.9](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.8...v2.0.9) (2018-09-17)
### Bug Fixes
* another version reporting issue ([9003e8d](https://github.com/videojs/videojs-contrib-quality-levels/commit/9003e8d))
## [2.0.8](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.7...v2.0.8) (2018-09-17)
### Bug Fixes
* Remove the postinstall script to prevent install issues (#54) ([7562cdb](https://github.com/videojs/videojs-contrib-quality-levels/commit/7562cdb)), closes [#54](https://github.com/videojs/videojs-contrib-quality-levels/issues/54)
* report correct version (#57) ([1992300](https://github.com/videojs/videojs-contrib-quality-levels/commit/1992300)), closes [#57](https://github.com/videojs/videojs-contrib-quality-levels/issues/57)
### Chores
* update to generator-videojs-plugin[@7](https://github.com/7).2.0 ([9660214](https://github.com/videojs/videojs-contrib-quality-levels/commit/9660214))
* **package:** update rollup to version 0.66.0 (#56) ([0467b62](https://github.com/videojs/videojs-contrib-quality-levels/commit/0467b62)), closes [#56](https://github.com/videojs/videojs-contrib-quality-levels/issues/56)
* **package:** update videojs-contrib-hls to version 5.14.1 (#31) ([b1a17fa](https://github.com/videojs/videojs-contrib-quality-levels/commit/b1a17fa)), closes [#31](https://github.com/videojs/videojs-contrib-quality-levels/issues/31)
* **package:** update videojs-generate-rollup-config to version 2.2.0 (#55) ([4ad0a93](https://github.com/videojs/videojs-contrib-quality-levels/commit/4ad0a93)), closes [#55](https://github.com/videojs/videojs-contrib-quality-levels/issues/55)
## [2.0.7](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.6...v2.0.7) (2018-08-23)
### Chores
* generator v7 (#50) ([7837d93](https://github.com/videojs/videojs-contrib-quality-levels/commit/7837d93)), closes [#50](https://github.com/videojs/videojs-contrib-quality-levels/issues/50)
## [2.0.6](https://github.com/videojs/videojs-contrib-quality-levels/compare/v2.0.5...v2.0.6) (2018-08-03)
### Bug Fixes
* babel the es dist, by updating the generator (#45) ([0123ee8](https://github.com/videojs/videojs-contrib-quality-levels/commit/0123ee8)), closes [#45](https://github.com/videojs/videojs-contrib-quality-levels/issues/45)
## 2.0.5 (2018-07-05)
### Chores
* video.js 5/6 compatibility and travis update (#12) ([c69ac5d](https://github.com/videojs/videojs-contrib-quality-levels/commit/c69ac5d)), closes [#12](https://github.com/videojs/videojs-contrib-quality-levels/issues/12)
## 2.0.4 (2018-01-22)
* Allow video js 6 to be used (#25)
## 2.0.3 (2017-02-09)
* chore: video.js 5/6 compatibility and travis update (#12)
## 2.0.2 (2016-12-23)
* Make global a dependency instead of devDependency
## 2.0.1 (2016-12-13)
* Make browserify-versionify a dependency instead of devDependency
## 2.0.0 (2016-12-12)
* Remove HLS and Dash specific logic
* Return QualityLevel added or removed when using the add or remove api
================================================
FILE: CONTRIBUTING.md
================================================
# CONTRIBUTING
We welcome contributions from everyone!
## Getting Started
Make sure you have Node.js 8 or higher and npm installed.
1. Fork this repository and clone your fork
1. Install dependencies: `npm install`
1. Run a development server: `npm start`
### Making Changes
Refer to the [video.js plugin conventions][conventions] for more detail on best practices and tooling for video.js plugin authorship.
When you've made your changes, push your commit(s) to your fork and issue a pull request against the original repository.
### Running Tests
Testing is a crucial part of any software project. For all but the most trivial changes (typos, etc) test cases are expected. Tests are run in actual browsers using [Karma][karma].
- In all available and supported browsers: `npm test`
- In a specific browser: `npm run test:chrome`, `npm run test:firefox`, etc.
- While development server is running (`npm start`), navigate to [`http://localhost:9999/test/`][local]
[karma]: http://karma-runner.github.io/
[local]: http://localhost:9999/test/
[conventions]: https://github.com/videojs/generator-videojs-plugin/blob/master/docs/conventions.md
================================================
FILE: LICENSE
================================================
Copyright Brightcove, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# videojs-contrib-quality-levels
[](https://travis-ci.org/videojs/videojs-contrib-quality-levels)
[](https://greenkeeper.io/)
[](http://slack.videojs.com)
[](https://nodei.co/npm/videojs-contrib-quality-levels/)
A plugin that provides a framework of working with source quality levels.
Maintenance Status: Stable
- [Installation](#installation)
- [Using](#using)
- [Supporting Quality Levels for your source](#supporting-quality-levels-for-your-source)
- [Populating the list](#populating-the-list)
- [Triggering the 'change' event](#triggering-the-change-event)
- [Supported Projects](#supported-projects)
- [Including the Plugin](#including-the-plugin)
- [`
```
### Browserify
When using with Browserify, install videojs-contrib-quality-levels via npm and `require` the plugin as you would any other module.
```js
var videojs = require('video.js');
// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-contrib-quality-levels');
var player = videojs('my-video');
player.qualityLevels();
```
### RequireJS/AMD
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and `require` the plugin as you normally would:
```js
require(['video.js', 'videojs-contrib-quality-levels'], function(videojs) {
var player = videojs('my-video');
player.qualityLevels();
});
```
## License
Apache-2.0. Copyright (c) Brightcove, Inc.
[videojs]: http://videojs.com/
================================================
FILE: index.html
================================================