2 Nov 2011 02:38
Re: Proposal: Remove canplaythrough event from audio/video tag
On Nov 1, 2011, at 3:10 PM, Victoria Kirst wrote: > - *What are some real examples of how canplaythrough is useful for a web > developer?* Even if it were 100% accurate, what is the benefit of the > event? Given that it's* not* 100% accurate and that the accuracy is > largely up to the discretion of the web browser, what is the benefit? The purpose of the canplaythrough event (and of the HAVE_ENOUGH_DATA ready state) are to signal to the page author that playback is likely to keep up without stalling. This seems to me to have a fairly obvious benefits. Here's a hypothetical scenario: Assume a 100% accurate implementation of canplaythrough (in that the UA can predict with 100% accuracy at what time in the future will the final byte of media data will be downloaded.) Assume magic or time travel if necessary. In this scenario, a <media> element with with a canplaythrough listener will always begin playing at the earliest possible time and will never stall during normal playback. This is a clear benefit. > The question I keep running into is *how inaccurate can the browser be > until the event is no longer useful?* This seems to be a Quality of Service issue. Different UAs will have different implementations of canplaythough at varying degrees of accuracy. Some UAs will favor a lower possibility of stalling over an earlier start time. Others may cut closer to the margin-of-error and favor earlier start times. > There are many ways to approximate download speed, but it quickly becomes > complicated to maintain accuracy: >(Continue reading)
RSS Feed