in swift project, implement vlc player , activity indicator in it. , every time when load remote streaming video failed, popup alert view said your input can't opened. want catch alertview , stop activity indicator, don't know how.
i've search delegate, vlcmediadelegate , vlcmediaplayerdelegate, of can't reach requirement.
could tell me how stop activity indicator when alert show?
finally, found out solution this. add viewcontroller vlcmediaplayerdelegate, , implement method mediaplayerstatechanged
inside method, found when alert popup, state of vlcplayer equal 0!
the code this:
public func mediaplayerstatechanged(anotification: nsnotification!) { if self.vlcplayer.state.rawvalue == 0 { liveloadingindicator.stopanimating() } } hope me.
Comments
Post a Comment