Share via


PlayToReceiver.NotifyVolumeChange(Double, Boolean) Method

Definition

Notifies the Play To receiver that the volume of the audio or video playback has changed.

public:
 virtual void NotifyVolumeChange(double volume, bool mute) = NotifyVolumeChange;
void NotifyVolumeChange(double const& volume, bool const& mute);
public void NotifyVolumeChange(double volume, bool mute);
function notifyVolumeChange(volume, mute)
Public Sub NotifyVolumeChange (volume As Double, mute As Boolean)

Parameters

volume
Double

double

The new value for the volume.

mute
Boolean

bool

True if the volume was muted; otherwise false.

Windows requirements

App capabilities
privateNetworkClientServer

Remarks

For an example of creating a software Play To receiver, see Media casting.

void VideoPlayer_VolumeChanged(object sender, RoutedEventArgs e)
{
    if (receiver != null)
        receiver.NotifyVolumeChange(VideoPlayer.Volume, VideoPlayer.IsMuted);
}
Sub VideoPlayer_VolumeChanged()
    If receiver IsNot Nothing Then
        receiver.NotifyVolumeChange(VideoPlayer.Volume, VideoPlayer.IsMuted)
    End If
End Sub

Applies to

See also