drawRect / Instagram_Stories

Inspired by Instagram Stories functionality. This source is similar to Instagram Stories, which is having both image and video support.
MIT License
414 stars 76 forks source link

[improvements] Crucial feature additions #112

Open Ludotrico opened 3 years ago

Ludotrico commented 3 years ago

With a few adjustments to fit with my own models and functionality, this library is working great and is easy to understand (for the most part).

However I have listed a few improvements that would enhance this library immensely. Here they are ranked by order of importance:

  1. When two consecutive video snaps are playing, they do not play together smoothly. On Snapchat and Instagram, the videos play seamlessly. After the first snap plays, there is an uncomfortable pause as the subsequent video snap gets configured to play. Especially because my implementation of snaps are chunked into 10 seconds, this is quite disruptive to the user. I believe the issue exists because there is no prefetch implementation that fetches videos ahead of time as the user is progressively consuming snaps.

  2. I have noticed that when dragging to skip to the next story, there is no preview on the next story. Instagrams implementation seems to prefetch the media of the next story so that when the user drags to go to the next, it is not just a black screen. If the next snap on the next story is a video, then the preview should be the first frame of the video.

  3. It would be highly beneficial and smooth things up if media was prefetched in an intelligent manner. For example, if a story has 10 snaps and when you tap on the story it opens on snap 5 because you watched 1...4, we should begin to load the media from the URLS for snap 3,4,6,7. This would allow for the user to tap through the snaps quickly (in either direction) and not have to wait for them to load!

  4. The StoryHeaderView and all overlays on the story preview cell should become invisible when the user long presses and only reappear when the long press ends.

    I will let you know if I find any more improvements. Please let me know if you have the means to implement any of these. If not, I would appreciate if you pointed me in the right direction for each of these to adjust the correct parts of the library.

boominadhaprakash commented 3 years ago

Hi @Ludotrico

If you are ready to contribute to our repository, please feel free to add your code in separate branch and raise a pull request.

We will verify your code and will merge with master. Currently we are busy with our own projects work. So, it will take time to concentrate on these improvements.

Thanks for your suggestions.