jhiesey / videostream

Play html5 video when from a file-like object
MIT License
247 stars 73 forks source link

Backpressure doesn't work properly #7

Closed jhiesey closed 8 years ago

jhiesey commented 9 years ago

Currently backpressure is only applied once the browser starts throwing exceptions indicating that too much data is buffered. This is causing very high cpu usage in chrome and is just very inelegant in general.

Instead the amount of data given to the browser should be limited directly, by counting the number of bytes, frames, or seconds currently buffered. Figuring out how to do this elegantly may be a bit complex.

feross commented 9 years ago

:+1: Lmk if you want to work on this together, or discuss how to do it!

jhiesey commented 8 years ago

Fixed in the rewrite.