I m using MediaElement to play a web video. When I left the page I noticed in the Task Manager that my app was still using 10% of network and didn't drop till it finished downloading video.
I tried doing the following but no luck.
//open link;
mediaElement.Source = welcomeVideoURL;
//when I leave the page OnNavigatedFrom()
mediaElement.Stop();
mediaElement.ClearValue(MediaElement.SourceProperty);
mediaElement.Source = null;
Also tried to set the source to a dummy link but still no luck.
I thought that opening the Link as a Stream and use mediaElement.SetSource()
could work but I haven't found anything on that...maybe I m not searching correct.
Thank you.
Found this MediaElementWithHttpClient in some other question in a comment made by @kiewic. I can manage the stream and download process and easily dispose it.