forked from videojs/video.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build, docs, lang and src images to 8.19.0
- Loading branch information
1 parent
25e5ad5
commit 4b125d1
Showing
131 changed files
with
2,459 additions
and
904 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* The jsdoc plugin that will convert types like {typeof ClassName} into {Class<ClassName>} | ||
*/ | ||
exports.handlers = { | ||
jsdocCommentFound: event => { | ||
event.comment = (event.comment || '').replace(/\{.*typeof\s+([^\s\|]+).*\}/g, typeExpression => { | ||
return typeExpression.replace(/typeof\s+([^\s\|\}]+)/g, (expression, className) => { | ||
return 'Class<' + className + '>'; | ||
}); | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* This jsdoc plugin works around some typescript-flavoured jsdoc that isn't actual jsdoc, | ||
* so docs:api doesn't fail | ||
*/ | ||
exports.handlers = { | ||
jsdocCommentFound: event => { | ||
// Special case for media-error.js | ||
event.comment = (event.comment || '').replace( | ||
'@typedef {{errorType: string, [key: string]: any}} ErrorMetadata', | ||
'@typedef {Object} ErrorMetadata\n * @property {string} errorType Error type' | ||
); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
Replaces the version number in the readme with the current package version. | ||
Looks for patterns like `/8.17.3/` and `/[email protected]/` | ||
*/ | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
const version = require('../package.json').version; | ||
|
||
let doc = fs.readFileSync(path.join(__dirname, '..', 'README.md'), 'utf8'); | ||
|
||
doc = doc | ||
.replace(/\/video.js@\d\.\d+\.\d+\//g, `/video.js@${version}/`) | ||
.replace(/\/\d\.\d+\.\d+\//g, `/${version}/`); | ||
|
||
fs.writeFileSync(path.join(__dirname, '..', 'README.md'), doc, 'utf8'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Remove parts of files from outputs. Everything between a pair of `/* start-delete-from-build *\u002f` | ||
* and `/* end-delete-from-build *\u002f` comments | ||
* | ||
* Based on https://github.com/se-panfilov/rollup-plugin-strip-code | ||
*/ | ||
|
||
import { createFilter } from '@rollup/pluginutils'; | ||
|
||
const START_COMMENT = 'start-delete-from-build'; | ||
const END_COMMENT = 'end-delete-from-build'; | ||
|
||
/** | ||
* Remove lines of code surrounded by comments | ||
* | ||
* @param {Object} [options] Options | ||
* @param {string} [options.include] Files to inlcude | ||
* @param {string} [options.exclude] Files to exclude | ||
* @param {string} [options.startComment] Starting keywork, default start-delete-from-build | ||
* @param {string} [options.endComment] Eding keywork, default end-delete-from-build | ||
* @param {RegExp} [options.pattern] Custom regex | ||
* @return void | ||
*/ | ||
export default function excludeLines(options = {}) { | ||
// assume that the myPlugin accepts options of `options.include` and `options.exclude` | ||
const filter = createFilter(options.include, options.exclude); | ||
|
||
return { | ||
transform(code, id) { | ||
if (!filter(id)) { | ||
return; | ||
} | ||
|
||
const startComment = options.startComment || START_COMMENT; | ||
const endComment = options.endComment || END_COMMENT; | ||
const defaultPattern = new RegExp(`([\\t ]*\\/\\* ?${startComment} ?\\*\\/)[\\s\\S]*?(\\/\\* ?${endComment} ?\\*\\/[\\t ]*\\n?)`, 'g'); | ||
|
||
return code.replace(options.pattern || defaultPattern, ''); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Netlify redirects to redirect old tutorial pages to new guide pages | ||
/tutorial-angular.html https://videojs.com/guides/angular/ 301! | ||
/tutorial-audio-tracks.html https://videojs.com/guides/audio-tracks/ 301! | ||
/tutorial-components.html https://videojs.com/guides/components/ 301! | ||
/tutorial-debugging.html https://videojs.com/guides/debugging/ 301! | ||
/tutorial-embeds.html https://videojs.com/guides/embeds/ 301! | ||
/tutorial-event-target.html https://videojs.com/guides/event-target/ 301! | ||
/tutorial-faq.html https://videojs.com/guides/faqs/ 301! | ||
/tutorial-hooks.html https://videojs.com/guides/hooks/ 301! | ||
/tutorial-languages.html https://videojs.com/guides/languages/ 301! | ||
/tutorial-layout.html https://videojs.com/guides/layout/ 301! | ||
/tutorial-live.html https://videojs.com/guides/live/ 301! | ||
/tutorial-middleware.html https://videojs.com/guides/middleware/ 301! | ||
/tutorial-modal-dialog.html https://videojs.com/guides/modal-dialog/ 301! | ||
/tutorial-options.html https://videojs.com/guides/options/ 301! | ||
/tutorial-player-workflows.html https://videojs.com/guides/player-workflows/ 301! | ||
/tutorial-plugins.html https://videojs.com/guides/plugins/ 301! | ||
/tutorial-react.html https://videojs.com/guides/react/ 301! | ||
/tutorial-setup.html https://videojs.com/guides/setup/ 301! | ||
/tutorial-skins.html https://videojs.com/guides/skins/ 301! | ||
/tutorial-tech.html https://videojs.com/guides/tech/ 301! | ||
/tutorial-text-tracks.html https://videojs.com/guides/text-tracks/ 301! | ||
/tutorial-troubleshooting.html https://videojs.com/guides/troubleshooting/ 301! | ||
/tutorial-video-tracks.html https://videojs.com/guides/video-tracks/ 301! | ||
/tutorial-videojs.html https://videojs.com/guides/videojs/ 301! | ||
/tutorial-vue.html https://videojs.com/guides/vue/ 301! | ||
/tutorial-webpack.html https://videojs.com/guides/webpack/ 301! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,29 @@ | ||
# [Video.js][vjs-website] Documentation | ||
# [Video.js][vjs-website] API Documentation | ||
|
||
There are two categories of docs: [Guides](/docs/guides/) and [API docs][api]. | ||
## Generated API docs | ||
|
||
Guides explain general topics and use cases (e.g. setup). API docs are automatically generated from the codebase and give specific details about functions, properties, and events. | ||
These [API docs][api] at [docs.videojs.com][vjs-docs] are automatically generated from the jsdoc comments in the code of the `main` branch of the [Video.js repository][vjs-gh]. You'll find specific details about functions, properties, and events. | ||
|
||
## Table of Contents | ||
The most useful API doc to start with is usually the [Player][api-player] class. | ||
|
||
* [Resolving Issues](#resolving-issues) | ||
* [FAQ](#faq) | ||
* [Troubleshooting](#troubleshooting) | ||
* [Guides](#guides) | ||
* [Getting Started](#getting-started) | ||
* [Setup](#setup) | ||
* [Player Workflows](#player-workflows) | ||
* [Options](#options) | ||
* [Tracks](#tracks) | ||
* [Customizing](#customizing) | ||
* [Skins](#skins) | ||
* [Plugins](#plugins) | ||
* [Components](#components) | ||
* [Tech](#tech) | ||
* [Languages](#languages) | ||
* [Hooks](#hooks) | ||
* [Debugging](#debugging) | ||
* [API Docs](#api-docs) | ||
## Guides | ||
|
||
## Resolving Issues | ||
More in-depth instructional [guides][vjs-guides] are found on the main [Video.js website][vjs-website]. The guides explain general topics and use cases (e.g. setup). | ||
|
||
### [FAQ](/docs/guides/faq.md) | ||
The full list of articles is on the [guides page][vjs-guides]. If you are looking for troubleshooting information, try the [FAQ][vjs-faq] and [troubleshooting][vjs-troubleshooting] pages. | ||
|
||
The frequently asked questions for Video.js. | ||
|
||
### [Troubleshooting](/docs/guides/troubleshooting.md) | ||
|
||
Troubleshooting help for Video.js. | ||
|
||
## [Guides](/docs/guides/) | ||
|
||
### Getting Started | ||
|
||
#### [Setup](/docs/guides/setup.md) | ||
|
||
The setup guide covers all methods of setting up Video.js players. | ||
|
||
#### [Player Workflows](/docs/guides/player-workflows.md) | ||
|
||
After mastering the basics of setup move over to this guide for some more advanced player workflows. | ||
|
||
#### [Options](/docs/guides/options.md) | ||
|
||
There are a number of options that can be used to change how the player behaves, starting with the HTML5 media options like autoplay and preload, and expanding to Video.js specific options. | ||
|
||
#### [Tracks](/docs/guides/tracks.md) | ||
|
||
Tracks are used for displaying text information over a video, selecting different audio tracks for a video, or selecting different video tracks. | ||
|
||
### Customizing | ||
|
||
#### [Skins](/docs/guides/skins.md) | ||
|
||
You can change the look of the player across playback technologies just by editing a CSS file. The skins documentation gives you a intro to how the HTML and CSS of the default skin is put together. For a list of skins you can check the [Video.js wiki][skins-list]. | ||
|
||
#### [Plugins](/docs/guides/plugins.md) | ||
|
||
You can package up interesting Video.js customizations and reuse them elsewhere. Find out how to build your own plugin or [use one created by someone else][plugins-list]. | ||
|
||
#### [Components](/docs/guides/components.md) | ||
|
||
Video.js is built around a collection of components. These are the building blocks of the player UI. | ||
|
||
#### [Tech](/docs/guides/tech.md) | ||
|
||
A "tech" is the shorthand we're using to describe any video playback technology - be it HTML5 video or a YouTube player. Basically anything that has a unique API to audio or video. Additional playback technologies can be added relatively easily. | ||
|
||
#### [Languages](/docs/guides/languages.md) | ||
|
||
Video.js has multi-language support! Follow this guide to see how you can contribute to and use languages. | ||
|
||
#### [Hooks](/docs/guides/hooks.md) | ||
|
||
A "hook" is functionality that wants to do when videojs creates a player. Right now only `beforesetup` and `setup` are supported. See the guide for more information on that. | ||
|
||
#### [Debugging](/docs/guides/debugging.md) | ||
[vjs-website]: https://videojs.com | ||
|
||
Follow this guide to see how you can use `videojs.log` for debugging purposes. | ||
[vjs-docs]: https://docs.videojs.com | ||
|
||
## [API Docs][api] | ||
[vjs-gh]: https://github.com/videojs/video.js | ||
|
||
You can refer to the [full list of API docs][api], but the most relevant API doc is for the [Player][api-player]. | ||
[vjs-guides]: https://videojs.com/guides/ | ||
|
||
[plugins-list]: https://videojs.com/plugins | ||
[vjs-faq]: https://videojs.com/guides/faqs/ | ||
|
||
[skins-list]: https://github.com/videojs/video.js/wiki/Skins | ||
[vjs-troubleshooting]: https://videojs.com/guides/troubleshooting/ | ||
|
||
[api]: https://docs.videojs.com/ | ||
[api]: https://docs.videojs.com | ||
|
||
[api-player]: https://docs.videojs.com/Player.html | ||
|
||
[vjs-website]: https://videojs.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="//use.edgefonts.net/source-code-pro.js"></script> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" rel="stylesheet" type="text/css"> <!-- there are many other style for highlighted code here: https://cdnjs.com/libraries/highlight.js --> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/atelier-forest.light.min.css"> <link rel="stylesheet" type="text/css" href="css/api-docs.css"> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> </head> <body> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script> <script src="js/doc-data.js"></script> <script src="js/api-docs.js"></script> </body> </html> | ||
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="//use.edgefonts.net/source-code-pro.js"></script> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700" rel="stylesheet" type="text/css"> <!-- there are many other style for highlighted code here: https://cdnjs.com/libraries/highlight.js --> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/atelier-forest.light.min.css"> <link rel="stylesheet" type="text/css" href="css/api-docs.css"> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> </head> <body> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script> <script src="js/doc-data.js"></script> <script src="js/api-docs.js"></script> </body> </html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="//use.edgefonts.net/source-code-pro.js"></script> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'> <!-- there are many other style for highlighted code here: https://cdnjs.com/libraries/highlight.js --> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/atelier-forest.light.min.css"> <link rel="stylesheet" type="text/css" href="css/api-docs.css"> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> </head> <body> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script> <script src="js/doc-data.js"></script> <script src="js/api-docs.js"></script> </body> </html> | ||
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="//use.edgefonts.net/source-code-pro.js"></script> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'> <!-- there are many other style for highlighted code here: https://cdnjs.com/libraries/highlight.js --> <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/styles/atelier-forest.light.min.css"> <link rel="stylesheet" type="text/css" href="css/api-docs.css"> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script> </head> <body> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.6/highlight.min.js"></script> <script src="js/doc-data.js"></script> <script src="js/api-docs.js"></script> </body> </html> |
Oops, something went wrong.