Page 1 of 1

youtube starts and then stops after a few seconds

PostPosted: Fri Aug 09, 2019 1:25 pm
by guich
Hi,

Running on Windows 10. The Youtube site loads fine and the first ad video starts fine, however after 2 seconds or so, the video stops (no screen update is made). The voice continues to run. If i hover the mouse over the video, the screen starts to get updated again.

Is there anything i have to do to keep the screen updating?

If i just keep the mouse cursor at the video frame, it keeps updating, but if i remove it, it stops the update.

I just noted that when its just the video image that is changing, the video stops. But when there is something moving in the page, like a gauge or a clock timer, the video gets updated. So seems that the video itself does not trigger the screen update (to call onPaint). This is why i have to keep moving the mouse at the video, because this way the youtube's music gauge is displayed.

This is why also some ads works correctly: because of the ads gauge meter.

Is there a way to interact with the native video player and tell it to update the screen? Even if i have to do this with a manual timer.

Or maybe inject a javascript to keep updating the screen.

Re: youtube starts and then stops after a few seconds

PostPosted: Mon Aug 12, 2019 2:53 pm
by guich
Which method i have to call in C++ to trigger a browser repaint?
Or even better is there a method from Jcef that i can call to do that?

Re: youtube starts and then stops after a few seconds

PostPosted: Mon Aug 12, 2019 2:57 pm
by magreenblatt
What JCEF version? Are you using off-screen rendering? Does the problem reproduce with the JCEF sample apps?

Re: youtube starts and then stops after a few seconds

PostPosted: Mon Aug 12, 2019 3:57 pm
by guich
Hi,

I tried with the simple example. Youtube works fine if useOsr is false, but if i set to true, the same error of my app happens. My app uses offscreen browser.

I'm using this library:

https://github.com/smac89/java-cef-build/releases/

thanks

guich

Re: youtube starts and then stops after a few seconds

PostPosted: Wed Aug 14, 2019 4:57 am
by guich