Page 1 of 1

Reload CEF web browser (WPF C#)

PostPosted: Sat Oct 24, 2020 11:18 am
by battila
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?

Re: Reload CEF web browser (WPF C#)

PostPosted: Sun Oct 25, 2020 12:39 am
by amaitland
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.