Issue 379: TypeError: Cannot read properties of undefined (reading 'trim')
Pull request type
What is the current behavior?
Vime's HLS provider throws an error when attempting to load on the latest version of HLS.js in Safari:
TypeError: Cannot read properties of undefined (reading 'trim')
This appears to be related to how HLS generates an object URL (blob:) and thus the source element fails the HLS file extension and content-type tests when this happens.
What is the new behavior?
Added a cache for storing the last known good HLS source URL and if one exists when the source isn't able to be found we return that one.
Does this introduce a breaking change?
- [ ] Yes
- [x] No
Other information
I had to pin the version of @types/node to what it was because the newest version is causing TypeScript build errors, hence the lock file changes.
I've put screenshots and reasoning into the issue and tested with Svelte on Safari and Chrome. Let me know if anything needs to change!
https://github.com/vime-js/vime/issues/379#issuecomment-2242882706 https://github.com/vime-js/vime/issues/379#issuecomment-2244085930
@zshall is attempting to deploy a commit to the Vidstack Team on Vercel.
A member of the Team first needs to authorize it.