VideoSplashKit icon indicating copy to clipboard operation
VideoSplashKit copied to clipboard

Resume from Background freezes video playing

Open LiveRock opened this issue 9 years ago • 3 comments

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 avatar May 14 '16 02:05 LiveRock

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()
    }

sunflash avatar May 21 '16 13:05 sunflash

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.

LiveRock avatar May 23 '16 02:05 LiveRock

I solve this problem with this self.restartForeground = true

antonyalkmim avatar Jun 30 '16 14:06 antonyalkmim