共用方式為


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

適用於

另請參閱