You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
[![NPM][npm-icon]][npm-link]
11
11
12
-
> Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 and Flash video, as well as YouTube and Vimeo (through [plugins][plugins]). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over ~~50,000~~~~100,000~~~~200,000~~[400,000 websites][builtwith].
12
+
> Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 video and Media Source Extensions, as well as other playback techs like YouTube and Vimeo (through [plugins][plugins]). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over ~~50,000~~~~100,000~~~~200,000~~~~400,000~~[600,000 websites][builtwith].
Copy file name to clipboardExpand all lines: docs/guides/faq.md
+4-15Lines changed: 4 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@
47
47
Video.js is an extendable framework/library around the native video element. It does the following:
48
48
49
49
* Offers a plugin API so that different types of video can be handed to the native
50
-
video element (e.g. [HLS][hls], [Flash][flash], HTML5 video, etc).
50
+
video element (e.g. [HLS][hls], HTML5 video, etc).
51
51
* Unifies the native video API across browsers (polyfilling support for features
52
52
if necessary)
53
53
* Offers an extendable and themable UI
@@ -161,16 +161,7 @@ on using that option.
161
161
162
162
## Q: How can I play RTMP video in Video.js?
163
163
164
-
RTMP requires Flash to play back. You'll need both a browser that supports Flash and the Flash tech.
165
-
166
-
In Video.js version 6, the Flash tech is not included by default and is available as a separate [videojs-flash package][flash]. In previous versions it was builtin to Video.js.
167
-
168
-
The RTMP source should be set with an appropriate type -- `rtmp/mp4` or `rtmp/flv`.
169
-
Be aware of that Video.js splits the connection url and stream name with the `&` character, for example: `rtmp://example.com/live&foo` or `rtmp://example.com/fms&mp4:path/to/file.mp4`.
170
-
171
-
If the server requires query parameters for authentication, these should be added to the connection part URL, for example `rtmp://example.com/live?token=1234&foo`.
172
-
173
-
Bear in mind that mobile browsers do not support Flash, and modern desktop browsers make it increasingly difficult to use Flash or disable it by default for your end users. Consider moving to a modern format such as HLS or DASH.
164
+
It is no longer possible to play RTMP as it requires Flash, and [Flash has reached end of life][flash-eol]. No browser supports it.
174
165
175
166
## Q: How can I hide the links to my video/subtitles/audio/tracks?
176
167
@@ -221,7 +212,6 @@ See the [Video.js GitHub wiki][skins-list].
221
212
## Q: Does Video.js work as an audio only player?
222
213
223
214
Yes! It can be used to play audio only files in a `<video>` or `<audio>` tag.
224
-
Note that audio-only sources do not work with the Flash playback tech.
Video.js playback technologies (i.e. "techs") can be given custom options as part of the options passed to the `videojs` function. They should be passed under the _lower-case variant of the tech name_ (e.g. `"flash"` or `"html5"`).
564
-
565
-
### `flash`
566
-
567
-
#### `swf`
568
-
569
-
Specifies where the Video.js SWF file is located for the `Flash` tech:
570
-
571
-
```js
572
-
videojs('my-player', {
573
-
flash: {
574
-
swf:'//path/to/videojs.swf'
575
-
}
576
-
});
577
-
```
578
-
579
-
However, changing the global defaults is generally more appropriate:
580
-
581
-
```js
582
-
videojs.options.flash.swf='//path/to/videojs.swf'
583
-
```
561
+
Video.js playback technologies (i.e. "techs") can be given custom options as part of the options passed to the `videojs` function. They should be passed under the _lower-case variant of the tech name_ (e.g. `"html5"`).
Copy file name to clipboardExpand all lines: docs/guides/player-workflows.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ Suggests that a player or component was removed from the DOM without using `disp
77
77
78
78
## Showing and Hiding a Player
79
79
80
-
It is not recommended that you attempt to toggle the visibility or display of a Video.js player. Doing so can be particularly problematic when it comes to the Flash tech. Instead, players should be created and [disposed](#removing-players) as needed.
80
+
It is not recommended that you attempt to toggle the visibility or display of a Video.js player. Instead, players should be created and [disposed](#removing-players) as needed.
81
81
82
82
This is relevant to use cases such as displaying a player in a modal/overlay. Rather than keeping a hidden Video.js player in a DOM element, it's recommended that you create the player when the modal opens and dispose it when the modal closes.
Copy file name to clipboardExpand all lines: docs/guides/tech.md
+10-32Lines changed: 10 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# Playback Technology ("Tech")
2
2
3
-
Playback Technology refers to the specific browser or plugin technology used to play the video or audio. When using HTML5, the playback technology is the video or audio element. When using Flash from [videojs-flash][flash], the playback technology is the video-js.swf Flash object. When using the [videojs-youtube][youtube] tech, the playback technology is the You Tube player. The tech also includes an API wrapper to translate between the Video.js controls and API to the specific playback technology used.
3
+
Playback Technology refers to the specific browser or plugin technology used to play the video or audio. When using HTML5, the playback technology is the video or audio element. When using the [videojs-youtube][youtube] tech, the playback technology is the YouTube player. The tech also includes an API wrapper to translate between the Video.js controls and API to the specific playback technology used.
4
4
5
5
Essentially we're using html5 and plugins only as video decoders, and using HTML and JavaScript to create a consistent API and skinning experience across all of them.
6
6
7
-
In addition to techs there are source handlers. Source handlers add the capability to play additional source types to techs. For example, the [videojs-contrib-hls][hls] source handler enables the HTML5 and Flash techs to play HLS.
7
+
In addition to techs there are source handlers. Source handlers add the capability to play additional source types to techs. For example, the [http-streaming][http-streaming] source handler (included with Video.js 7+ by default) enables the HTML5 tech to play HLS and DASH.
8
8
9
9
## Building an API Wrapper
10
10
@@ -46,14 +46,14 @@ When additional techs are added they are automatically added to the `techOrder`.
@@ -75,6 +75,8 @@ Techs can check if they have this capability by checking the `canOverridePoster`
75
75
76
76
When Video.js is given an array of sources, which to use is determined by finding the first supported source / tech combination. Each tech will be queried in the order specified in `techOrder` whether it can play the first source. The first match wins. If no tech can play the first source, then the next will be tested. It's important to set the `type` of each source correctly for this test to be accurate.
77
77
78
+
> These example use the obsolete [Flash tech][flash-eol], for illustration of tech ordering with techs which have a greater degree of overlap in sources they can play
79
+
78
80
For example, given the following video element, assuming the [videojs-flash][flash] tech and [videojs-contrib-hls][hls] source handler are available:
79
81
80
82
```html
@@ -121,38 +123,14 @@ This time, we have videojs-flash but not videojs-contrib-hls:
121
123
122
124
## Flash Technology
123
125
124
-
The Flash playback tech was previously included in Video.js core and was included in the default `techOrder`. As of version 6, the Flash tech was moved to a separate [videojs-flash plugin][flash] which you would need to include if you still need to use Flash.
125
-
126
-
It's increasingly likely that end users don't have Flash or their browser has either disabled it or puts a click-to-play or other barrier to using it, so it's strongly recommended to use an alternative such as HLS.
127
-
128
-
### Enabling RTMP Streaming Playback
129
-
130
-
In order to force the Flash tech to choose streaming playback, you need to provide a valid streaming source **before other valid Flash video sources**. This is necessary because of the source selection algorithm, where playback tech chooses the first possible source object with a valid type. Valid streaming `type` values include `rtmp/mp4` and `rtmp/flv`. The streaming `src` value requires valid connection and stream strings, separated by an `&`. An example of supplying a streaming source through your HTML markup might look like:
All four RTMP protocols are valid in the `src` (RTMP, RTMPT, RTMPE, and RTMPS).
145
-
146
-
#### A note on sandboxing and security
147
-
148
-
In some environments, such as Electron and NW.js apps, stricter policies are enforced, and `.swf` files won’t be able to communicate with the outside world out of the box. To stream media, you have to add them to a special manifest of trusted files. [nw-flash-trust](https://github.com/szwacz/nw-flash-trust) makes this job easy.
149
-
150
-
Browsers also prevent the Flash tech from working when you load a page from the filesystem (with the `file:` protocol) and also in sandboxed iframes.
By default, Video.js will use native text tracks and fall back to emulated text tracks if the native functionality is broken, incomplete, or non-existent. The Flash tech will always use the emulated text track functionality.
166
+
By default, Video.js will use native text tracks and fall back to emulated text tracks if the native functionality is broken, incomplete, or non-existent.
167
167
168
168
The Video.js API and TextTrack objects were modeled after the W3C specification. Video.js uses [Mozilla's vtt.js](https://github.com/mozilla/vtt.js) library to parse and display emulated text tracks.
0 commit comments