Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Issue 103583005: Restart fullscreen video playback when switching back from background (Closed)

Created:
7 years ago by kbalazs
Modified:
6 years, 10 months ago
Reviewers:
Ted C, bulach, qinmin
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, android-webview-reviews_chromium.org, Peter Beverloo, scherkus (not reviewing), lgombos
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Restart fullscreen video playback when switching back from background This cl is supposed to improve user experience. The idea is that it is likely that the intention of the user is to continue video playback when switching back to the browser. Additionally this unifies the behavior of switching back from background and from device lock. The new behavior matches with Safari on IOS and Chrome on desktop. Now we destroy the fullscreen view when the application is stopped and recreate it when the application comes back to foreground. Bug=323697 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242570

Patch Set 1 #

Total comments: 12

Patch Set 2 : renamings according to review #

Total comments: 2

Patch Set 3 : removed the buggy changes #

Patch Set 4 : removed one more buggy line and the fullscreen_player_is_released_ member which is not necessary now #

Total comments: 1

Patch Set 5 : new approach, handle everything at browser side #

Patch Set 6 : handle everything at browser side #

Total comments: 4

Patch Set 7 : fix comments, keep surfaceDestroyed #

Total comments: 2

Patch Set 8 : fixed nits #

Total comments: 2

Patch Set 9 : fixed scope comment #

Patch Set 10 : fixed comment without whitespace noise #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -28 lines) Patch
M content/browser/android/content_video_view.h View 1 2 3 4 5 6 7 8 9 5 chunks +22 lines, -2 lines 1 comment Download
M content/browser/android/content_video_view.cc View 1 2 3 4 5 6 7 4 chunks +46 lines, -11 lines 1 comment Download
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.h View 1 2 3 4 5 6 4 chunks +5 lines, -3 lines 0 comments Download
M content/browser/media/android/browser_media_player_manager.cc View 1 2 3 4 5 6 6 chunks +19 lines, -12 lines 0 comments Download
M content/public/browser/android/content_view_core.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
kbalazs
7 years ago (2013-12-05 22:03:47 UTC) #1
qinmin
https://codereview.chromium.org/103583005/diff/1/content/renderer/media/android/renderer_media_player_manager.cc File content/renderer/media/android/renderer_media_player_manager.cc (left): https://codereview.chromium.org/103583005/diff/1/content/renderer/media/android/renderer_media_player_manager.cc#oldcode326 content/renderer/media/android/renderer_media_player_manager.cc:326: void RendererMediaPlayerManager::ReleaseVideoResources() { I don't think this is right. ...
7 years ago (2013-12-05 23:02:34 UTC) #2
kbalazs
https://codereview.chromium.org/103583005/diff/1/content/renderer/media/android/renderer_media_player_manager.cc File content/renderer/media/android/renderer_media_player_manager.cc (left): https://codereview.chromium.org/103583005/diff/1/content/renderer/media/android/renderer_media_player_manager.cc#oldcode326 content/renderer/media/android/renderer_media_player_manager.cc:326: void RendererMediaPlayerManager::ReleaseVideoResources() { On 2013/12/05 23:02:34, qinmin wrote: > ...
7 years ago (2013-12-05 23:36:21 UTC) #3
qinmin
https://codereview.chromium.org/103583005/diff/1/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (right): https://codereview.chromium.org/103583005/diff/1/android_webview/native/aw_contents.cc#newcode738 android_webview/native/aw_contents.cc:738: if (cvc) { remove nested loops. if(!cvc) return; if(paused) ...
7 years ago (2013-12-06 00:10:12 UTC) #4
kbalazs
I renamed ResumeVideo to ResumeFullscreenVideo (everywhere). I't still not perfect because it's odd that it ...
7 years ago (2013-12-06 19:12:34 UTC) #5
kbalazs
https://codereview.chromium.org/103583005/diff/1/android_webview/native/aw_contents.cc File android_webview/native/aw_contents.cc (right): https://codereview.chromium.org/103583005/diff/1/android_webview/native/aw_contents.cc#newcode738 android_webview/native/aw_contents.cc:738: if (cvc) { On 2013/12/06 00:10:13, qinmin wrote: > ...
7 years ago (2013-12-06 19:15:03 UTC) #6
qinmin
https://codereview.chromium.org/103583005/diff/20001/content/browser/media/android/browser_media_player_manager.cc File content/browser/media/android/browser_media_player_manager.cc (left): https://codereview.chromium.org/103583005/diff/20001/content/browser/media/android/browser_media_player_manager.cc#oldcode453 content/browser/media/android/browser_media_player_manager.cc:453: if (video_view_.get()) { I don't think you can remove ...
7 years ago (2013-12-07 01:17:03 UTC) #7
kbalazs
On 2013/12/07 01:17:03, qinmin wrote: > https://codereview.chromium.org/103583005/diff/20001/content/browser/media/android/browser_media_player_manager.cc > File content/browser/media/android/browser_media_player_manager.cc (left): > > https://codereview.chromium.org/103583005/diff/20001/content/browser/media/android/browser_media_player_manager.cc#oldcode453 > ...
7 years ago (2013-12-09 18:38:43 UTC) #8
kbalazs
On 2013/12/09 18:38:43, kbalazs wrote: > On 2013/12/07 01:17:03, qinmin wrote: > > > https://codereview.chromium.org/103583005/diff/20001/content/browser/media/android/browser_media_player_manager.cc ...
7 years ago (2013-12-09 19:20:17 UTC) #9
qinmin
On 2013/12/09 19:20:17, kbalazs wrote: > On 2013/12/09 18:38:43, kbalazs wrote: > > On 2013/12/07 ...
7 years ago (2013-12-09 23:53:05 UTC) #10
qinmin
https://codereview.chromium.org/103583005/diff/60001/content/renderer/media/android/renderer_media_player_manager.h File content/renderer/media/android/renderer_media_player_manager.h (right): https://codereview.chromium.org/103583005/diff/60001/content/renderer/media/android/renderer_media_player_manager.h#newcode116 content/renderer/media/android/renderer_media_player_manager.h:116: // Requests the player that is currently entered fullscreen ...
7 years ago (2013-12-09 23:53:18 UTC) #11
kbalazs
> I tried this CL. While playing the fullscreen video, if I click the home ...
7 years ago (2013-12-10 00:23:06 UTC) #12
qinmin
On 2013/12/10 00:23:06, kbalazs wrote: > > I tried this CL. While playing the fullscreen ...
7 years ago (2013-12-10 00:50:33 UTC) #13
kbalazs
On 2013/12/10 00:50:33, qinmin wrote: > On 2013/12/10 00:23:06, kbalazs wrote: > > > I ...
7 years ago (2013-12-10 01:47:37 UTC) #14
kbalazs
I'm not very lucky with the emulator, it does not work very well and I ...
7 years ago (2013-12-10 23:18:44 UTC) #15
qinmin
On 2013/12/10 23:18:44, kbalazs wrote: > I'm not very lucky with the emulator, it does ...
7 years ago (2013-12-11 02:09:59 UTC) #16
kbalazs
On 2013/12/11 02:09:59, qinmin wrote: > On 2013/12/10 23:18:44, kbalazs wrote: > > I'm not ...
7 years ago (2013-12-11 18:07:41 UTC) #17
qinmin
On 2013/12/11 18:07:41, kbalazs wrote: > On 2013/12/11 02:09:59, qinmin wrote: > > On 2013/12/10 ...
7 years ago (2013-12-11 18:33:14 UTC) #18
kbalazs
On 2013/12/11 18:33:14, qinmin wrote: > On 2013/12/11 18:07:41, kbalazs wrote: > > On 2013/12/11 ...
7 years ago (2013-12-11 22:34:35 UTC) #19
kbalazs
Could you review the latest patch?
7 years ago (2013-12-17 21:17:55 UTC) #20
qinmin
https://codereview.chromium.org/103583005/diff/100001/content/browser/android/content_video_view.cc File content/browser/android/content_video_view.cc (right): https://codereview.chromium.org/103583005/diff/100001/content/browser/android/content_video_view.cc#newcode200 content/browser/android/content_video_view.cc:200: Java_ContentVideoView_createContentVideoView(env, nit:fix the indentation https://codereview.chromium.org/103583005/diff/100001/content/browser/android/content_video_view.h File content/browser/android/content_video_view.h (right): https://codereview.chromium.org/103583005/diff/100001/content/browser/android/content_video_view.h#newcode92 ...
7 years ago (2013-12-18 02:09:46 UTC) #21
kbalazs
https://codereview.chromium.org/103583005/diff/100001/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java File content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java (right): https://codereview.chromium.org/103583005/diff/100001/content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java#newcode338 content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java:338: // We expect the native side to call destroyContentVideoView ...
7 years ago (2013-12-18 19:45:04 UTC) #22
qinmin
lgtm % nits https://codereview.chromium.org/103583005/diff/120001/content/browser/android/content_video_view.h File content/browser/android/content_video_view.h (right): https://codereview.chromium.org/103583005/diff/120001/content/browser/android/content_video_view.h#newcode20 content/browser/android/content_video_view.h:20: class ContentViewCoreImpl; nit: this is no ...
7 years ago (2013-12-19 01:12:41 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/103583005/140001
7 years ago (2013-12-19 02:28:23 UTC) #24
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=42181
7 years ago (2013-12-19 02:46:33 UTC) #25
kbalazs
@bulach: I'd like you to do a second review on this
7 years ago (2013-12-19 16:21:11 UTC) #26
kbalazs
On 2013/12/19 16:21:11, kbalazs wrote: > @bulach: I'd like you to do a second review ...
7 years ago (2013-12-19 16:28:14 UTC) #27
kbalazs
Could someone sign-off? (missing owner lgtm).
6 years, 12 months ago (2013-12-23 22:02:09 UTC) #28
Ted C
lgtm for OWNERS w/ scope question https://codereview.chromium.org/103583005/diff/140001/content/browser/android/content_video_view.h File content/browser/android/content_video_view.h (right): https://codereview.chromium.org/103583005/diff/140001/content/browser/android/content_video_view.h#newcode90 content/browser/android/content_video_view.h:90: JavaObjectWeakGlobalRef CreateJavaObject(); why ...
6 years, 12 months ago (2013-12-26 17:54:06 UTC) #29
kbalazs
https://codereview.chromium.org/103583005/diff/140001/content/browser/android/content_video_view.h File content/browser/android/content_video_view.h (right): https://codereview.chromium.org/103583005/diff/140001/content/browser/android/content_video_view.h#newcode90 content/browser/android/content_video_view.h:90: JavaObjectWeakGlobalRef CreateJavaObject(); On 2013/12/26 17:54:06, Ted C wrote: > ...
6 years, 12 months ago (2013-12-26 20:09:56 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/103583005/180001
6 years, 12 months ago (2013-12-26 20:10:12 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/b.kelemen@samsung.com/103583005/240001
6 years, 12 months ago (2013-12-26 20:13:30 UTC) #32
commit-bot: I haz the power
Change committed as 242570
6 years, 12 months ago (2013-12-26 22:45:19 UTC) #33
bulach
late lgtm, thanks! sorry for the delay, just a couple of nits below: https://codereview.chromium.org/103583005/diff/240001/content/browser/android/content_video_view.cc File ...
6 years, 11 months ago (2014-01-06 15:44:02 UTC) #34
qinmin
On 2014/01/06 15:44:02, bulach_ooo_until_feb_2 wrote: > late lgtm, thanks! > > sorry for the delay, ...
6 years, 10 months ago (2014-01-31 20:36:08 UTC) #35
kbalazs
On 2014/01/31 20:36:08, qinmin wrote: > On 2014/01/06 15:44:02, bulach_ooo_until_feb_2 wrote: > > late lgtm, ...
6 years, 10 months ago (2014-01-31 22:39:34 UTC) #36
kbalazs
Something has definitely changed somewhere. I see that now surfaceDestroyed is called on lock. And ...
6 years, 10 months ago (2014-02-04 20:21:18 UTC) #37
kbalazs
I think at the time I was writing the patch, ContentViewCore::onHide/onShow was called in turn ...
6 years, 10 months ago (2014-02-04 21:59:20 UTC) #38
kbalazs
6 years, 10 months ago (2014-02-11 22:25:37 UTC) #39
Message was sent while issue was closed.
I was trying to fix this but was not successful. So the case when it does not
work well is when the process gets terminated while it is in the background.
This can be reproduced with a developer option "Do not keep activities" (which
was turned on for me this time as it turned out...). I am going to revert the
original patch. I tried to fix this but somehow I cannot make the fullscreen
view reinitialized when the process is recreated. For some reason the
surfaceCreated for the VideoSurfaceView is never called and the fullscreen view
does not go visible. I will show you the WIP patch, I hope someone with deeper
Android knowledge can help.

Powered by Google App Engine
This is Rietveld 408576698