Bugzilla – Bug 18963
Provide a mechanism for rate limiting appending
Last modified: 2012-12-06 01:57:00 UTC
This bug is the result of discussions around Bug 16998
Currently there is no mechanism for the UA to signal that it wants the web application to stop appending for a while. A UA might want to do this in a memory constrained environment to help the web application avoid appending "too far ahead" which might trigger media segment eviction (Section 2.10).
It could be useful to have a mechanism that notifies the application when further appends will trigger evictions so the web application could use remove() (https://www.w3.org/Bugs/Public/show_bug.cgi?id=18709) to control what time ranges get removed. When the UA determines that enough data has been removed to allow appending again it can notify the application with an event.
Based on discussions at TPAC (http://www.w3.org/2012/11/01-html-wg-minutes.html), it was decided to have append() throw an exception when the SourceBuffer is full. The application can use remove() to free up space in the buffer and try again.
I plan on updating the spec text for append() to say that a QUOTA_EXCEEDED_ERR should be thrown if the SourceBuffer doesn't have space available to accommodate the data in the append.