ios8 - MPMoviePlayer won't play using Swift -
ios8 - MPMoviePlayer won't play using Swift -
i have mpmovieplayer won't play. don't know what's wrong code. i'm positive fileurl there. responses in advance!
movieplayer = mpmovieplayercontroller(contenturl: fileurl) movieplayer.preparetoplay() self.view.addsubview(movieplayer.view) movieplayer.setfullscreen(true, animated: true) movieplayer.play()
i hope fileurl right seek this,
declare movieplayer outside func viewdidload()
var movieplayer = mpmovieplayercontroller()
to test set code in func viewdidload()
movieplayer = mpmovieplayercontroller(contenturl:fileurl) movieplayer.view.frame = uiscreen.mainscreen().bounds self.view.addsubview(movieplayer.view) movieplayer.setfullscreen(true, animated: true) movieplayer.preparetoplay() movieplayer.play() movieplayer.controlstyle = mpmoviecontrolstyle.embedded
swift ios8 mpmovieplayercontroller mpmovieplayer
Comments
Post a Comment