Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Android RecyclerView


Stop failed.
java.lang.IllegalStateException
at android.media.MediaCodec.native_stop(Native Method)
at android.media.MediaCodec.stop(MediaCodec.java:1901)
at com.google.android.exoplayer.MediaCodecTrackRenderer.releaseCodec(SourceFile:469)
at com.google.android.exoplayer.MediaCodecTrackRenderer.onDisabled(SourceFile:434)
at com.google.android.exoplayer.MediaCodecVideoTrackRenderer.onDisabled(SourceFile:289)
at com.google.android.exoplayer.TrackRenderer.disable(SourceFile:231)
at com.google.android.exoplayer.ExoPlayerImplInternal.ensureDisabled(SourceFile:661)
at com.google.android.exoplayer.ExoPlayerImplInternal.stopAndDisable(SourceFile:562)
at com.google.android.exoplayer.ExoPlayerImplInternal.resetInternal(SourceFile:551)
at com.google.android.exoplayer.ExoPlayerImplInternal.stopInternal(SourceFile:528)
at com.google.android.exoplayer.ExoPlayerImplInternal.handleMessage(SourceFile:247)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.google.android.exoplayer.util.PriorityHandlerThread.run(SourceFile:40)


[ 07-30 22:39:15.138 23656:22323 I/ ]
SAACD_COMP_Reset() in

https://support.jwplayer.com/customer/portal/questions/16340897-android-jwplayer-inside-recyclerview

4 Community Answers

d...

User  
0 rated :

There is issue with RecyclerView and Player. Player is created and started playing, when i scroll to bottom and make Player go out of screen, it throws above exception. This has also been reported before by someone: https://support.jwplayer.com/customer/portal/questions/16340897-android-jwplayer-inside-recyclerview
Also here: https://github.com/jwplayer/jwplayer-android-best-practice-apps/issues/8#issuecomment-271311637

As a code, there is no difference than ListView from here: https://github.com/jwplayer/jwplayer-android-best-practice-apps/blob/master/listview-fullscreen/app/src/main/java/com/jwplayer/demo/listview/PlayerAdapter.java

George

JW Player Support Agent  
0 rated :

The player was not optimized for ListView type containers. You could try calling destroySurface() on the player when it’s about to be hidden, but you’ll most likely run into other issues. Refer to:
https://github.com/google/ExoPlayer/issues/273#issuecomment-72432393

d...

User  
0 rated :

I dont see relation of this problem with that link. I am not trying to play multiple videos at the same time, error occurs while list item is about to get hidden.

George

JW Player Support Agent  
0 rated :

Hi,

The comment was in relation to having multiple players in the RecyclerView.

As far as the crash as it’s getting hidden, that should be handled with the destroySurface() method.

This question has received the maximum number of answers.