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

Uncaught (in promise) DOMException: Failed to load because no supported source was found. #849

Closed
freeall opened this issue Jun 30, 2016 · 4 comments
Labels
bug

Comments

@freeall
Copy link

@freeall freeall commented Jun 30, 2016

  • WebTorrent version: 0.95.2
  • Node.js version: 5.10.1

I think .appendTo is currently broken and it doesn't correctly call its callback when loading errors occur. I use it like this:

file.appendTo('body', function (err, elem) {
  console.log('appendTo', err, elem)
})

But my callback is never called and I get this instead:
image

(note that there's no stacktrace)

The result is that it's not possible to give a good error message to the user when loading errors happen. Maybe it's a problem in a subdependency?

@freeall

This comment has been minimized.

Copy link
Author

@freeall freeall commented Jun 30, 2016

Hmm, wait. It appears to just happen very slowly at times.
I was confused because the element was actually visible. I'll try to hide it until the callback is called instead.

@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 23, 2016

Ah, this is happening because the render functionality is trying multiple methods of playing back the video:

  • videostream -- best, supports streaming with seeking, only works with MP4 for now
  • mediasource -- supports more formats, supports streaming, but no seeking
  • blob -- supports the most formats of all, with seeking, but no streaming (entire file must be downloaded first)

What's happening is that your media file is falling back to the blob approach, so it's waiting for a long time -- downloading potentially 100s of MBs before it realizes it can't play the format.

I just opened an issue on render-media to set a sane cap: feross/render-media#18

@feross feross closed this Jul 23, 2016
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jul 23, 2016

This is fixed in render-media 2.7.0. Now, the blob url strategy will not be attempted if the file is larger than 100MB, so you'll get an error in a more reasonable amount of time.

You can re-install webtorrent to get the fix.

@feross feross added the bug label Jul 23, 2016
@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.