Skip to content

Instantly share code, notes, and snippets.

@GiriAakula
Last active June 2, 2022 14:12
Show Gist options
  • Save GiriAakula/0e91b05acf1da6e31bcecc771d4b1e61 to your computer and use it in GitHub Desktop.
Save GiriAakula/0e91b05acf1da6e31bcecc771d4b1e61 to your computer and use it in GitHub Desktop.
Vidgyor_Error_Types_Web_Video_Player.md

Vidgyor Video Player - Error Types

Vidgyor player mainly emits six types of errors.

  1. MEDIA_ERR_CUSTOM
  2. MEDIA_ERR_ABORTED
  3. MEDIA_ERR_NETWORK
  4. MEDIA_ERR_DECODE
  5. MEDIA_ERR_SRC_NOT_SUPPORTED
  6. MEDIA_ERR_ENCRYPTED

Let's look at when the above errors will get fired in the player life cycle.

MEDIA_ERR_CUSTOM

Any custom error that the developer wants to throw to users.

MEDIA_ERR_ABORTED

The fetching of the associated resource was aborted by the user's request.

This error might get triggered upon users response. This usually fires due to bad DOM manipulations.

MEDIA_ERR_NETWORK

A network error caused the media download to fail part-way.

Some kind of network error occurred which prevented the media from being successfully fetched, despite having previously been available.

This error usually gets fired when the users have poor network connection.

MEDIA_ERR_DECODE

The media playback was aborted due to a corruption problem or because the media used features your browser did not support.

Despite having previously been determined to be usable, an error occurred while trying to decode the media resource, resulting in an error.

This error usually gets fired when there is a corrupted file being used for playback or when there is an issue in transcoding of stream.

MEDIA_ERR_SRC_NOT_SUPPORTED

The media could not be loaded, either because the server or network failed or because the format is not supported.

The associated resource or media provider (such as a MediaStream) has been found to be unsuitable.

This is the most common error users might face. This happens when the stream server returns something that is not expected by player. The possible solution is to check whether the stream is up and it is working properly.

MEDIA_ERR_ENCRYPTED

The media is encrypted and we do not have the keys to decrypt it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment