Skip to content

Commit 503141c

Browse files
authored
docs: Remove Flash (#6994)
1 parent a35a121 commit 503141c

29 files changed

+39
-221
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ So you want to help out? Great! There's a number of ways you can get involved.
3535
There's also other Video.js projects where you can help. (check the [video.js org](https://github.com/videojs) for an up-to-date list of projects)
3636

3737
* [Videojs.com](https://github.com/videojs/videojs.com)
38-
* [Video.js flash player](https://github.com/videojs/videojs-flash)
3938
* [HLS](https://github.com/videojs/videojs-contrib-hls)
4039
* [DASH](https://github.com/videojs/videojs-contrib-dash)
4140
* [Youtube Tech](https://github.com/videojs/videojs-youtube)
@@ -183,7 +182,6 @@ See [the following section](#running-a-local-web-server) for how to open the pag
183182

184183
This ties in nicely with the sandbox directory. You can always open the `sandbox/index.html` file directly but in some cases it may not work properly.
185184

186-
> Flash files (`.swf`) that are local and loaded into a locally accessed page (file:///) will NOT run.
187185
> To get around this you must use a local web server.
188186
189187
To run the local webserver:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[![NPM][npm-icon]][npm-link]
1111

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].
1313
1414
## Table of Contents
1515

build/generate-example.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
const path = require('path');
2-
const fs = require('fs');
32
const sh = require('shelljs');
43
const pkg = require('../package.json');
54

65
const dest = path.join(__dirname, '..', 'docs', 'api');
7-
const vjsFlash = path.join(__dirname, '..', 'node_modules', 'videojs-flash');
8-
const vjsSwf = path.join('node_modules', 'videojs-swf');
96
const distDest = path.join(dest, 'dist');
107
const exampleDest = path.join(dest, 'test-example');
11-
const vjsFlashDest = path.join(dest, vjsFlash, 'dist');
12-
const swfDest = path.join(dest, vjsFlash, vjsSwf, 'dist');
138

149
const cleanupExample = function() {
1510
sh.rm('-rf', distDest);
@@ -23,24 +18,13 @@ const generateExample = function({skipBuild} = {}) {
2318
sh.exec('npm run build');
2419
}
2520

26-
// make sure that the example, flash, and swf dests are available
21+
// make sure that the example dest is available
2722
sh.mkdir('-p', exampleDest);
28-
sh.mkdir('-p', vjsFlashDest);
29-
sh.mkdir('-p', swfDest);
3023

3124
// copy the `dist` dir
3225
sh.cp('-R', 'dist', path.join(dest, 'dist'));
3326
sh.rm(path.join(dest, 'dist', `video-js-${pkg.version}.zip`));
3427

35-
// copy videojs-flash
36-
sh.cp(path.join(vjsFlash, 'dist', 'videojs-flash.js'), vjsFlashDest);
37-
// copy videojs-swf
38-
if (fs.existsSync(path.join(vjsFlash, vjsSwf, 'dist', 'video-js.swf'))) {
39-
sh.cp(path.join(vjsFlash, vjsSwf, 'dist', 'video-js.swf'), swfDest);
40-
} else {
41-
sh.cp(path.join(vjsSwf, 'dist', 'video-js.swf'), swfDest);
42-
}
43-
4428
const filepaths = sh.find(path.join(__dirname, '..', 'sandbox', '**', '*.*'))
4529
.filter((filepath) => path.extname(filepath) === '.example');
4630

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"name": "videojs/video.js",
3-
"description": "An HTML5 and Flash video player with a common API and skin for both.",
3+
"description": "An HTML5 video player.",
44
"type": "library",
55
"keywords": [
66
"videojs",
77
"html5",
8-
"flash",
98
"video",
109
"player"
1110
],

docs/examples/elephantsdream/descriptions.en.vtt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ The elevator begins to drop down another shaft, coming to rest as it slams into
156156

157157
39
158158
00:06:26.500 --> 00:06:28.000
159-
A camera flashes.
159+
A camera briefly illumiates.
160160

161161
40
162162
00:06:28.010 --> 00:06:34.000

docs/guides/faq.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
Video.js is an extendable framework/library around the native video element. It does the following:
4848

4949
* 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).
5151
* Unifies the native video API across browsers (polyfilling support for features
5252
if necessary)
5353
* Offers an extendable and themable UI
@@ -161,16 +161,7 @@ on using that option.
161161
162162
## Q: How can I play RTMP video in Video.js?
163163

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.
174165

175166
## Q: How can I hide the links to my video/subtitles/audio/tracks?
176167

@@ -221,7 +212,6 @@ See the [Video.js GitHub wiki][skins-list].
221212
## Q: Does Video.js work as an audio only player?
222213

223214
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.
225215

226216
## Q: Does Video.js support audio tracks?
227217

@@ -253,8 +243,7 @@ Like HLS, DASH streams require [CORS headers][cors].
253243

254244
## Q: Does Video.js support live video?
255245

256-
Yes! Common formats for live are HLS or historically RTMP.
257-
HLS is supported via [videojs-http-streaming][hls] and RTMP via [videojs-flash][flash].
246+
Yes! Common formats for live are HLS or DASH. In the past RTMP was commonly used for live, but it is no longer possible to play in any browser.
258247

259248
## Q: Can Video.js play YouTube videos?
260249

@@ -302,7 +291,7 @@ Yes! See [ReactJS integration example][react-guide].
302291

303292
[eme]: https://github.com/videojs/videojs-contrib-eme
304293

305-
[flash]: https://github.com/videojs/videojs-flash
294+
[flash-eol]: https://www.adobe.com/products/flashplayer/end-of-life.html
306295

307296
[generator]: https://github.com/videojs/generator-videojs-plugin
308297

docs/guides/options.md

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
* [${componentName}](#componentname)
5252
* [Tech Options](#tech-options)
5353
* [${techName}](#techname)
54-
* [flash](#flash)
55-
* [swf](#swf)
5654
* [html5](#html5)
5755
* [nativeControlsForTouch](#nativecontrolsfortouch-1)
5856
* [nativeAudioTracks](#nativeaudiotracks)
@@ -560,27 +558,7 @@ videojs('my-player', {
560558

561559
> Type: `Object`
562560
563-
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"`).
584562

585563
### `html5`
586564

docs/guides/player-workflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Suggests that a player or component was removed from the DOM without using `disp
7777

7878
## Showing and Hiding a Player
7979

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.
8181

8282
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.
8383

docs/guides/tech.md

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Playback Technology ("Tech")
22

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.
44

55
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.
66

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.
88

99
## Building an API Wrapper
1010

@@ -46,14 +46,14 @@ When additional techs are added they are automatically added to the `techOrder`.
4646
### Tag Method:
4747

4848
```html
49-
<video data-setup='{"techOrder": ["html5", "flash", "other supported tech"]}'>
49+
<video data-setup='{"techOrder": ["html5", "other supported tech"]}'>
5050
```
5151

5252
### Object Method:
5353

5454
```js
5555
videojs("videoID", {
56-
techOrder: ["html5", "flash", "other supported tech"]
56+
techOrder: ["html5", "other supported tech"]
5757
});
5858
```
5959

@@ -75,6 +75,8 @@ Techs can check if they have this capability by checking the `canOverridePoster`
7575

7676
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.
7777

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+
7880
For example, given the following video element, assuming the [videojs-flash][flash] tech and [videojs-contrib-hls][hls] source handler are available:
7981

8082
```html
@@ -121,38 +123,14 @@ This time, we have videojs-flash but not videojs-contrib-hls:
121123

122124
## Flash Technology
123125

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:
131-
132-
```html
133-
<source src="rtmp://your.streaming.provider.net/cfx/st/&mp4:path/to/video.mp4" type="rtmp/mp4">
134-
<source src="http://your.static.provider.net/path/to/video.mp4" type="video/mp4">
135-
<source src="http://your.static.provider.net/path/to/video.webm" type="video/webm">
136-
```
137-
138-
You may optionally use the last `/` as the separator between connection and stream strings, for example:
126+
Flash is no longer supported as it has reached [flash-eol][end of life]
139127

140-
```html
141-
<source src="rtmp://your.streaming.provider.net/cfx/st/mp4:video.mp4" type="rtmp/mp4">
142-
```
143-
144-
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.
151-
152-
[flash]: https://github.com/videojs/videojs-flash
128+
[flash-eol]: https://www.adobe.com/products/flashplayer/end-of-life.html
153129

154130
[hls]: https://github.com/videojs/videojs-contrib-hls
155131

132+
[http-streaming]: https://github.com/videojs/http-streaming
133+
156134
[mse]: https://en.wikipedia.org/wiki/Media_Source_Extensions
157135

158136
[youtube]: https://github.com/videojs/videojs-youtube

docs/guides/text-tracks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ metadataTrack.addEventListener('cuechange', function() {
163163

164164
## Emulated Text Tracks
165165

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. 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.
167167

168168
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.
169169

0 commit comments

Comments
 (0)