Baseflow / Baseflow/XamarinMediaManager

[Android] Player is accessed on the wrong thread

Open
#634 7 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

When the video is playing and seek to some position (using SeekTo), it shows in output window this error:

```
10-25 16:29:22.618 W/SimpleExoPlayer( 4743): Player is accessed on the wrong thread. See https://google.github.io/ExoPlayer/faqs.html#what-do-player-is-accessed-on-the-wrong-thread-warnings-mean
10-25 16:29:22.618 W/SimpleExoPlayer( 4743): java.lang.IllegalStateException
10-25 16:29:22.618 W/SimpleExoPlayer( 4743): at com.google.android.exoplayer2.SimpleExoPlayer.verifyApplicationThread(SimpleExoPlayer.java:1192)
10-25 16:29:22.618 W/SimpleExoPlayer( 4743): at com.google.android.exoplayer2.SimpleExoPlayer.getPlaybackParameters(SimpleExoPlayer.java:946)
```

Note that the video still working and seek to the position, but show this error.

### Expected behavior

The video seek to the position and don't show any error message.

### Reproduction steps

Play some video and when it update the progress in PositionChanged, call MediaManager.SeekTo(position).

### Configuration

**Version:** 0.8.18

**Platform:**
- [ ] :iphone: iOS
- [x ] :robot: Android
- [ ] :checkered_flag: WPF
- [ ] :earth_americas: UWP
- [ ] :apple: MacOS
- [ ] :tv: tvOS
- [ ] :monkey: Xamarin.Forms

Contributor guide

Open the contributing guide

Research direction

Trace the Android path from PositionChanged to MediaManager.SeekTo and compare it with the SimpleExoPlayer.verifyApplicationThread warning shown in the report. Reproduce playback and seeking on version 0.8.18; done means seeking still works without the wrong-thread error.

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
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.