Skip to content
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

Parser failing with blob url #150

Open
nikosgpet opened this issue Sep 29, 2021 · 0 comments
Open

Parser failing with blob url #150

nikosgpet opened this issue Sep 29, 2021 · 0 comments

Comments

@nikosgpet
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant