Always preroll unless we've reached kReadyStateHaveFutureData.

Even though we'd like to stop earlier if an element isn't playing, we
can't know if the page is waiting for canplaythrough, so we must buffer
until that point so the event fires.

This is a partial revert of d71061f027f18f15d2d197681a49154f6c14d531's
behavior. We still handle play/pause at kReadyStateHaveMetaData, but
unfortunately the preroll attempt is still needed.

TODO: Instead of prerolling non-playing tags past metadata, we might
instead signal kReadyStateHaveFutureData upon suspend to avoid wasting

TODO: Clearly this behavior is missing a test. :|


Change-Id: I967ab2c4f8297f8f2e7f9ea91dab7e04f9b88880
Reviewed-by: Dale Curtis <>
Commit-Queue: Dale Curtis <>
Cr-Commit-Position: refs/heads/master@{#662084}
1 file changed