Comments (5)
@sdex Sorry for not checking this issue. Want to confirm the issue: the "blink" you mention is a short time when the screen turns white? I believe it is because you are reusing the PlayerView instance. And because the PlayerView instance is reused, the keep_content_on_player_reset
setting doesn't take effect.
If you can trade-off the memory usage to get better performance, you can replace your container (which is not a PlayerView I believe) with a PlayerView. That way, the PlayerView will not be replaced (unless it is recycled by RecyclerView of course).
Please try this and let me know if it solves your issue.
from kohii.
@eneim correct, white screen instead of the last visible frame.
Not sure what exactly I need to replace with PlayerView
. I have a list item view with the structure:
LinearLayout
ConstraintLayout
PlayerView
And in the view holder I do:
kohii.setUp(mediaLink).bind(playerView)
After all, we came up with listening to the player events and displaying a thumbnail when playback is not started yet.
It's not a perfect solution but it minimizes UI lags during scrolling.
from kohii.
Not sure what exactly I need to replace with PlayerView.
Yeah, your current structure would be what I recommend. I also acknowledge your concern now: by default, there is nothing shown in the PlayerView if the video is not playing (for example, before the beginning of the playback, during the buffering for the first playback, after the playback has ended) which cause the UI to look weird (black screen, or white, ...).
I think the approach that uses player events to show/hide the thumbnail is reasonable. There is ArtworkHintListener
interface you can set when calling kohii.setUp
, you can try that and see if it helps your case as well.
from kohii.
@eneim eventually we got what we needed listening events from different callbacks:
Playback.StateListener
, Playback.ArtworkHintListener
, Player.Listener
Based on the event and the player state we either show or hide the thumbnail and the controller.
from kohii.
Related Issues (20)
- How to playlist HOT 1
- Does PlayerEventListener work? HOT 4
- Lacking documentation on how to change volume HOT 10
- 1.3.0.2011008-20210429.080049-18 is not found at Sonatype HOT 6
- Migration from jcenter() to mavenCentral() or google() HOT 2
- Playback.StateListener not return any value HOT 2
- How to stop video playback when the app goes to background HOT 2
- Is the library production ready? HOT 1
- Play Video In Nested Recyclerview
- Why does not you play music in the video? I mean in Recyclerview ... HOT 1
- java.lang.NoSuchMethodError: No static method getNetworkType HOT 2
- Project not building in current stable version of android studio bumblebee HOT 1
- Kohii crash when use exoplayer 2.13.3 NoClassDefFoundError TrackSelection HOT 2
- Kohii with fragment replace HOT 2
- Kohii vs Toro and development status HOT 3
- Caching Video
- is Kohii better than Toro ? HOT 2
- Black Screen while move next video in Recycleview HOT 16
- Can't replay and black screen while play video with same tag in Recycleview
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kohii.