Baseflow / Baseflow/XamarinMediaManager

Repeat queue items does not work on android

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

Description

## 🐛 Bug Report

Repeat mode is not working for single MediaItems and queue items,
Repeat mode is working on iOS;

### Expected behavior
Repeat individual item / repeat all items.

### Reproduction steps
Add the following lines of code to the class constructor of the contentPage, OnAppearing() or even inside a command :
```
var mediaItem = new MediaItem(Song.Url);
CrossMediaManager.Current.Queue.MediaItems.Add(mediaItem);
//added it again to make a list of more than one item
CrossMediaManager.Current.Queue.MediaItems.Add(mediaItem);

await CrossMediaManager.Current.Play(CrossMediaManager.Current.Queue.MediaItems.ToList());
CrossMediaManager.Current.RepeatMode = MediaManager.Playback.RepeatMode.All;


```
also tried with this line after adding items to the queue:

`await CrossMediaManager.Current.Play();`

and

`CrossMediaManager.Current.RepeatMode = MediaManager.Playback.RepeatMode.One;`

What i have noticed is that if i put a breakpoint any where after

`CrossMediaManager.Current.RepeatMode = MediaManager.Playback.RepeatMode.All;`

and hit that point on debug mode , the song plays and the repeat mode is triggered and plays the next one , but once i exit the debug mode the player stops.

### Configuration
VS 16.5.4
XF: 4.5.0.617

**Version:** 0.9.7

**Platform:**

- [ ] :robot: Android
- [ ] :monkey: Xamarin.Forms

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue on Android using the MediaItem queue code in the report, trying both RepeatMode.All and RepeatMode.One outside the debugger. Compare the behavior with iOS, and consider the issue done when individual and all-item repeat continue playing without requiring a breakpoint.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.