共用方式為


PlayToReceiver.NotifyEnded 方法

定義

通知播放收件者音訊或視訊播放已結束。

public:
 virtual void NotifyEnded() = NotifyEnded;
void NotifyEnded();
public void NotifyEnded();
function notifyEnded()
Public Sub NotifyEnded ()

Windows 需求

應用程式功能
privateNetworkClientServer

備註

如需建立軟體播放收件者的範例,請參閱 媒體傳播

void VideoPlayer_MediaEnded(object sender, RoutedEventArgs e)
{
    if (receiver != null)
    {
        receiver.NotifyEnded();
        VideoPlayer.Stop();
    }
}
Sub VideoPlayer_MediaEnded()
    If receiver IsNot Nothing Then
        receiver.NotifyEnded()
        VideoPlayer.Stop()
    End If
End Sub

適用於

另請參閱