Comments (4)
I would investigate this issue. But there is some points I could list out for the concern:
- If a ViewHolder is out of the viewport, there is a high chance it got recycled. In that case, when you see the video again, it need to be bound to the data again, therefore, the Video got prepared again.
- In single video list, I did not see the issue yet, so maybe it has something related to the Internet connection too. But if you could provide a gif file or a video demonstrate the issue it would be really helpful.
from toro.
The first point is correct. It needs to be bound to data again. So there will always be slight lag.
I saw this issue in the sample app provided with this library running on WIFI. I will post the gif.
In a single video list also, this issue is bound to happen because the same recycling logic will happen if its a single or multiple video.
from toro.
@eneim . It certainly performs better than the Android MediaPlayer. +1 for that.
But can you please let me know one thing? Using Toro, suppose i have a ListView
and i have video at position 8 and 15. Now i watch video at position 8 and scroll down to position from there. Now if i scroll back to position 8, its a high chance that the view that i get there is a recycled view. So for position 8, i will have to set the data-source of the video again and then it will prepare again and start playing.
So how does Toro handles this prepare delay? Have you taken care of anything extra from Android Media Player to reduce this prepare time-delay?
If not, is it possible that i save partial-downloaded video(10 s out of 60s) in a local temp file and then play the video using that local file? In this way, i already have the partial downloaded content,so it wont take much time to prepare.
from toro.
@rahulrj I understand your need. As said, I try to keep Toro staying out of the core implementation of playback process. Playing video is hard, I can say. And there are many ways to do so (and each will give a slightly different cycle). In fact, I'm trying to research more about some popular playback libraries to improve my playback cycle and implementation. It could turns out to be an extension of Toro which will support the playback only.
For you case, I want to try to play a list of local video (called a Playlist). But before any implementation, I would like to ask how would you play your parts smoothly? I know about HLS which could provide a playlist of such small parts of a Video so that client could play it more effectively. But for a list of local part files (list of .mp4, I guess), I have no imagine of how it would work. If you can help me this, I can make up some ideas.
By the mean time, I think a proper way of caching the video locally could be a good solution. Take a look at this if it help (I have no idea for sure, but I will try too): AndroidVideoCache
from toro.
Related Issues (20)
- [Feature Request] Make Player attached to lifecycle HOT 2
- how to set player for a specific position in a container HOT 1
- Initialize() in VideoViewHolder is not getting called.
- Videos Start Playing onScroll even after pausing it manually in Container. HOT 3
- Loop video HOT 1
- Using Toro + ExoPlayer in Dynamic Feature Module HOT 1
- Pre-caching/Downloading progressive streams in ExoPlayer HOT 1
- App is crashing with the following error
- App is crashing with the following error HOT 5
- How to use ToroExoplayer inside view pager which is inside a container? HOT 1
- Custom MediaSource
- Hi,
- Video was playing continously in background even after opening bottom sheet
- Audio is playing but video shows black screen HOT 1
- [Bug report] Hls videos always picks the Highest quality stream intially HOT 5
- [Bug report] Crashed app com.google.android.exoplayer2.trackselection.DefaultTrackSelector HOT 2
- Wiki update
- Getting errors when running the project. HOT 10
- com.google.android.exoplayer2.video.VideoListener was removed in ExoPlayer 2.16.0, making this library incompatible HOT 2
- How to autoplay video viewpager (contain image/video) inside recyclerview
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 toro.