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

Android : Crash when using JwPlayer in Recyclerview

at java.util.ArrayList$
at com.longtailvideo.jwplayer.core.c.d.a(SourceFile:215)
at com.longtailvideo.jwplayer.core.d.c.onPageFinished(SourceFile:101)
at org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(
at android.os.Handler.dispatchMessage(
at android.os.Looper.loop(
at java.lang.reflect.Method.invoke(Native Method)

I have got this exception when I am using JwPlayer in Recyclerview.

2 Community Answers


-1 rated :



JW Player Support Agent  
0 rated :

Hello Sairam,

This is George, I am the Android Support Engineer here at JW Player. How are you? I see here you’re trying to load the JWPlayerView into a RecyclerView.

Unfortunately, this is not a supported use case, mainly for 3 reasons:

1) Hardware limitations to load multiple video players at once. Please refer to the GitHub comment below for a more detailed explanation:

2) Fullscreen behavior. Since there are multiple players instantiated and there’s no good way to know which instances are available and which instance should go fullscreen when the device is rotated. Also, due to the nature of fullscreen functionality, the player is still in a scrollable container which sometimes results in a player that is taking up the full device screen, but the user is able to scroll off of the player.

3) We use a SurfaceView to render the video as it is a requirement for DRM. SurfaceView’s don’t perform well in Scrollable containers.

Our team is looking into building out this feature in the future, but there is no timeline for it as of yet. I will be sure to add your request to the existing feature request for our product team to review.

Please let me know if you have any other questions or concerns.

JW Player
Android Support Engineer

This question has received the maximum number of answers.