Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature cleanup errors #3631

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,6 @@ declare namespace dashjs {
MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE: 10;
MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE: 11;
XLINK_LOADER_LOADING_FAILURE_ERROR_CODE: 12;
SEGMENTS_UPDATE_FAILED_ERROR_CODE: 13;
SEGMENTS_UNAVAILABLE_ERROR_CODE: 14;
SEGMENT_BASE_LOADER_ERROR_CODE: 15;
TIME_SYNC_FAILED_ERROR_CODE: 16;
FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE: 17;
Expand Down Expand Up @@ -764,8 +762,6 @@ declare namespace dashjs {
code: MediaPlayerErrors['MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE'] |
MediaPlayerErrors['MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE'] |
MediaPlayerErrors['XLINK_LOADER_LOADING_FAILURE_ERROR_CODE'] |
MediaPlayerErrors['SEGMENTS_UPDATE_FAILED_ERROR_CODE'] |
MediaPlayerErrors['SEGMENTS_UNAVAILABLE_ERROR_CODE'] |
MediaPlayerErrors['SEGMENT_BASE_LOADER_ERROR_CODE'] |
MediaPlayerErrors['TIME_SYNC_FAILED_ERROR_CODE'] |
MediaPlayerErrors['FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE'] |
Expand Down
2 changes: 0 additions & 2 deletions samples/dash-if-reference-player/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ app.controller('DashController', ['$scope', '$window', 'sources', 'contributors'
case dashjs.MediaPlayer.errors.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE:
case dashjs.MediaPlayer.errors.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE:
case dashjs.MediaPlayer.errors.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE:
case dashjs.MediaPlayer.errors.SEGMENTS_UPDATE_FAILED_ERROR_CODE:
case dashjs.MediaPlayer.errors.SEGMENTS_UNAVAILABLE_ERROR_CODE:
case dashjs.MediaPlayer.errors.SEGMENT_BASE_LOADER_ERROR_CODE:
case dashjs.MediaPlayer.errors.TIME_SYNC_FAILED_ERROR_CODE:
case dashjs.MediaPlayer.errors.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE:
Expand Down
2 changes: 0 additions & 2 deletions samples/offline/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ app.controller('DashController', function ($scope, $timeout, $q, sources, contri
case dashjs.MediaPlayer.errors.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE:
case dashjs.MediaPlayer.errors.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE:
case dashjs.MediaPlayer.errors.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE:
case dashjs.MediaPlayer.errors.SEGMENTS_UPDATE_FAILED_ERROR_CODE:
case dashjs.MediaPlayer.errors.SEGMENTS_UNAVAILABLE_ERROR_CODE:
case dashjs.MediaPlayer.errors.SEGMENT_BASE_LOADER_ERROR_CODE:
case dashjs.MediaPlayer.errors.TIME_SYNC_FAILED_ERROR_CODE:
case dashjs.MediaPlayer.errors.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE:
Expand Down
73 changes: 63 additions & 10 deletions src/core/errors/Errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,64 +36,118 @@ import ErrorsBase from './ErrorsBase';
class Errors extends ErrorsBase {
constructor () {
super();

/**
* Error code returned when a manifest parsing error occurs
*/
this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE = 10;

/**
* Error code returned when a manifest loading error occurs
*/
this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE = 11;

/**
* Error code returned when a xlink loading error occurs
*/
this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE = 12;

/**
* Error code returned when the update of segments list has failed
* Error code returned when no segment ranges could be determined from the sidx box
*/
this.SEGMENTS_UPDATE_FAILED_ERROR_CODE = 13;
this.SEGMENTS_UNAVAILABLE_ERROR_CODE = 14;
this.SEGMENT_BASE_LOADER_ERROR_CODE = 15;

/**
* Error code returned when the time synchronization failed
*/
this.TIME_SYNC_FAILED_ERROR_CODE = 16;

/**
* Error code returned when loading a fragment failed
*/
this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE = 17;

/**
* Error code returned when the FragmentLoader did not receive a request object
*/
this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE = 18;

/**
* Error code returned when the BaseUrl resolution failed
*/
this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE = 19;

/**
* Error code returned when the append operation in the SourceBuffer failed
*/
this.APPEND_ERROR_CODE = 20;

/**
* Error code returned when the remove operation in the SourceBuffer failed
*/
this.REMOVE_ERROR_CODE = 21;

/**
* Error code returned when updating the internal objects after loading an MPD failed
*/
this.DATA_UPDATE_FAILED_ERROR_CODE = 22;

/**
* Error code returned when MediaSource is not supported by the browser
*/
this.CAPABILITY_MEDIASOURCE_ERROR_CODE = 23;

/**
* Error code returned when Protected contents are not supported
*/
this.CAPABILITY_MEDIAKEYS_ERROR_CODE = 24;

/**
* Error code returned when loading the manifest failed
*/
this.DOWNLOAD_ERROR_ID_MANIFEST_CODE = 25;

/**
* Error code returned when loading the sidx failed
*/
this.DOWNLOAD_ERROR_ID_SIDX_CODE = 26;

/**
* Error code returned when loading the media content failed
*/
this.DOWNLOAD_ERROR_ID_CONTENT_CODE = 27;

/**
* Error code returned when loading the init segment failed
*/
this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE = 28;

/**
* Error code returned when loading the XLink content failed
*/
this.DOWNLOAD_ERROR_ID_XLINK_CODE = 29;

this.MANIFEST_ERROR_ID_CODEC_CODE = 30;
/**
* Error code returned when parsing the MPD resulted in a logical error
*/
this.MANIFEST_ERROR_ID_PARSE_CODE = 31;

/**
* Error code returned when no stream (period) has been detected in the manifest
*/
this.MANIFEST_ERROR_ID_NOSTREAMS_CODE = 32;

/**
* Error code returned when something wrong has append during subtitles parsing (TTML or VTT)
* Error code returned when something wrong has happened during parsing and appending subtitles (TTML or VTT)
*/
this.TIMED_TEXT_ERROR_ID_PARSE_CODE = 33;

/**
* Error code returned when a 'muxed' media type has been detected in the manifest. This type is not supported
*/

this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE = 34;

/**
* Error code returned when a media source type is not supported
*/
Expand All @@ -104,14 +158,13 @@ class Errors extends ErrorsBase {
this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE = 'Failed loading Xlink element: ';
this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE = 'Segments update failed';
this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE = 'no segments are available yet';
this.SEGMENT_BASE_LOADER_ERROR_MESSAGE = 'error loading segments';
this.TIME_SYNC_FAILED_ERROR_MESSAGE = 'Failed to synchronize time';
this.SEGMENT_BASE_LOADER_ERROR_MESSAGE = 'error loading segment ranges from sidx';
this.TIME_SYNC_FAILED_ERROR_MESSAGE = 'Failed to synchronize client and server time';
this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE = 'request is null';
this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE = 'Failed to resolve a valid URL';
this.APPEND_ERROR_MESSAGE = 'chunk is not defined';
this.REMOVE_ERROR_MESSAGE = 'buffer is not defined';
this.REMOVE_ERROR_MESSAGE = 'Removing data from the SourceBuffer';
this.DATA_UPDATE_FAILED_ERROR_MESSAGE = 'Data update failed';

this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE = 'mediasource is not supported';
this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE = 'mediakeys is not supported';
this.TIMED_TEXT_ERROR_MESSAGE_PARSE = 'parsing error :';
Expand All @@ -120,4 +173,4 @@ class Errors extends ErrorsBase {
}

let errors = new Errors();
export default errors;
export default errors;
Loading