DescriptionPause EME player whose external surface is stolen by another player
Background: A surface is "external" when it is composited externally.
As for now, we cannot have two external surfaces at once because risk
of Z-fighting. This is why we abort the first EME video when a second
EME video is started.
Problem: User sees a black box but no "Play"-button on aborted video.
Solution: Pause aborted player (but not if it's going to fullscreen).
Example: Say player A is currently playing, player A's external surface
will be released in these three cases:
1. Player B starts.
2. Player B enters fullscreen.
3. Player A enters fullscreen.
This commit pauses player A in case 1, 2 but not in case 3.
BUG=431318, 431705
TEST=Manual,
1. Open a webpage with two EME <video>s next to each other.
2. Start video A.
3. Start video B.
4. Notice: video A stops (its "Play"-button appears).
TEST=Manual,
1. Open a webpage with two EME <video>s next to each other.
2. Start video A.
3. Click the fullscreen icon of video B.
4. Notice: video A stops (it will not Z-fight, i.e not seen on top).
Committed: https://crrev.com/27e091ab97b6bd36c3a19c263d27d440bb71a9e0
Cr-Commit-Position: refs/heads/master@{#309918}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Clarified commit message #Patch Set 3 : player->Release() instead of player->Pause() #
Total comments: 1
Patch Set 4 : No misuse of fullscreen_player_id, introduce ReleasePlayerOfExternalVideoSurfaceIfNeeded() #Patch Set 5 : Reuse Java_ExternalVideoSurfaceContainer_destroy() and OnMediaInterrupted() #
Total comments: 5
Patch Set 6 : Remove ReleaseCurrentExternalVideoSurface() #
Total comments: 5
Patch Set 7 : Add native version of INVALID_PLAYER_ID #
Total comments: 2
Patch Set 8 : Add Chromecast and remove unneeded JNI #
Total comments: 4
Patch Set 9 : Add extra assert and explicit initialization #Patch Set 10 : Rebase #Messages
Total messages: 34 (9 generated)
|