Currently the entire decoder runs on the web page's main JavaScript context -- the browser's UI thread. Especially on slower CPUs such as ARM phones and tablets this really hurts the responsiveness of the page, and it probably hurts audio output as well.
The entire decoder should be able to run in a Worker thread pretty easily. It can handle its network input with an XHR directly, and can send ArrayBuffers of pixel & audio data back up to the web page via postMessage() with the transferrable option to avoid extra data copies.
该提问来源于开源项目:brion/ogv.js