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
e7ae98e1
authored
2014-09-15 16:31:00 -0700
by
Alex Rubin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix timeouts
1 parent
0337945d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
src/xhr.js
src/xhr.js
View file @
e7ae98e
...
...
@@ -42,20 +42,12 @@
request
.
withCredentials
=
true
;
}
if
(
options
.
timeout
)
{
if
(
request
.
timeout
===
0
)
{
request
.
timeout
=
options
.
timeout
;
request
.
ontimeout
=
function
()
{
abortTimeout
=
window
.
setTimeout
(
function
()
{
if
(
request
.
readyState
!==
4
)
{
request
.
timedout
=
true
;
};
}
else
{
// polyfill XHR2 by aborting after the timeout
abortTimeout
=
window
.
setTimeout
(
function
()
{
if
(
request
.
readyState
!==
4
)
{
request
.
timedout
=
true
;
request
.
abort
();
}
},
options
.
timeout
);
}
request
.
abort
();
}
},
options
.
timeout
);
}
request
.
onreadystatechange
=
function
()
{
...
...
Please
register
or
sign in
to post a comment