Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen flashes black between displaying thumbnail image and playing video. #97

Open
kselvin opened this issue Jan 28, 2020 · 3 comments

Comments

@kselvin
Copy link

kselvin commented Jan 28, 2020

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))

@iPhonig
Copy link

iPhonig commented Jan 30, 2020

@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!

@kselvin
Copy link
Author

kselvin commented Jan 30, 2020

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

@Rijalab
Copy link

Rijalab commented Apr 10, 2020

@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 ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants