Merge pull request #48 from videojs/readmecredentials
add section in README re:withCredentials
Showing
1 changed file
with
18 additions
and
0 deletions
... | @@ -49,6 +49,24 @@ support for: | ... | @@ -49,6 +49,24 @@ support for: |
49 | - Segment codecs _other than_ H.264 with AAC audio | 49 | - Segment codecs _other than_ H.264 with AAC audio |
50 | - Internet Explorer < 10 | 50 | - Internet Explorer < 10 |
51 | 51 | ||
52 | ### Plugin Options | ||
53 | |||
54 | You may pass in an options object to the hls plugin upon initialization. This | ||
55 | object may contain one of the following properties: | ||
56 | |||
57 | #### withCredentials | ||
58 | Type: `boolean` | ||
59 | |||
60 | When the `withCredentials` property is set to `true`, all XHR requests for | ||
61 | manifests and segments would have `withCredentials` set to `true` as well. This | ||
62 | enables storing and passing cookies from the server that the manifests and | ||
63 | segments live on. This has some implications on CORS because when set, the | ||
64 | `Access-Control-Allow-Origin` header cannot be set to `*`, also, the response | ||
65 | headers require the addition of `Access-Control-Allow-Credentials` header which | ||
66 | is set to `true`. | ||
67 | See [html5rocks's article](http://www.html5rocks.com/en/tutorials/cors/) | ||
68 | for more info | ||
69 | |||
52 | ### Runtime Properties | 70 | ### Runtime Properties |
53 | #### player.hls.master | 71 | #### player.hls.master |
54 | Type: `object` | 72 | Type: `object` | ... | ... |
-
Please register or sign in to post a comment