-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Improvement: Player should fire an error event when the source cannot be played #746
Comments
We need to do some research into the right way to handle this situation according to the spec. Browsers don't appear to throw any errors in this situation, so an error may not be right. But there should be some kind of notification or way to customize this situation. |
The resource selection algo should be the first place to look to verity how it should be handled. |
Item 6 in your link shows that the resource should fire a MediaError with the code attribute MEDIA_ERR_SRC_NOT_SUPPORTED, but I don't know if that's happening. Another method is to determine the codecs and filetypes of the media files before adding them to the src and perform a quick check against the video element using something like this code:
|
Wrapped this up into #869. |
This issue should be fixed now as of #1197 |
The player.src function should trigger an error event when the source cannot be played. This event will allow a developer to use custom fallbacks or display other messages than the notSupportedMessage.
The code below is an example. Please feel free to code it as you would see fit. It may be useful to use an Error object with additional appropriate information.
player.js (~lines 733-755)
The text was updated successfully, but these errors were encountered: