Resize event and screen size

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Resize event and screen size

Postby CephaluS » Sat Apr 25, 2020 9:48 am

Hello,

I have a Windows application that shows a CEF browser and over it a smaller floating window painted by the Windows API whose size and position is constrained by the size and position of the CEF browser.

When I resize the main window, the CEF browser resizes a bit slower than the main and floating windows so the visual effect is poorly de-synchronized. So I'd like to constraint the size of the floating window to the CEF browser dimensions not the fastest main window dimensions. I need to know when the CEF browser is changing its size and what is the new size.

I've been browsing the CEF API docs but I have not been able to find answer to these questions:

- How can I get a CEF event that reports the frame is changing its size continuously?.
- How can I know the width and height of a CEF browser?.

Thanks you.
CephaluS
Techie
 
Posts: 21
Joined: Sun Jan 06, 2019 5:22 pm

Re: Resize event and screen size

Postby magreenblatt » Sat Apr 25, 2020 9:59 am

There is no way to synchronize this perfectly. What purpose does the floating window serve? Can you implement it using web content in the browser instead of a WinAPI overlay?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Resize event and screen size

Postby CephaluS » Sat Apr 25, 2020 10:17 am

Hey,

Thanks for your usual promtply reply. I'm showing a video stream in the floating window. Because of the fast video data rate I'm not sure whether I can connect a raw bitmap data from the native program to a JS image texture using CEF. If this is possible I'd really appreciate you to show me some guidelines to approach this different strategy to solve the problem.

Thank you, Marshall.
CephaluS
Techie
 
Posts: 21
Joined: Sun Jan 06, 2019 5:22 pm

Re: Resize event and screen size

Postby magreenblatt » Sat Apr 25, 2020 11:08 am

You could encode your data as a video stream and use a <video> tag in the browser.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Resize event and screen size

Postby CephaluS » Sat Apr 25, 2020 11:24 am

This is an advanced topic for me but I'd like to address it. I guess I should provide the encoded stream as a custom request on the network layer in order to deliver the image data to the <video> tag. Please, let know if I'm right or going off too much on tangent.

Thanks.
CephaluS
Techie
 
Posts: 21
Joined: Sun Jan 06, 2019 5:22 pm

Re: Resize event and screen size

Postby magreenblatt » Sat Apr 25, 2020 11:57 am

Correct. You will likely also need to handle Range requests for the video stream contents. See issue #2873 for related details.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Resize event and screen size

Postby CephaluS » Sat Apr 25, 2020 12:07 pm

That's great help, Marshall. You always delivers.

Thank you.
CephaluS
Techie
 
Posts: 21
Joined: Sun Jan 06, 2019 5:22 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 74 guests