Sink
Class that represents a audio sink used by the MLWebRTC API.
Inherited by:
UnityEngine.XR.MagicLeap.MLWebRTC.AudioSink,
UnityEngine.XR.MagicLeap.MLWebRTC.VideoSink,
UnityEngine.XR.MagicLeap.MLWebRTC.VideoSink
Public Fields
Stream
Gets or sets the reference to the stream.
public MLWebRTC.MediaStream Stream { get; set; }
Type | Description |
---|---|
MLWebRTC.MediaStream | Class that represents a media stream object. |
Type
Gets the type of the sink.
public MediaStream.Track.Type Type { get; set; }
Type | Description |
---|---|
MediaStream.Track.Type | Defines the types of tracks that can exist. |
Public Methods
abstract MLResult Destroy
Abstract method for destroying the sink.
public virtual abstract MLResult Destroy()
Returns: MLResult.Result will be MLResult.Code.Ok if destroying all handles was successful. MLResult.Result will be MLResult.Code.WebRTCResultInstanceNotCreated if MLWebRTC instance was not created. MLResult.Result will be MLResult.Code.WebRTCResultMismatchingHandle if an incorrect handle was sent.
Reimplemented by: Destroy, Destroy
Protected Methods
InvalidateHandle
Used to invalidate handle by inherited classes.
protected void InvalidateHandle()
SetTrack
Abstract method for setting the sink's track.
protected virtual abstract MLResult SetTrack(
MLWebRTC.MediaStream.Track track
)
Parameters
Type | Name | Description |
---|---|---|
MLWebRTC.MediaStream.Track | track | The track to set the sink to. |
Returns: MLResult.Result will be MLResult.Code.Ok if destroying all handles was successful. MLResult.Result will be MLResult.Code.WebRTCResultInstanceNotCreated if MLWebRTC instance was not created. MLResult.Result will be MLResult.Code.WebRTCResultMismatchingHandle if an incorrect handle was sent.
Reimplemented by: SetTrack
Sink
Initializes a new instance of the Sink class.
protected Sink()
Sink
Initializes a new instance of the Sink class.
protected Sink(
ulong handle
)
Parameters
Type | Name | Description |
---|---|---|
ulong | handle | The handle of the sink. |