How to mute MPMoviePlayerController in swift

284 views Asked by At

I need to use MPMoviePlayerController in the application, but their is no such method to control volume. I found one solution in obj-c. but it didnt work in swift. Can anyone please help me?

    [[MPMusicPlayerController applicationMusicPlayer] setVolume:0]
1

There are 1 answers

0
mcgtrt On

Have you tried MPVolumeView? Just like here: iOS 9: How to change volume programmatically without showing system sound bar popup? And sorry for not making a comment, my reputation doesn't allow me doing this.