MillicastSDK 1.8.4
Loading...
Searching...
No Matches
Instance Methods | List of all members
<MCSubscriberDelegate> Protocol Reference

#import <viewer.h>

Inheritance diagram for <MCSubscriberDelegate>:
Inheritance graph
[legend]
Collaboration diagram for <MCSubscriberDelegate>:
Collaboration graph
[legend]

Instance Methods

(void) - onSubscribed
 Called when the subscriber starts receiving media.
 
(void) - onVideoTrack:withMid:
 
(void) - onAudioTrack:withMid:
 
(void) - onActive:tracks:sourceId:
 
(void) - onInactive:sourceId:
 
(void) - onStopped
 Callback is not currently used, but is reserved for future usage.
 
(void) - onVad:sourceId:
 
(void) - onLayers:activeLayers:inactiveLayers:
 
(void) - onFrameMetadata:withLength:withSsrc:withTimestamp:
 

Detailed Description

Delegate protocol that can be implemented to receive subscriber specific events. Initialize the viewer with a delegate via MCSubscriber/initWithDelegate:

Method Documentation

◆ onActive:tracks:sourceId:

- (void) onActive: (nonnull NSString *)  streamId
tracks: (nonnull NSArray< NSString * > *)  tracks
sourceId: (nonnull NSString *)  sourceId 

Called when a new source has been publishing within the new stream

  • Parameters:
    • streamId: The stream id.
    • tracks: All the track ids within the stream
    • sourceId: The source id if the publisher has set one.

◆ onAudioTrack:withMid:

- (void) onAudioTrack: (nonnull MCAudioTrack *)  track
withMid: (nonnull NSString *)  mid 

Called when a remote audio track has been added.

  • Parameters:
    • track: The remote audio track.
    • mid: The associated transceiver mid. Can be nil if there is none.

◆ onFrameMetadata:withLength:withSsrc:withTimestamp:

- (void) onFrameMetadata: (nonnull const unsigned char *)  data
withLength: (int)  length
withSsrc: (int)  ssrc
withTimestamp: (int)  timestamp 
optional

Called when a frame is received and not yet decoded. Provide extracted metadata embedded in a frame if any. Any data provided by MCPublisherDelegate/onTransformableFrame:withSsrc:withTimestamp: can be accessed here.

  • Parameters:
    • data: Array of metadata coming from the publisher.
    • length: Length of the metadata array
    • ssrc: Synchronization source of the frame
    • timestamp: Timestamp of the frame

◆ onInactive:sourceId:

- (void) onInactive: (nonnull NSString *)  streamId
sourceId: (nonnull NSString *)  sourceId 

Called when a source has been unpublished within the stream

  • Parameters:
    • streamId: The stream id. Generally in the form of AccountID/StreamName.
    • sourceId: The source id set by the publisher if any.

◆ onLayers:activeLayers:inactiveLayers:

- (void) onLayers: (nonnull NSString *)  mid
activeLayers: (nonnull NSArray< MCLayerData * > *)  activeLayers
inactiveLayers: (nonnull NSArray< NSString * > *)  inactiveLayers 

Called when simulcast/svc layers are available

  • Parameters:
    • mid: The mid associated to the track.
    • activeLayers: Active simulcast/SVC layers
    • inactiveLayers: inactive simulcast/SVC layers

◆ onStopped

- (void) onStopped

Callback is not currently used, but is reserved for future usage.

◆ onSubscribed

- (void) onSubscribed

Called when the subscriber starts receiving media.

◆ onVad:sourceId:

- (void) onVad: (nonnull NSString *)  mid
sourceId: (nonnull NSString *)  sourceId 

Called when a source id is being multiplexed into the audio track based on the voice activity level.

  • Parameters:
    • mid: The media ID which represents the current WebRTC transceiver associated with the source's audio track.
    • sourceId: The publisher's source ID.

◆ onVideoTrack:withMid:

- (void) onVideoTrack: (nonnull MCVideoTrack *)  track
withMid: (nonnull NSString *)  mid 

Called when a remote video track has been added.

  • Parameters:
    • track: The remote video track.

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