Baseflow / Baseflow/XamarinMediaManager

How to dispose CrossMediaManager properly?

Open
#763 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
763
Forks
299
PR merge metrics
No merged PRs in 30d

Description

I'm playing an HLS content on CrossMediaManager. When users press back, I'm trying to dispose the player, but the player is still playing, I can see it's running on notification drawer and I can listen to video. Here is the code I've tried.
`VideoPlayer` is the Reference name of the `VideoView`

```
protected override void OnDisappearing()
{
base.OnDisappearing();
CrossMediaManager.Current.Dispose();
VideoPlayer.Dispose();
}

Contributor guide

Open the contributing guide

Research direction

Start with the OnDisappearing example using CrossMediaManager.Current.Dispose() and VideoPlayer.Dispose(), then trace the CrossMediaManager lifecycle for HLS playback when navigating back. Reproduce the issue and verify that playback stops and the notification drawer no longer exposes active media afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.