XamarinMediaManager icon indicating copy to clipboard operation
XamarinMediaManager copied to clipboard

[Android] Player is accessed on the wrong thread

Open rrispoli opened this issue 5 years ago • 7 comments

🐛 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

rrispoli avatar Oct 25 '19 20:10 rrispoli

Is this still a bug?

martijn00 avatar Jan 08 '20 16:01 martijn00

the same bug on when playing audio also

reshnas avatar Feb 12 '20 12:02 reshnas

Is this bug fixed in the latest version? Because still, I face this issue in the latest version.

ravikiran18 avatar Apr 20 '20 14:04 ravikiran18

Any workaround for this?

shaks786 avatar Jul 03 '20 23:07 shaks786

the same bug on when playing audio

abjelosevic avatar Jul 10 '20 00:07 abjelosevic

I also have this bug. I can't play audio.

g4mb10r avatar Sep 02 '20 20:09 g4mb10r

This issue still happening in the Plugin.MediaManager.Forms 1.1.1 version When app play the local audio file from an activity on create event in the Android 7 or earlier it only play 2 second then crash, in the debug window display blow information (those from android 6 emulator, on android 7 a lot of repeated "Player is accessed on the wrong thread" message): `[EGL_emulation] eglMakeCurrent: 0xae654660: ver 3 1 (tinfo 0xae652b60)

[SimpleExoPlayer] Player is accessed on the wrong thread. See https://exoplayer.dev/issues/player-accessed-on-wrong-thread

[SimpleExoPlayer] java.lang.IllegalStateException

[SimpleExoPlayer] at com.google.android.exoplayer2.SimpleExoPlayer.verifyApplicationThread(SimpleExoPlayer.java:1575)

[SimpleExoPlayer] at com.google.android.exoplayer2.SimpleExoPlayer.stop(SimpleExoPlayer.java:1281)

[SimpleExoPlayer] Player is accessed on the wrong thread. See https://exoplayer.dev/issues/player-accessed-on-wrong-thread

[EGL_emulation] eglMakeCurrent: 0xae654660: ver 3 1 (tinfo 0xae652b60)

[Surface] getSlotFromBufferLocked: unknown buffer: 0x99efbba0` But the same file play with a button to test sound, it plays without problem.

sunsiz avatar May 28 '22 19:05 sunsiz