4e06dad2 by David LaPalomento

The plugin is now a tech

Update language in the README to reflect the new project organization.
1 parent 2318f8d7
Showing 1 changed file with 24 additions and 13 deletions
1 # video.js HLS Plugin 1 # video.js HLS Tech
2 2
3 A video.js plugin that plays HLS video on platforms that don't support it but have Flash. 3 A video.js tech that plays HLS video on platforms that don't support it but have Flash.
4 4
5 [![Build Status](https://travis-ci.org/videojs/videojs-contrib-hls.svg?branch=master)](https://travis-ci.org/videojs/videojs-contrib-hls) 5 [![Build Status](https://travis-ci.org/videojs/videojs-contrib-hls.svg?branch=master)](https://travis-ci.org/videojs/videojs-contrib-hls)
6 6
7 ## Getting Started 7 ## Getting Started
8 Download the [plugin](https://github.com/videojs/videojs-contrib-hls/releases). On your web page: 8 Download the [tech](https://github.com/videojs/videojs-contrib-hls/releases). On your web page:
9 9
10 ```html 10 ```html
11 <script src="video.js"></script> 11 <script src="video.js"></script>
12 <script src="videojs-hls.min.js"></script> 12 <script src="videojs-hls.min.js"></script>
13 <script> 13 <script>
14 var player = videojs('video'); 14 var player = videojs('video', {
15 player.hls('http://example.com/video.m3u8'); 15 techOrder: ['html5', 'hls', 'flash']
16 });
16 player.play(); 17 player.play();
17 </script> 18 </script>
18 ``` 19 ```
...@@ -34,13 +35,13 @@ position of having to maintain alternate renditions of the same video ...@@ -34,13 +35,13 @@ position of having to maintain alternate renditions of the same video
34 and potentially having to forego HTML-based video entirely to provide 35 and potentially having to forego HTML-based video entirely to provide
35 the best desktop viewing experience. 36 the best desktop viewing experience.
36 37
37 This plugin attempts to address that situation by providing a polyfill 38 This tech attempts to address that situation by providing a polyfill
38 for HLS on browsers that have Flash support. You can deploy a single 39 for HLS on browsers that have Flash support. You can deploy a single
39 HLS stream, code against the regular HTML5 video APIs, and create a 40 HLS stream, code against the regular HTML5 video APIs, and create a
40 fast, high-quality video experience across all the big web device 41 fast, high-quality video experience across all the big web device
41 categories. 42 categories.
42 43
43 The videojs-hls plugin is still working towards a 1.0 release so it 44 The videojs-hls tech is still working towards a 1.0 release so it
44 may not fit your requirements today. Specifically, there is _no_ 45 may not fit your requirements today. Specifically, there is _no_
45 support for: 46 support for:
46 47
...@@ -49,10 +50,20 @@ support for: ...@@ -49,10 +50,20 @@ support for:
49 - Segment codecs _other than_ H.264 with AAC audio 50 - Segment codecs _other than_ H.264 with AAC audio
50 - Internet Explorer < 10 51 - Internet Explorer < 10
51 52
52 ### Plugin Options 53 ### Options
53 54
54 You may pass in an options object to the hls plugin upon initialization. This 55 You may pass in an options object to the hls tech at player
55 object may contain one of the following properties: 56 initialization. You can pass in options just like you would for any
57 other tech:
58
59 ```javascript
60 videojs(video, {
61 techOrder: ['hls'],
62 hls: {
63 withCredentials: true
64 }
65 });
66 ```
56 67
57 #### withCredentials 68 #### withCredentials
58 Type: `boolean` 69 Type: `boolean`
...@@ -98,7 +109,7 @@ The index of the next video segment to be downloaded from ...@@ -98,7 +109,7 @@ The index of the next video segment to be downloaded from
98 Type: `function` 109 Type: `function`
99 110
100 A function that returns the media playlist object to use to download 111 A function that returns the media playlist object to use to download
101 the next segment. It is invoked by the plugin immediately before a new 112 the next segment. It is invoked by the tech immediately before a new
102 segment is downloaded. You can override this function to provide your 113 segment is downloaded. You can override this function to provide your
103 adaptive streaming logic. You must, however, be sure to return a valid 114 adaptive streaming logic. You must, however, be sure to return a valid
104 media playlist object that is present in `player.hls.master`. 115 media playlist object that is present in `player.hls.master`.
...@@ -111,7 +122,7 @@ Fired after the first media playlist is downloaded for a stream. ...@@ -111,7 +122,7 @@ Fired after the first media playlist is downloaded for a stream.
111 #### loadedmanifest 122 #### loadedmanifest
112 123
113 Fired immediately after a new master or media playlist has been 124 Fired immediately after a new master or media playlist has been
114 downloaded. By default, the plugin only downloads playlists as they 125 downloaded. By default, the tech only downloads playlists as they
115 are needed. 126 are needed.
116 127
117 ### Testing 128 ### Testing
...@@ -134,7 +145,7 @@ Possible options are: ...@@ -134,7 +145,7 @@ Possible options are:
134 * `ie` 145 * `ie`
135 146
136 ## Hosting Considerations 147 ## Hosting Considerations
137 Unlike a native HLS implementation, the HLS plugin has to comply with 148 Unlike a native HLS implementation, the HLS tech has to comply with
138 the browser's security policies. That means that all the files that 149 the browser's security policies. That means that all the files that
139 make up the stream must be served from the same domain as the page 150 make up the stream must be served from the same domain as the page
140 hosting the video player or from a server that has appropriate [CORS 151 hosting the video player or from a server that has appropriate [CORS
......