andreipitis / ASPVideoPlayer

A simple video player that allow animations to be performed on the view during playback.
MIT License
89 stars 43 forks source link

How I show placeholder image in player and when player load video then remove it? #23

Closed waseem-shah-ios closed 6 years ago

waseem-shah-ios commented 6 years ago

I want to show image as place holder and when video load then play video.

andreipitis commented 6 years ago

Hi @waseem-shah-ios , you can do this with ASPVideoPlayerView, using the event callback readyToPlayVideo. The closure will be called when the video is loaded and ready to play.

Unfortunately you can't do this using ASPVideoPlayer since it uses ASPVideoPlayerView in it's implementation and does not forward the events.

waseem-shah-ios commented 6 years ago

@andreipitis I achieve this by using local notification centre. I add image view and fired notification in your library when video is ready to play and remove image view from parent view.