jazz_Developer
jazz_Developer

Reputation: 1

How to Mute volume on Button Clicked in MediaManager Plugin xamarin forms

How to Mute volume on Button Clicked in MediaManager Plugin xamarin forms

Below is my function

private void MuteClicked(object sender, EventArgs e) {

        if (CrossMediaManager.Current.VolumeManager.Mute)
        {
            CrossMediaManager.Current.VolumeManager.Mute = false;
            muteBtn.Text = "Mute";
        }
        else
        {
            CrossMediaManager.Current.VolumeManager.Mute = true;
            muteBtn.Text = "Unmute";
        }

}

Button name is Changing but not affecting Volume

Upvotes: 0

Views: 840

Answers (2)

Valentin
Valentin

Reputation: 21

I know it's an old thread but since there were no new release for the MediaPlayer and this is still the top result for this problem, you can use the unofficial nuget (https://www.nuget.org/packages/MediaManager.Unofficial/) witch is just a fork of the version 0.4.5 with some adjustments. I just tried it and the Mute (which is now Muted) works, like the volume too.

Regards

Upvotes: 0

Michael
Michael

Reputation: 77

The current version (0.4.5) available via Nuget only contains placeholders for the volume controls.

Either your download the last version from the GIT repository ( https://github.com/martijn00/XamarinMediaManager ) or you wait for the next release.

Upvotes: 1

Related Questions