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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -