Vidgyor player mainly emits six types of errors.
- MEDIA_ERR_CUSTOM
- MEDIA_ERR_ABORTED
- MEDIA_ERR_NETWORK
- MEDIA_ERR_DECODE
- MEDIA_ERR_SRC_NOT_SUPPORTED
- MEDIA_ERR_ENCRYPTED
Let's look at when the above errors will get fired in the player life cycle.
Any custom error that the developer wants to throw to users.
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.
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.
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.
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.
The media is encrypted and we do not have the keys to decrypt it.