MMPlayerView icon indicating copy to clipboard operation
MMPlayerView copied to clipboard

Pause/ Mute when Switching Tabs

Open iPhonig opened this issue 6 years ago • 1 comments

I've implemented this similarly to the example project, however, when I switch tabs on the tab bar I would like the video to pause/ mute. I have attempted the following, with no luck. Any ideas?

func pauseVideos(){ mmPlayerLayer.player?.pause() mmPlayerLayer.player?.isMuted = true }

I've added the pause function in override func viewDidDisappear(_ animated: Bool) and also in override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem)

iPhonig avatar Jan 28 '20 17:01 iPhonig

Hello, i'm facing the same issue. I call mmPlayerLayer.player?.pause() when viewWillDisapear but the video still playing. Any idea?

piars777 avatar Mar 25 '20 22:03 piars777