Call MediaPlayer.Stop() from async method best practice needed
What would be the best practice to call MediaPlayer.Stop() from async method?
-
The straight forward call of MediaPlayer.Stop() from the async method will hang the app
-
await Task.Run(() => MediaPlayer.Stop());
works good, but some times lead to hang with last log reportGC_BRIDGE waiting for bridge processing to finish
-
Using synchronous event handler to call
Task.Run(() => MediaPlayer.Stop());
seems to be good. No problems till now. -
... Any thoughts?