Open adarshroy opened 6 years ago
Hi @adarshroy
I got into the same trouble these days.. After doing some tests, I got a pattern to solve this problem. Not sure it is the best solution or not, just share my opinion with you.
You should stopPlayingVideo in endDisplayingCell function and when system is going to reuse the cell, you should remove the previous playerView and create a new one, then setup the video Id.
Please let me know if this pattern helped you to solve this problem or any other suggestion on this problem.
Thanks!
YTPlayerView (Youtube player) is added inside a UITableViewCell. When it is played and minimized (by clicking 'done' or 'minimize' button), when we scroll downwards and that Video-cell is going out of the screen from the bottom edge, it simply doesn't go and tries to stick to the bottom only, while other cells continues to scroll beneath it.
After that when we scroll just reverse we see, the cell is now over other cells overlapping. And if you go more downwards to the actual position of the cell, you will get a 'void' in its actual position.
Inside the Video-cell, the code :
YoutubeVideoPlayerHelper class:
Actual Position of the video cell :
---------------------------------------------------------------------------
Now the VOID created at its actual position when the video cell left its place:
---------------------------------------------------------------------------
The current position of the video cell when it jumped over other cells and overlapped over them: