DescriptionSuspend idle WebMediaPlayer instances after some time.
Releases resources which may slowly accumulate for carelessly created
players that a user will never see. For now, only enabled on Android,
but long term we'll want this on all platforms since it can avoid
major OOM crashes on sites which leak elements.
Since RendererWebMediaPlayerDelegate is now getting a bit complicated,
adds a browser test (necessary to construct a RenderViewTest) to cover
old and new functionality alike.
Currently players will be suspended after 15 seconds of being paused,
and resumed upon playback, playback rate changes from 0 to above 0,
and seek events.
Modifies WebMediaPlayerImpl to handle suspensions when a page might
be in the foreground. Covers the following:
- Seek will now resume the pipeline if initiated in the foreground.
- Play will now resume the pipeline if initiated in the foreground.
Due to the above it's no longer necessary for OnShown() to resume the
player when it's in the paused or ended state.
BUG=590099
TEST=new unittests, manual testing.
Committed: https://crrev.com/5bbc487ef9a375236c2b8ca9196d34c60d767323
Cr-Commit-Position: refs/heads/master@{#378113}
Patch Set 1 : Tests. WMPI fixes. #Patch Set 2 : Rebase. #
Total comments: 10
Patch Set 3 : Comments. Don't resume for paused/ended. #Patch Set 4 : Undo rebase. #Patch Set 5 : NON_EXPORTED_BASE. #
Messages
Total messages: 18 (8 generated)
|