piemonte/PBJVideoPlayer

Sample project, update to show auto-play while scrolling

Closed this issue · 12 comments

Update the sample project to show auto-play while scrolling

Hey Piemonte, I don't see anything in the sample project that shows auto-play while scrolling...I just see the basic view controller example. Is the auto-play sample project still available?

hey @brandonskane

it currently doesn't do it but this issue is open so that it can be done sometime in the future

hey @mitchellporter haven't had the opportunity to do this. there's a little discussion about how it's done here, piemonte/Player#12

you just have to set the player's path based on either the scroll velocity slowing down dramatically or stopping. when it starts to scroll again, ensuring the player and cell is properly reset offscreen.

@mitchellporter hey there, thanks much for the kind words. so when i say player, i'm referring to the PBJVideoPlayer controller. i haven't focused on an app recently that displays a list of videos so apologies, haven't had a chance to work through an example.

basically, each table cell could manage it's own 'PBJVideoPlayer' controller. the controller would have it's path set based on the scrolling behavior of the scroll view.

there's other ways to do this but that's probably the best method when using this library.

@mitchellporter would you consider sharing what you done to avplayer to optimize video download with scrolling? Thank you in advance :)

@georgel I can also share advanced usage as well, but give me the weekend to create a generalized example

@rromanchuk Wow! Thank you! I will take any advice you can share :)

@mitchellporter Can you share that please ?
Also please how to remove black screen when video is replayed ( I have video which play automatically in loops) but when video is finished and replayed there's black screen that appear?

@piemonte @mitchellporter I'm extremely curious on what you guys are doing to improve scrolling performance. On the newer devices (6 and 6+), scrolling performance is impacted minimally (occasionally there's a stutter), but on 5 and 5s, a feed of videos using PBJVideoPlayerController is practically unusable.

I dug around the code a little bit and noticed that keys are already loaded asynchronously, and the player item's are switched using replaceCurrentItemWithPlayerItem:. Are there any other optimizations or pain points you guys are aware of?

@piemonte @rromanchuk @georgel any update, did Any one succeeded to implement PBJVideoPalyer in tableView or collectionView

@piemonte @rromanchuk @georgel @chlebta any update, did Any one succeeded to implement PBJVideoPalyer in tableView or collectionView?