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

Pause/ Mute when Switching Tabs #96

Open
iPhonig opened this issue Jan 28, 2020 · 1 comment
Open

Pause/ Mute when Switching Tabs #96

iPhonig opened this issue Jan 28, 2020 · 1 comment

Comments

@iPhonig
Copy link

iPhonig commented Jan 28, 2020

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)

@piars777
Copy link

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

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

2 participants