d18e7c0b by Gary Katsevman

Make plugin options accessible by xhr helper

1 parent d5f938a0
......@@ -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,
......