Closed whoyawn closed 7 years ago
@huyanhh how did you manage to get full screen?
Also, in my case, I'd like it to loop, which is not happening. Could you show a sample of your code, @huyanhh?
let firstPage = OnboardingContentViewController(title: nil, body: firstPageBody, videoURL: generatedVideo(file: video_string), buttonText: "hello") { () -> Void in
// do something
}
private func generateVideo(file: String) -> NSURL {
let bundle = NSBundle.mainBundle()
let moviePath = bundle.pathForResource(file, ofType: "mp4")
let movieURL = NSURL(fileURLWithPath: moviePath!)
return movieURL
}
I didn't do anything special, just imported an mp4 file
I see. You imported to the page. I was importing to the controller. The logic behind it might be different.
Is there a way to play the background mp4 just one time and then stop?
I saw the initializer
let somePage = OnboardingContentViewController(title: "test", body: "test", videoURL: url, buttonText: "test") { () -> Void in
}
and i was able to get a full screen video playing in the background of my page, but it loops forever.