update components

This commit is contained in:
Luke Pulverenti 2016-03-14 13:06:02 -04:00
parent ed63dd2039
commit ea6332ed7d
13 changed files with 38 additions and 35 deletions

View file

@ -86,7 +86,7 @@ class LevelController extends EventHandler {
}
hls.trigger(Event.MANIFEST_PARSED, {levels: this._levels, firstLevel: this._firstLevel, stats: data.stats});
} else {
hls.trigger(Event.ERROR, {type: ErrorTypes.NETWORK_ERROR, details: ErrorDetails.MANIFEST_PARSING_ERROR, fatal: true, url: hls.url, reason: 'no compatible level found in manifest'});
hls.trigger(Event.ERROR, {type: ErrorTypes.MEDIA_ERROR, details: ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR, fatal: true, url: hls.url, reason: 'no level with compatible codecs found in manifest'});
}
return;
}

View file

@ -1,10 +1,10 @@
export const ErrorTypes = {
// Identifier for a network error (loading error / timeout ...)
NETWORK_ERROR: 'hlsNetworkError',
NETWORK_ERROR: 'networkError',
// Identifier for a media Error (video/parsing/mediasource error)
MEDIA_ERROR: 'hlsMediaError',
MEDIA_ERROR: 'mediaError',
// Identifier for all other errors
OTHER_ERROR: 'hlsOtherError'
OTHER_ERROR: 'otherError'
};
export const ErrorDetails = {
@ -14,6 +14,8 @@ export const ErrorDetails = {
MANIFEST_LOAD_TIMEOUT: 'manifestLoadTimeOut',
// Identifier for a manifest parsing error - data: { url : faulty URL, reason : error reason}
MANIFEST_PARSING_ERROR: 'manifestParsingError',
// Identifier for a manifest with only incompatible codecs error - data: { url : faulty URL, reason : error reason}
MANIFEST_INCOMPATIBLE_CODECS_ERROR: 'manifestIncompatibleCodecsError',
// Identifier for playlist load error - data: { url : faulty URL, response : XHR response}
LEVEL_LOAD_ERROR: 'levelLoadError',
// Identifier for playlist load timeout - data: { url : faulty URL, response : XHR response}