Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to run the sprocket with transparent background? #1

Open
rahmanih opened this issue Jan 26, 2016 · 1 comment
Open
Labels

Comments

@rahmanih
Copy link

Hi,

I want to run the sprocket on a Set tob box, So one of the rquirements is to have the webpage displayed but with a transparent background,i.e the video is visible in the area not covered by HTML content.

is this possible with sprocket? do I need to modify some code?

regards

@davidsz
Copy link
Contributor

davidsz commented Jan 28, 2016

Hi! Of course, it should be possible with the RenderWidgetHostView::SetBackgroundColor(...) API function. You can pass a transparent value to this and after that you can see what is behind your web view. (The color of the application window. I don't exactly know what are the system requirements of transparent windows - my current Linux desktop does not support it.)

I made a little example: https://gist.github.com/davidsz/d75947fa56540b6b38e6
It also sets a TRANSLUCENT_WINDOW flag for the app window, maybe it will work for you.

Note: Most of the web pages have background color, so I think this "feature" is not too useful by itself. (In fact only the minimal HTML documents are transparent.) WebContents::InsertCSS(...) could help you to remove predefined backgrounds from the pages.

Happy experimenting, best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants