MMPlayerView icon indicating copy to clipboard operation
MMPlayerView copied to clipboard

Screen flashes black between displaying thumbnail image and playing video.

Open kselvin opened this issue 6 years ago • 3 comments

Is there anyway around this?

It would be great for the video to start playing without the view needing to flash black and show that loading wheel. So it could go straight from showing thumbnail to playing, as if the thumbnail was really the first frame of the video

Code mmPlayerLayer.thumbImageView.image = cell.postThumbnailImgV.image // set video where to play mmPlayerLayer.playView = cell.postThumbnailImgV self.mmPlayerLayer.set(url: URL(string: playURL))

kselvin avatar Jan 28 '20 20:01 kselvin

@kselvin I ran into this as well, my solution was that I had my own thumbnail image view on top of the video container that MMPlayerView resides in and once loading is finished (when the activity indicator disappears) I then hide my thumbnail view. That being said its just a work around and @MillmanY if you could speak to this that would be helpful!

iPhonig avatar Jan 30 '20 16:01 iPhonig

Great work around. I'd also want the loading wheel to show above the thumbnail (big videos that are slow to load sometimes). I guess I could put an additional loading wheel on top of my own thumbnail view but feels pretty hacky. Would be awesome if there is an easier way to solve this

kselvin avatar Jan 30 '20 18:01 kselvin

@MillmanY @iPhonig Is there a simpler way to resolve the black screen appearing in between playing video.

I thought of prefetching video data as MMPlayerCache. So the playback will play instantly. Is there any options like that ??

Rijalab avatar Apr 10 '20 11:04 Rijalab