Reload CEF web browser (WPF C#)

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

Reload CEF web browser (WPF C#)

Postby battila » Sat Oct 24, 2020 11:18 am

Hi guys,

I develop an audio player that supports local and Deezer playback. When I switch back to the local player the Deezer continues to run in the background with sound, so when I play local files they are playing at the same time with the Deezer.

I am looking for a solution to this. I thought of a lot. I can stop Cef with Cef.Shutdown(); , but the problem is that CEF can only be initialized once within the program, somehow I would have to reload the page when I switch back to Deezer.

Any idea?
battila
Newbie
 
Posts: 5
Joined: Sun Sep 06, 2020 9:00 am

Re: Reload CEF web browser (WPF C#)

Postby amaitland » Sun Oct 25, 2020 12:39 am

If its a html5 based media player then just execute some JavaScript to pause the audio.

https://developer.mozilla.org/en-US/doc ... ment/pause
https://developer.mozilla.org/en-US/doc ... ement/play

Or close the browser instance and create another later.
Maintainer of the CefSharp project.
amaitland
Master
 
Posts: 969
Joined: Wed Jan 14, 2015 2:35 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 1 guest