PlayToReceiver.NotifyVolumeChange(Double, Boolean) 方法

定义

通知“播放到”接收器音频或视频播放的音量已更改。

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)

参数

volume
Double

double

卷的新值。

mute
Boolean

bool

如果音量已静音,则为 True;否则为 false。

Windows 要求

应用功能
privateNetworkClientServer

注解

有关创建软件“播放到”接收器的示例,请参阅 媒体强制转换

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

适用于

另请参阅