-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Clear error code needed for bad MIME type in addTextTrack #1782
Comments
After some more troubleshooting, it looks like I had the incorrect mime type, |
Hello @kevinscroggins-youi , we don't have access to your content. Do you have it whitelisted? |
That's very strange, I don't believe there's any sort of whitelisting. Tried it on a VPN to make sure. The VTT file doesn't actually match the video, so any video asset and closed caption file can be used in its place if that helps. The main issue is that if the mime type is incorrect, there doesn't seem to be any sort of informative error handling. Hope this helps. |
@kevinscroggins-youi thank you again for providing an example via JSFiddle. The source of your problem is that you are using "text/webvtt" but our parse is registered under "text/vtt". If you change the mime type to "text/vtt" it works (edited JSFiddle). Once you have a chance to verify it, please feel free to close the issue. |
In my opinion, if there's not a clear error code for this, we should add one. I suggest adding error code |
@vaage No problem! And yes I'm aware of the mime issue, I discovered that shortly after and left a follow up comment that you might have missed. It does indeed work with the correct mime type of @joeyparrish That sounds perfect! |
With the latest changes there are already error codes in addTextTrack and addTextTrackAsync |
There are some error codes, but if you pass a random MIME argument, it will still add the track and fail later. |
I created #3110 to resolve it |
Have you read the FAQ and checked for duplicate open issues?
Yes, checked open issues as well.
What version of Shaka Player are you using?
2.4.6
Can you reproduce the issue with our latest release version?
Yes, 2.5.0-beta2 as well
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
Custom
If custom app, can you reproduce the issue using our demo app?
No, since you can't load an external text track from file.
What browser and OS are you using?
Tizen Emulator and Google Chrome 71 on OSX 10.13.6
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Tizen Emulator with 4.0 Web Platform currently, but not strictly limited to this platform.
What are the manifest and license server URIs?
What did you do?
Tried to add an external WebVTT2 text track after the video successfully loads.
Fiddle: https://jsfiddle.net/8Lu0trec
What did you expect to happen?
I expected the text track to load successfully and have the player report that there is one text track when queried.
What actually happened?
The WebVTT2 external text track file failed to load and three different unexpected errors appeared in the console, including a crash. Not sure if WebVTT2 is unsupported or if there's a different issue here, but the error handling / data validation seems to be failing in any case.
EDIT: According to the documentation, this function is supposed to be called in the resolve() promise of the player.load() function, so hopefully I have it implemented correctly?
Console output:
The text was updated successfully, but these errors were encountered: