diff --git a/docs/guides/debugging.md b/docs/guides/debugging.md index 8a3940056..d427a2080 100644 --- a/docs/guides/debugging.md +++ b/docs/guides/debugging.md @@ -12,7 +12,7 @@ ## Logging -Video.js includes a lightweight wrapper - `videojs.log` - around a subset of [the `console` API][console]. The available methods are `videojs.log`, `videojs.log.warn`, and `videojs.log.error`. +Video.js includes `videojs.log`, a lightweight wrapper around a subset of [the `console` API][console]. The available methods are `videojs.log`, `videojs.log.warn`, and `videojs.log.error`. ### API Overview diff --git a/docs/guides/event-target.md b/docs/guides/event-target.md index d66a43b3a..9b0d3de0a 100644 --- a/docs/guides/event-target.md +++ b/docs/guides/event-target.md @@ -10,7 +10,7 @@ ## Overview -Events in video.js are setup so that they mimic the DOM API that is used on object, but also have helpful shorthand functions with the same functionality. +Events in Video.js are setup so that they mimic the DOM API that is used on object, but also have helpful shorthand functions with the same functionality. ## `on()` and `addEventListener()` diff --git a/docs/guides/faq.md b/docs/guides/faq.md index 373a0c01c..c2032b3e3 100644 --- a/docs/guides/faq.md +++ b/docs/guides/faq.md @@ -2,109 +2,112 @@ ## Table of Contents -* [Q: What is video.js?](#q-what-is-videojs) -* [Q: How do I install video.js?](#q-how-do-i-install-videojs) -* [Q: Is video.js on bower?](#q-is-videojs-on-bower) -* [Q: What do video.js version numbers mean?](#q-what-do-videojs-version-numbers-mean) +* [Q: What is Video.js?](#q-what-is-videojs) +* [Q: How do I install Video.js?](#q-how-do-i-install-videojs) +* [Q: Is Video.js on bower?](#q-is-videojs-on-bower) +* [Q: What do Video.js version numbers mean?](#q-what-do-videojs-version-numbers-mean) * [Q: How can I troubleshoot playback issues?](#q-how-can-i-troubleshoot-playback-issues) * [Q: A video does not play in a specific browser. Why?](#q-a-video-does-not-play-in-a-specific-browser-why) * [Q: Why does the entire video download before playback? Why does the video load for a long time?](#q-why-does-the-entire-video-download-before-playback-why-does-the-video-load-for-a-long-time) * [Q: I see an error thrown that mentions vdata12345. What is that?](#q-i-see-an-error-thrown-that-mentions-vdata12345-what-is-that) -* [Q: I think I found a bug with video.js or I want to add a feature. What should I do?](#q-i-think-i-found-a-bug-with-videojs-or-i-want-to-add-a-feature-what-should-i-do) +* [Q: I think I found a bug with Video.js or I want to add a feature. What should I do?](#q-i-think-i-found-a-bug-with-videojs-or-i-want-to-add-a-feature-what-should-i-do) * [if you think that you can fix the issue or add the feature](#if-you-think-that-you-can-fix-the-issue-or-add-the-feature) * [If you don't think you can fix the issue or add the feature](#if-you-dont-think-you-can-fix-the-issue-or-add-the-feature) * [Q: What is a reduced test case?](#q-what-is-a-reduced-test-case) -* [Q: What media formats does video.js support?](#q-what-media-formats-does-videojs-support) +* [Q: What media formats does Video.js support?](#q-what-media-formats-does-videojs-support) +* [Q: How does Video.js choose which source to use?](#q-how-does-videojs-choose-which-source-to-use) * [Q: How to I autoplay the video?](#q-how-to-i-autoplay-the-video) * [Q: How can I autoplay a video on a mobile device?](#q-how-can-i-autoplay-a-video-on-a-mobile-device) -* [Q: How can I play RTMP video in video.js?](#q-how-can-i-play-rtmp-video-in-videojs) +* [Q: How can I play RTMP video in Video.js?](#q-how-can-i-play-rtmp-video-in-videojs) * [Q: How can I hide the links to my video/subtitles/audio/tracks?](#q-how-can-i-hide-the-links-to-my-videosubtitlesaudiotracks) -* [Q: Can I turn off video.js logging?](#q-can-i-turn-off-videojs-logging) +* [Q: Can I turn off Video.js logging?](#q-can-i-turn-off-videojs-logging) * [Q: What is a plugin?](#q-what-is-a-plugin) -* [Q: How do I make a plugin for video.js?](#q-how-do-i-make-a-plugin-for-videojs) -* [Q: Where can I find a list of video.js plugins?](#q-where-can-i-find-a-list-of-videojs-plugins) +* [Q: How do I make a plugin for Video.js?](#q-how-do-i-make-a-plugin-for-videojs) +* [Q: Where can I find a list of Video.js plugins?](#q-where-can-i-find-a-list-of-videojs-plugins) * [Q: How can I get my plugin listed on the website?](#q-how-can-i-get-my-plugin-listed-on-the-website) -* [Q: Where can I find a list of video.js skins?](#q-where-can-i-find-a-list-of-videojs-skins) -* [Q: Does video.js work as an audio only player?](#q-does-videojs-work-as-an-audio-only-player) -* [Q: Does video.js support audio tracks?](#q-does-videojs-support-audio-tracks) -* [Q: Does video.js support video tracks?](#q-does-videojs-support-video-tracks) -* [Q: Does video.js support text tracks (captions, subtitles, etc)?](#q-does-videojs-support-text-tracks-captions-subtitles-etc) -* [Q: Does video.js support HLS (HTTP Live streaming) video?](#q-does-videojs-support-hls-http-live-streaming-video) -* [Q: Does video.js support MPEG Dash video?](#q-does-videojs-support-mpeg-dash-video) -* [Q: Does video.js support live video?](#q-does-videojs-support-live-video) -* [Q: Can video.js wrap around YouTube videos?](#q-can-videojs-wrap-around-youtube-videos) -* [Q: Can video.js wrap around Vimeo videos?](#q-can-videojs-wrap-around-vimeo-videos) -* [Q: Does video.js support DRM video?](#q-does-videojs-support-drm-video) -* [Q: Does video.js have any support for advertisement integrations?](#q-does-videojs-have-any-support-for-advertisement-integrations) -* [Q: Can video.js be required in node.js?](#q-can-videojs-be-required-in-nodejs) -* [Q: Does video.js work with webpack?](#q-does-videojs-work-with-webpack) -* [Q: Does video.js work with react?](#q-does-videojs-work-with-react) +* [Q: Where can I find a list of Video.js skins?](#q-where-can-i-find-a-list-of-videojs-skins) +* [Q: Does Video.js work as an audio only player?](#q-does-videojs-work-as-an-audio-only-player) +* [Q: Does Video.js support audio tracks?](#q-does-videojs-support-audio-tracks) +* [Q: Does Video.js support video tracks?](#q-does-videojs-support-video-tracks) +* [Q: Does Video.js support text tracks (captions, subtitles, etc)?](#q-does-videojs-support-text-tracks-captions-subtitles-etc) +* [Q: Does Video.js support HLS (HTTP Live streaming) video?](#q-does-videojs-support-hls-http-live-streaming-video) +* [Q: Does Video.js support MPEG Dash video?](#q-does-videojs-support-mpeg-dash-video) +* [Q: Does Video.js support live video?](#q-does-videojs-support-live-video) +* [Q: Can Video.js wrap around YouTube videos?](#q-can-videojs-wrap-around-youtube-videos) +* [Q: Can Video.js wrap around Vimeo videos?](#q-can-videojs-wrap-around-vimeo-videos) +* [Q: Does Video.js support DRM video?](#q-does-videojs-support-drm-video) +* [Q: Does Video.js have any support for advertisement integrations?](#q-does-videojs-have-any-support-for-advertisement-integrations) +* [Q: Can Video.js be required in node.js?](#q-can-videojs-be-required-in-nodejs) +* [Q: Does Video.js work with webpack?](#q-does-videojs-work-with-webpack) +* [Q: Does Video.js work with react?](#q-does-videojs-work-with-react) -## Q: What is video.js? +## Q: What is Video.js? -video.js is an extendable framework/library around the native video element. It does the following: +Video.js is an extendable framework/library around the native video element. It does the following: * Offers a plugin API so that different types of video can be handed to the native video element (e.g. [HLS][hls], [Flash][flash], HTML5 video, etc). -* Unifies the native video api across browsers (polyfilling support for features +* Unifies the native video API across browsers (polyfilling support for features if necessary) * Offers an extendable and themable UI -* Takes care of accessibility for the user (in-progress) -* Has a set of core plugins that offer support for tons of additional video formats. +* Ensures accessibility for keyboard and screen reader users +* Has a set of core plugins that offer support for additional video formats: * [videojs-contrib-hls][hls] * [videojs-contrib-dash][dash] -* Support for DRM video via a core plugin +* Supports DRM video via a core plugin: * [videojs-contrib-eme][eme] -* Lots of plugins which offer support for all kinds of features. See the [plugin list on videojs.com][plugin-list] +* Is extensible with lots of plugins offering support for all kinds of features. See the [plugin list on videojs.com][plugin-list] -## Q: How do I install video.js? +## Q: How do I install Video.js? -Currently video.js can be installed using npm, serving a release file from -a github tag, or even using a CDN hosted version. For information on doing any of those -see the [install guide][install-guide]. +Currently Video.js can be installed using npm, serving a release file from +a GitHub tag, or even using a CDN hosted version. For information on doing any of those +see the [setup guide][install-guide]. -## Q: Is video.js on bower? +## Q: Is Video.js on bower? -Versions prior to video.js 6 do support bower, however, as of video.js 6, bower is no +Versions prior to Video.js 6 support bower, however, as of Video.js 6, bower is no longer officially supported. Please see https://github.com/videojs/video.js/issues/4012 for more information. -## Q: What do video.js version numbers mean? +## Q: What do Video.js version numbers mean? -video.js follows [semver][semver] which means that the API should not change +Video.js follows [semver][semver] which means that the API should not change out from under a user unless there is a major version increase. ## Q: How can I troubleshoot playback issues? See the [troubleshooting guide][troubleshooting]. If troubleshooting does not -solve your issue, please submit a [pull request or an issue][pr-issue-question]. +solve your issue, please ask in [Slack][slack] or submit an [issue][pr-issue-question]. + +When seeking help about a playback issue the problem is often specific to the video file used, the way the video is hosted or the browser, so make sure to include all of that information and a [reduced test case](#q-what-is-a-reduced-test-case). ## Q: A video does not play in a specific browser. Why? See the [troubleshooting guide][troubleshooting]. If troubleshooting does not -solve your issue, please submit a [pull request or an issue][pr-issue-question]. +solve your issue, please ask in [Slack][slack] or submit an [issue][pr-issue-question]. ## Q: Why does the entire video download before playback? Why does the video load for a long time? See the [troubleshooting guide][troubleshooting]. If troubleshooting does not -solve your issue, please submit a [pull request or an issue][pr-issue-question]. +solve your issue, please ask in [Slack][slack] or submit an [issue][pr-issue-question]. ## Q: I see an error thrown that mentions `vdata12345`. What is that? See the [troubleshooting guide][troubleshooting]. If troubleshooting does not -solve your issue, please submit a [pull request or an issue][pr-issue-question]. +solve your issue, please ask in [Slack][slack] or submit an [issue][pr-issue-question]. -## Q: I think I found a bug with video.js or I want to add a feature. What should I do? +## Q: I think I found a bug with Video.js or I want to add a feature. What should I do? -### if you think that you can fix the issue or add the feature +### If you think that you can fix the issue or add the feature -Submit a pull request to the [video.js repo][vjs-prs]. +A pull request would be very welcome in the [Video.js repo][vjs-prs]. Make sure to follow the [contributing guide][contributing-prs] and the [pull request template][pr-template]. ### If you don't think you can fix the issue or add the feature -Open an [issue on the video.js repo][vjs-issues]. Make +Open an [issue on the Video.js repo][vjs-issues]. Make sure that you follow the [issue template][issue-template] and the [contributing guide][contributing-issues] so that we can better assist you with your issue. @@ -113,18 +116,28 @@ with your issue. A reduced test case is an example of the problem that you are facing in isolation. Think of it as example page that reproduces the issue in the least amount of possible code. + +It's important to add a reduced case. Even if the problem seems obvious it may not be to +others. Having a example to refer to also makes the difference between somebody being able +to take a look and immediately see what's wrong, and needing to take time to recreate what +they think you are describing. + We have a [starter example][starter-example] for reduced test cases. To learn more about reduced test cases visit [css-tricks][reduced-test-case] -## Q: What media formats does video.js support? +## Q: What media formats does Video.js support? This depends on the formats supported by the browser's HTML5 video element, and the playback -techs/plugins made available to video.js. For more information on media formats see the [troubleshooting guide][troubleshooting]. +techs/plugins made available to Video.js. For more information on media formats see the [troubleshooting guide][troubleshooting]. + +## Q: How does Video.js choose which source to use? + +When an array of sources is available, Video.js test each source in the order given. For each source, each tech in the [`techOrder`][techorder] will be checked to see if it can play it whether directly or via source handler (such as videojs-contrib-hls). The first match will be chosen. ## Q: How to I autoplay the video? Video.js supports the standard html5 `autoplay` attribute on the video element. -It also supports it as an option to video.js or as a method invocation on the player. +It also supports it as an option to Video.js or as a method invocation on the player. ```html