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

FLAC streams stop on Chromecast / Firestick #93

Closed
eshaz opened this issue Nov 30, 2021 · 0 comments · Fixed by #95
Closed

FLAC streams stop on Chromecast / Firestick #93

eshaz opened this issue Nov 30, 2021 · 0 comments · Fixed by #95
Labels
bug Something isn't working

Comments

@eshaz
Copy link
Owner

eshaz commented Nov 30, 2021

MediaSource has a very small buffer size on devices like Chromecast or Firestick. Some FLAC streams reach this limit due to a large burst on connect value and throw a QuotaExceededError that is currently not handled and stops playback.

Potential solutions:

  • Only append n seconds of audio to the SourceBuffer and store the rest in a separate queue.
  • Append audio until a QuotaExceededError is encountered, and the save the audio to a separate queue.
    • This is probably the ideal solution since this will be guaranteed to handle any QuotaExceededError without needing to track an arbitrary buffer second value. This obviously won't work if another MSE supporting platform doesn't throw the same error type.

The queueing will need to happen after the frame sync logic, and any audio in this separate queue should be considered "buffered" for playback.

See: https://developers.google.com/web/updates/2017/10/quotaexceedederror

@eshaz eshaz closed this as completed in #95 Dec 1, 2021
@eshaz eshaz added the bug Something isn't working label Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant