[Android] Player is accessed on the wrong thread
See original GitHub issue🐛 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:
- 📱 iOS
- [x ] 🤖 Android
- 🏁 WPF
- 🌎 UWP
- 🍎 MacOS
- 📺 tvOS
- 🐒 Xamarin.Forms
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Exoplayer throws Player is accessed on the wrong thread ...
In onResume() from MainActivity I set exoPlayer.experimentalSetOffloadSchedulingEnabled(false); which throws "Player is accessed on the wrong ...
Read more >Player is accessed on the wrong thread. · Issue #10333
You need to make sure that the player is not accessed from another thread. If this happens you need to create a Handler...
Read more >Troubleshooting
What do “Player is accessed on the wrong thread” errors mean? See A note on threading on the getting started page. How can...
Read more >com.google.android.exoplayer2.SimpleExoPlayer. ...
private void verifyApplicationThread() { · if (Looper.myLooper() != · "Player is accessed on the wrong thread. See " · "https://google.github.io/ExoPlayer/faqs.
Read more >Player is accessed on the wrong thread
Player is accessed on the wrong thread ; Clear reproduction steps including observed and expected behavior. Play video and press powerbutton ( ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
I also have this bug. I can’t play audio.