Player.SetSource(MediaSource) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the media source for the player.
public:
void SetSource(Microsoft::Rtc::Collaboration::AudioVideo::MediaSource ^ source);
public void SetSource (Microsoft.Rtc.Collaboration.AudioVideo.MediaSource source);
member this.SetSource : Microsoft.Rtc.Collaboration.AudioVideo.MediaSource -> unit
Public Sub SetSource (source As MediaSource)
Parameters
- source
- MediaSource
The media source that is to be bound to the player.
Exceptions
Thrown when the source parameter is null.
Examples
The following example shows a MediaSource being removed and then it sets a new one before starting a player
C# Setting and removing a MediaSource.
// In case no source is set, RemoveSource will be no-op.
player.RemoveSource();
player.SetSource(source);
player.AttachFlow(audioVideoFlow);
player.Start();
Remarks
If the player is already started, SetSource stops it.