videojs/videojs-contrib-hls — pull request #11 by dmlap (2014-02-12 22:42:37+00:00)
Title: Yield control to the browser between appending FLV tags

Pushing an entire segment worth of FLV tags into the source buffer at once caused noticeable delays with high-bitrate segments. Instead, wrap each call to appendBuffer in a setTimeout of zero so that the browser has a chance to render frames while the segment is being transferred to the SWF. Make sure that appends-in-progress are cleared if a seek is initiated.

### Caveats to this PR

- There are now two asynchronous processes involved in buffering: downloading segments and appending FLV tags into the buffer. Conceptually, operation is much more complicated.
- buffered time reported by the player is no longer guaranteed to be all downloaded data when `appendBuffer` tasks are still queued. That means we'll probably download an extra segment while the tag queue is being drained.