MillicastSDK 2.2.0
Loading...
Searching...
No Matches
MCWebrtcRemoteTrack Class Reference

#include <webrtc_remote_track.h>

Inheritance diagram for MCWebrtcRemoteTrack:
Collaboration diagram for MCWebrtcRemoteTrack:

Instance Methods

(MCWebrtcRemoteAudioTrack *_Nullable) - asAudio
 
(MCWebrtcRemoteVideoTrack *_Nullable) - asVideo
 
(void) - unprojectWithCompletionHandler:
 
(void) - cancelAsyncStreamAdapter [implementation]
 

Class Methods

(instancetype _Nonnull) + webrtcRemoteTrackWithNativeTrack: [implementation]
 

Properties

id< MCWebrtcRemoteTrackDelegate > _Nullable delegate
 Delegate to receive track related events.
 
MCRemoteTrackKind kind
 Either an Audio or Video track.
 
NSString *_Nonnull currentMID
 
NSString *_Nonnull cName
 The cname of the track. Cname represents a grouping for synchronization purposes.
 

Detailed Description

The webrtc logical track.

This class represents a remote track which was requested by the application for the purpose of implementing advanced projection schemes (like keeping the RTS media projected when they go inactive, or projecting the same RTS media onto multiple tracks). Once obtained, the track remains valid as long as the viewer is not destroyed.

Method Documentation

◆ asAudio

- (MCWebrtcRemoteAudioTrack *_Nullable) asAudio

Cast the track to it's true type if it is audio, otherwise, nil will be returned.

  • Returns: Nil if the track is not of an audio type

◆ asVideo

- (MCWebrtcRemoteVideoTrack *_Nullable) asVideo

Cast the track to it's true type if it is video, otherwise, nil will be returned.

  • Returns: Nil if the track is not of a video type

◆ cancelAsyncStreamAdapter

- (void) cancelAsyncStreamAdapter
implementation

◆ unprojectWithCompletionHandler:

- (void) unprojectWithCompletionHandler: (nonnull void(^)(NSError *_Nullable)) completionHandler

Unproject this webrtc track. After unprojection, the service no longer streams media to this track.

  • Parameters:
    • completionHandler: Invoked when the asynchronous operation completes.

◆ webrtcRemoteTrackWithNativeTrack:

+ (instancetype _Nonnull) webrtcRemoteTrackWithNativeTrack: (millicast::WebrtcRemoteTrack *_Nonnull) nativeTrack
implementation

Property Documentation

◆ cName

- (NSString* _Nonnull) cName
readnonatomicassign

The cname of the track. Cname represents a grouping for synchronization purposes.

◆ currentMID

- (NSString* _Nonnull) currentMID
readnonatomicassign

The current MID of this track.

This is implemented for convenience of simple applications, but its usage is discouraged. The applications requiring to map webrtc stats to specific tracks should maintain a mid:track map, updated based on the mid update events from the tracks. Such an implementation would allow for most efficient mapping of the stats back to the tracks.

◆ delegate

- (id<MCWebrtcRemoteTrackDelegate> _Nullable) delegate
readwriteatomicweak

Delegate to receive track related events.

◆ kind

- (MCRemoteTrackKind) kind
readnonatomicassign

Either an Audio or Video track.


The documentation for this class was generated from the following file: