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

Handle "Uncaught error: no bytes available" #51

Closed
fostertheweb opened this issue Nov 2, 2015 · 7 comments
Closed

Handle "Uncaught error: no bytes available" #51

fostertheweb opened this issue Nov 2, 2015 · 7 comments
Labels

Comments

@fostertheweb
Copy link

https://github.com/dailymotion/hls.js/blob/master/src/demux/exp-golomb.js#L26

Intermittently I run into the issue where availableBytes equals 0, the video stops, and I have to manually start it again through my application so it reloads the video.

When this error is thrown the source is the blob file, so I don't know how to catch and handle the error in my code. What actually causes availableBytes to equal 0? Is there a way to recover the stream or avoid this issue?

Using hls.js 0.2.1 inside electron

@mangui
Copy link
Member

mangui commented Nov 2, 2015

@fostertheweb you can eventually disable the worker to get more clue on the issue: https://github.com/dailymotion/hls.js/blob/master/API.md#enableworker
var hls = new Hls( { enableWorker:false});

if you could share a sample stream it would help as well.

@mangui mangui added the Bug label Nov 2, 2015
@fostertheweb
Copy link
Author

@mangui after setting enableWorker: false when the error happens it points to line 26 of exp-golomb.js instead of a blob file as the source of the error.

I'm using an API to get an HLS URI and passing that to loadSource()

@mangui
Copy link
Member

mangui commented Nov 3, 2015

ok could you share a stream URI with which I can repro ?

@fostertheweb
Copy link
Author

http://video-edge-835e40.ord02.hls.ttvnw.net/hls-8c734c/scarra_17468456800_…edge-835e40.ord02,fmt=chunked&sig=1ae62b607e09f1e4c21d3a7f9d28bf291f6410b1

That is the URI from the m3u8 playlist file.

It is for a channel currently streaming on Twitch.tv, if the channel is not streaming when you see this there are many ways to get another URL

This blog post details how to retrieve the URL.

There are also a few packages on npm doing the same thing:

mangui referenced this issue Nov 6, 2015
… video MP4 segment

Follow suggestion from https://code.google.com/p/chromium/issues/detail?id=229412#c45
mark first video sample as being a sync point
also remove slice type detection on NDR NALu, it is not needed with FF, and the Chrome workaround obsoletes this check
related to https://github.com/dailymotion/hls.js/issues/23
related to https://github.com/dailymotion/hls.js/issues/51 (on Twitch, some fragments don't start with KeyFrame)
mangui added a commit that referenced this issue Nov 6, 2015
window.chrome is not available in WebWorker ...
related to #23
related to #51
@mangui
Copy link
Member

mangui commented Nov 6, 2015

@fostertheweb
your streams should now work. plz recheck and close the ticket if everything is running fine on your side.

@fostertheweb
Copy link
Author

awesome work, not experiencing the problem anymore. okay to close, but should the version number be bumped?

@mangui
Copy link
Member

mangui commented Nov 7, 2015

Yes, this is worth it. Will do next week

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

No branches or pull requests

2 participants