Hi Hongbo,

 

I download the newest version 11 of crosswalk and find that the view of
webview is change to texture view, is there a way to fix this bug now?

 

I captured the view stack and found that if I change the background color of
" org.xwalk.core.internal.XWalkContent ", this color will show in the
background of the webview, so is there a change I can insert my video player
surface view to the view stack to show the video in the background of
webview?

 

[0]:org.apache.cordova.CordovaWebView

[1]:    org.xwalk.core.internal.XWalkViewBridge

[2]:        org.xwalk.core.internal.XWalkContent

                         [My video player surface view  <------ Insert here]

[3]:            org.xwalk.core.internal.XWalkContent$1

[4]:                android.view.TextureView

[3]:            org.chromium.content.browser.JellyBeanContentView

 

Best Regards,

-----邮件原件-----
发件人: Min, Hongbo [mailto:[email protected]] 
发送时间: 2014年10月23日 4:23
收件人: Liutongbing
抄送: [email protected]
主题: RE: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Hi, Tongbing

 

I have a try to change the PixelFormat of SurfaceView, e.g. make it be
TRANSPARENT or TRANSLUCENT, the background can not be transparent.

 

As I explained before, it is reasonable since chromium uses SurfaceView as
compositing surface target with GL commands. However, if SurfaceView is
rendered by canvas API, it might be easy to make it transparent, see the
sample code  <http://www.phonesdevelopers.com/1754575/>
http://www.phonesdevelopers.com/1754575/, and this is a total different way
from Chromium.

 

Regards

Hongbo

________________________________________

From: Liutongbing [[email protected]]

Sent: Monday, October 20, 2014 6:03 PM

To: Min, Hongbo

Cc:  <mailto:[email protected]>
[email protected]

Subject: 答复: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Hi Hongbo,

 

Thank you for your help. Waiting for your good news.:-) Meantime I will try
to install the building environment of Crosswalk.

 

BR,

Liutongbing

 

 

-----邮件原件-----

发件人: Min, Hongbo [ <mailto:[email protected]> mailto:hongbo.min@intel.
com]

发送时间: 2014年10月16日 15:21

收件人: Liutongbing

抄送:  <mailto:[email protected]>
[email protected]

主题: RE: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Yes, I also read that post, it is obsolete now and there is no
SetTransparentBackground method in the latest code base. Also, the method
mentioned in that post is mainly for desktop.

 

I will try to set the PixelFormat of SurfaceView to TRANSPARENT in
Crosswalk, and will let you know if it works well on Android.

 

Regards

Hongbo

________________________________________

From: Liutongbing [[email protected]]

Sent: Thursday, October 16, 2014 2:45 PM

To: Min, Hongbo;  <mailto:[email protected]>
[email protected]

Subject: 答复: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Hi Hongbo,

 

I cannot use video tag because the video stream include some digital
certificates for copyright things, before playing it need be parsed firstly.

 

In below thread, @KyleLiu said that in compositor's constructor we could set
the background from white to transparent, it seems can make background
transparent.

But this thread was post two years ago, does this method also works well
today?

 
<https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/w0NANZg
sakI>
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/w0NANZgs
akI

 

If you have the whole Crosswalk building environment, could you help me to
have a try? Many thanks.

 

BR,

Liutongbing

 

 

 

-----邮件原件-----

发件人: Min, Hongbo [ <mailto:[email protected]> mailto:hongbo.min@intel.
com]

发送时间: 2014年10月16日 14:19

收件人: Liutongbing;  <mailto:[email protected]>
[email protected]

主题: RE: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Hi,

 

Would you want to hook chromium rendering code to make it be transparent? If
so, I am afraid it might be technically infeasible.

 

For Android platform, the reason is simple,  the Chromium renders the web
contents into a SurfaceView which can not become transparent. You can
reference:

[1]
<http://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transpar
ent>
http://stackoverflow.com/questions/5391089/how-to-make-surfaceview-transpare
nt

[2]
<https://groups.google.com/forum/#!topic/android-developers/jYjvm7ItpXQ>
https://groups.google.com/forum/#!topic/android-developers/jYjvm7ItpXQ

 

If not hooking chromium rendering code, did you ever consider to use the
built-in HTML5 video player as your media player? If so, Crosswalk/Chromium
allows your to custom your own controls, see [3]
<http://blog.teamtreehouse.com/building-custom-controls-for-html5-videos>
http://blog.teamtreehouse.com/building-custom-controls-for-html5-videos

 

By the way, is there any special reason why to draw media to Android
surface, but not re-use the existing HTML5 video solution?

 

Regards

Hongbo

________________________________

From: Liutongbing [[email protected]]

Sent: Wednesday, October 15, 2014 4:18 PM

To: Min, Hongbo;  <mailto:[email protected]>
[email protected]

Subject: 答复: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Hi Hongbo,

 

Thank you for your reply!

I am not familiar with the detail of chromium, could you help to give me
some advice?

 

Thanks a lot.

 

BR,

Liutongbing

 

 

发件人: Min, Hongbo [ <mailto:[email protected]> mailto:hongbo.min@intel.
com]

发送时间: 2014年10月15日 10:34

收件人: Liutongbing;  <mailto:[email protected]>
[email protected]

主题: RE: [Crosswalk-help] [Crosswalk help]Issue about transparent
background of webview

 

Hi, Tongbing

 

As far as I know, there is no much simple method to make the html background
totally transparent without hooking the chromium core code. An attempt to
use the approach to make html body transparent may lead to all UI elements
invisible as you said.

 

A short explanation for why need to hook chromium code is, each time
chromium compositor starts to composite the web content by GPU, it would
call glClear with white color, and the transparent effect requires to change
the way of drawing a new frame.

 

Thanks…Hongbo

 

From: Crosswalk-help [
<mailto:[email protected]>
mailto:[email protected]] On Behalf Of
Liutongbing

Sent: Monday, October 13, 2014 10:48 AM

To:
<mailto:[email protected]%3cmailto:crosswalk-help@l
ists.crosswalk-project.org>
[email protected]<mailto:[email protected]
walk-project.org>

Subject: [Crosswalk-help] [Crosswalk help]Issue about transparent background
of webview

 

Hello guys,

 

My app is a video player, whole app logic and UI use html to implement and
media is drawn to android surface, so when video is playing, the
controller(like stop button, pause button etc. ) html is overlapped on the
surface.

So I need set the html background transparent, but if I do like this, all
the elements of controller html also transparent, even if I cannot see the
buttons but they also can be clicked.

 

How to set the html background transparent and also can see the elements of
html?

 

I googled and found out a link, it said I need to modify chromium, is there
any simple method?

 
<https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/w0NANZg
sakI>
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/w0NANZgs
akI

Many thanks.

 

 

 

_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to