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
425d7a72
authored
2015-11-25 17:12:51 -0600
by
Katrina Ellison Geltman
Committed by
David LaPalomento
2016-01-19 10:20:41 -0500
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add support for status code 206 in videojs.Hls.xhr responses
1 parent
2a8faddc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
src/xhr.js
src/xhr.js
View file @
425d7a7
...
...
@@ -28,9 +28,13 @@
request
.
timedout
=
false
;
}
// videojs.xhr no longer consider status codes outside of 200 and 0 (for file uris) to be
// errors but the old XHR did so emulate that behavior
if
(
!
error
&&
response
.
statusCode
!==
200
&&
response
.
statusCode
!==
0
)
{
// videojs.xhr no longer considers status codes outside of 200 and 0
// (for file uris) to be errors, but the old XHR did, so emulate that
// behavior. Status 206 may be used in response to byterange requests.
if
(
!
error
&&
response
.
statusCode
!==
200
&&
response
.
statusCode
!==
206
&&
response
.
statusCode
!==
0
)
{
error
=
new
Error
(
'XHR Failed with a response of: '
+
(
request
&&
(
request
.
response
||
request
.
responseText
)));
}
...
...
Please
register
or
sign in
to post a comment