Baseflow / Baseflow/XamarinMediaManager

Ios doesnt play from queue

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

Description

Hello,

i have impelentation of crossmedia manager and i have been experiencing issues with the player on ios. It plays once i pass the file as a parameter but it doesn't if i just add it to the queue and then trz to play. It works very well on android but not on ios. I really don't want to have two implementations. Plus i have been experiencing some buffering on ios.

```
try
{
Console.WriteLine("cleaning");
await CrossMediaManager.Current.Stop();
CrossMediaManager.Current.Queue.Clear();
Console.WriteLine("playing " + filename);
CrossMediaManager.Current.ClearQueueOnPlay = true;
CrossMediaManager.Current.RepeatMode = RepeatMode.Off;
CrossMediaManager.Current.Notification.Enabled = false;
_mediaItem = new MediaItem(filename)
{
Album = detail.NameCz,
AlbumArtist = detail.Narrator,
DisplayDescription = "description to be filled",
DisplayTitle = "title to be filled",
FileName = language + " " + localTrack,
Title = filename,
MediaUri = filename,
Image = ArticleImage
};
if (Device.RuntimePlatform == Device.iOS)
{
PlayFile(filename);
}
else
{
CrossMediaManager.Current.Queue.Add(_mediaItem);
CrossMediaManager.Current.Play();
}
}
catch (Exception ex)
{
_ = LangUpGlobalExceptionHandler.LogException(ex);
if (LangUpNetworkDelegate.IsOnline)
{
NotificationService.ShowToast(
"Při přehrávání se vyskytla chyba, zkuste to později prosím.");
}
else
{
NotificationService.ShowToast(
"Problém s připojením k internetu, zkuste to později prosím.");
}
}

```

Contributor guide

Open the contributing guide

Research direction

No repository files or tests are named. Start by reproducing the iOS path that adds the MediaItem to CrossMediaManager.Current.Queue and calls Play(), then compare it with the direct PlayFile(filename) path; done means queued playback works on iOS without the reported buffering problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.