简体   繁体   中英

MP4 video as background

I am trying to create something like vine app has.

This is what I got so far:

func playVideo() {
        let path = NSBundle.mainBundle().pathForResource("WelcomeVideo", ofType: "mp4")
        let pathURL = NSURL.fileURLWithPath(path!)

        let myPlayer = MPMoviePlayerViewController(contentURL: pathURL)
        myPlayer.moviePlayer.repeatMode = .One

        presentMoviePlayerViewControllerAnimated(myPlayer)
    }

But the problem is that it shows the playbutton and such.. Any suggestions?

你有没有尝试过这样的事情?

myPlayer.moviePlayer.controlStyle = MPMovieControlStyleNone

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM