How to completely close/release a WebView after it has loaded a youtube link?

992 views Asked by At

We are developing an UWP app. We use a WebView control which navigates to an youtube link, the issue is the video/sound from youtube doesn't stop after closing the WebView.

Is there any way to release a webview?

1

There are 1 answers

2
Andrei Ashikhmin On BEST ANSWER

To stop sound you need to remove all references to your WebView and let GC to collect it. Removing it from layout and calling GC manually should do the trick immediately.