DescriptionIntroduce CancelUponDeferral() to buffered media loaders.
Fixes hitting the maximum connection limit of 6 per domain when a
media tag is used with preload=metadata.
Deferred network connections will be cancelled once reaching the
HAVE_ENOUGH_DATA state for preload=metadata, non-streaming
resources that have not started playback.
A soft cancel is introduced which allows us to preserve the data
cached thus far in the BufferedResourceLoader. Once this cache is
exhausted the loader will fulfill subsequent reads with a cache
miss and continue on as normal.
preload=metadata intentionally does not cache enough data for a
smooth playback experience on slow connections, so the cache miss
here does not increase jank relative to the current status quo.
For similar reasons, since preload=auto does load enough data for
an uninterrupted playback, we can't use this method there or we'll
introduce jank during the cache miss and subsequent catch up.
Note: This does not resolve hung connections if multiple media
elements are actually playing back or if they are served from
a server without range requests.
Note 2: This also fixes a broken media_blink_unittests, which was
missing some Gin dependency.
BUG=162627
TEST=new unittest, passes layout tests.
Committed: https://crrev.com/849cf4b2ae0cd74c9f618b0950fee69f075de492
Cr-Commit-Position: refs/heads/master@{#322610}
Patch Set 1 #Patch Set 2 : Move cancelation. #
Total comments: 4
Patch Set 3 : Comments #
Messages
Total messages: 19 (4 generated)
|