Parser failing with blob url
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- audio-video-rtc
Research direction
Start by reproducing the blob URL case from the issue, then read resolve-url.js and the buildBaseUrls/inheritAttributes path shown in the stack trace. Determine why the blob URL is rejected during MPD parsing; done means the supplied blob URL no longer throws Invalid URL and the parser handles it successfully.
Written by the indexing model from the issue text.
Description
I am using video.js which calls the mpd-parser in the background. An error occurs in mpd-parser if I call video.js with a blob url of an .mpd file, instead of a url from the internet.
I create the url as follows:
const blob = new Blob([mpdContents], {type: 'application/dash+xml'})
const url = URL.createObjectURL(blob)
It throws the following error:
resolve-url.js?fd22:31 Uncaught TypeError: Failed to construct 'URL': Invalid URL
at resolveUrl (resolve-url.js?fd22:31)
at eval (mpd-parser.es.js?2202:1601)
at Array.map (<anonymous>)
at eval (mpd-parser.es.js?2202:1600)
at Array.map (<anonymous>)
at buildBaseUrls (mpd-parser.es.js?2202:1599)
at inheritAttributes (mpd-parser.es.js?2202:2063)
at parse (mpd-parser.es.js?2202:2176)
at parseMasterXml (video.es.js?7ac5:31399)
at DashPlaylistLoader.handleMaster_ (video.es.js?7ac5:32020)
at eval (video.es.js?7ac5:31929)
at callbackWrapper (video.es.js?7ac5:30636)
at Object.eval [as callback] (video.es.js?7ac5:30661)
at cbOnce (index.js?b664:104)
at XMLHttpRequest.loadFunc (index.js?b664:178)
Are blob urls supported ? It would be great if they were :)
- Dominant language
- JavaScript
- Stars
- 88
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from videojs/mpd-parser
-
The version of @xmldom/xmldom currently relied upon by mpd-parser has a critical vulnerability. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
videojs/mpd-parser#189 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
videojs/mpd-parser#185 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
videojs/mpd-parser#183 ·
-
Multi audio track Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 30/100
videojs/mpd-parser#182 · 6 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
videojs/mpd-parser#180 ·
All issues in videojs/mpd-parser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·