Why use Dialog as default AndroidOverlay impl?

57 views
Skip to first unread message

尹超

unread,
Aug 12, 2020, 4:51:43 AM8/12/20
to media-dev
Hello!

Why use Dialog  as default AndroidOverlay impl?
 Dialog must be related to avtivity, can i use surfaceview

Dan Sanders

unread,
Aug 12, 2020, 2:02:45 PM8/12/20
to 尹超, media-dev
The short answer is that Chromium did use SurfaceView historically.

Dialogs are not part of the view hierarchy, do not need to be synchronized on the main thread, and can be managed directly by the GPU process rather than the browser process. These are not features that most apps would benefit from, but they are very relevant in Chromium's multi-process architecture.


- Dan

--
You received this message because you are subscribed to the Google Groups "media-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to media-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/media-dev/d6bab6d4-20a4-4a6f-a7e0-e20615b04962n%40chromium.org.

尹超

unread,
Aug 19, 2020, 5:58:18 AM8/19/20
to media-dev, sand...@chromium.org, media-dev, 尹超
Thanks for your reply.

There is an issue about androidoverlay"
https://bugs.chromium.org/p/chromium/issues/detail?id=618368  

what's the meaning of "Improves audio cut off and resume for full screen transition of hardware decoded video playback "

Dan Sanders

unread,
Aug 19, 2020, 2:04:19 PM8/19/20
to 尹超, media-dev, sand...@chromium.org
These refer to the previous Surface implementation in Chrome, ContentVideoView (a SurfaceView in the Browser process). ContentVideoView did not support overlaying custom controls, so players that had them could not use the Surface path at all. It also took much longer to transition in to and out of fullscreen mode.

尹超

unread,
Aug 19, 2020, 11:41:07 PM8/19/20
to media-dev, Dan Sanders, media-dev, sand...@chromium.org, 尹超
Thanks for your reply.

I  met one problem. 
For some reasons , i must add contentviewrendererview into windowmananger in service, androidoverlay can not be created when playing video because dialog need activiy context.

Is it  feasible   that i use surfaceview to implement  AndroidOverlay
Could you point the way to slove this problem.

Dan Sanders

unread,
Aug 20, 2020, 3:11:04 PM8/20/20
to 尹超, media-dev, sand...@chromium.org
This question is outside my area of expertise, sorry.
Reply all
Reply to author
Forward
0 new messages