yqritc / Android-ScalableVideoView

Android Texture VideoView having a variety of scale types like the scale types of ImageView such as fitCenter, centerCrop, centerTopCrop and more
Apache License 2.0
1.09k stars 223 forks source link

Problem with ScalableVideoView in Recycler view #9

Closed depodefi closed 8 years ago

depodefi commented 8 years ago

I noticed problem while checking out demo of your library on Google Play Store. I was using Nexus 5X with Android 6.0 on board. The problem I noticed happened with video list - RecyclerView in this case. While scrolling up and down for some row display black view instead of video view. Please refer to attached screenshots.

screenshot_20151108-215532 screenshot_20151108-215540

depodefi commented 8 years ago

I found some relevant informations that this might be an Android 6.0 issue. some more info here: https://code.google.com/p/android/issues/detail?id=191218&q=label%3APriority-Medium&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars so I guess issue can be closed

MrNovado commented 8 years ago

Same in android 4.4; sometimes video does not load (start) currectly, - scrolling video from viewport and back sometimes forces video to restart, but sometimes it does not happen.

At first glance it seems an issue either with recyclerView or sampleAdapter: scrolling videoView from viewport stops video from playing, but scrolling back not necessarily hits onBindViewHolder.

depodefi commented 8 years ago

Did you found any workaround for this issue? Using RecyclerView support lib in version 23.1.1 problem still exists.

MrNovado commented 8 years ago

2depodefi: Unfortunately right now I don't have the time to play around with this one: I ended up using sprylab's textureVideoView (which I found more stable at the moment) and implementing scalability into that. I made my own adapter and it seems to work just fine.

yqritc commented 8 years ago

@depodefi Sorry for late replay. I reproduced the problem and fixed it. The problem is that bindViewHolder is not always called when scrolling although the item view is detached from the window. So, I fixed the problem and published ver 1.0.2. An app on google play should be updated soon, so please check if you are still interested in it.