Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume from Background freezes video playing #27

Open
LiveRock opened this issue May 14, 2016 · 3 comments
Open

Resume from Background freezes video playing #27

LiveRock opened this issue May 14, 2016 · 3 comments

Comments

@LiveRock
Copy link

Hi, thank you for this wonderful contribution. I hit a problem. When the app goes into background and comes back active, the video stop. Are they methods to call to start and stop the video?

@LiveRock LiveRock changed the title Resume form Background freezes video playing Resume from Background freezes video playing May 14, 2016
@sunflash
Copy link

sunflash commented May 21, 2016

That's what I did when subclass VideoSplashViewController

   override func viewDidLoad() {
        super.viewDidLoad()
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(becomeActive(_:)), name: UIApplicationDidBecomeActiveNotification, object: nil)
    }

    func becomeActive(note:NSNotification) {
        playVideo()
    }

@LiveRock
Copy link
Author

Hi Sunflash

I was able to register the notification but the compiler cannot resolve plyaVideo() even though i already subclass in

class ViewController: VideoSplashViewController,UITextFieldDelegate {

In the end, I have to remove the Pod and use the source files instead.

@antonyalkmim
Copy link

I solve this problem with this self.restartForeground = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants