Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
videojs-contrib-hls
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d18e7c0b
authored
2014-03-14 16:05:10 -0400
by
Gary Katsevman
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Make plugin options accessible by xhr helper
1 parent
d5f938a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
src/videojs-hls.js
src/videojs-hls.js
View file @
d18e7c0
...
...
@@ -31,6 +31,9 @@ videojs.hls = {
};
var
pluginOptions
,
// the desired length of video to maintain in the buffer, in seconds
goalBufferLength
=
5
,
...
...
@@ -109,11 +112,21 @@ var
method
:
'GET'
},
request
;
if
(
typeof
callback
!==
'function'
)
{
callback
=
function
()
{};
}
if
(
typeof
url
===
'object'
)
{
options
=
videojs
.
util
.
mergeOptions
(
options
,
url
);
url
=
options
.
url
;
}
request
=
new
window
.
XMLHttpRequest
();
if
(
pluginOptions
.
withCredentials
)
{
request
.
withCredentials
=
true
;
}
request
.
open
(
options
.
method
,
url
);
request
.
onreadystatechange
=
function
()
{
// wait until the request completes
...
...
@@ -299,6 +312,8 @@ var
return
;
}
pluginOptions
=
options
||
{};
srcUrl
=
(
function
()
{
var
extname
,
...
...
Please
register
or
sign in
to post a comment