A collection of audio/video tracks. More...
Instance Methods | |
(void) | - addAudioTrack: |
Adds an audio track. More... | |
(void) | - addOnAudioDestroyed: |
Adds a handler that is raised when the audio track is destroyed. More... | |
(void) | - addOnAudioLevel: |
Adds a handler that is raised periodically when the audio's level is calculated. More... | |
(double) | - addOnAudioLevelWithBlock |
Adds a handler that is raised periodically when the audio's level is calculated. More... | |
(void) | - addOnAudioLevelWithBlock: |
Adds a handler that is raised periodically when the audio's level is calculated. More... | |
(void) | - addOnVideoDestroyed: |
Adds a handler that is raised when the video track is destroyed. More... | |
(void) | - addOnVideoSize: |
Adds a handler that is raised whenever the video's frame size is known, once per frame. More... | |
(void) | - addOnVideoSizeChange: |
Adds a handler that is raised whenever the video's frame size changes. More... | |
(FMLiveSwitchSize *) | - addOnVideoSizeChangeWithBlock |
Adds a handler that is raised whenever the video's frame size changes. More... | |
(void) | - addOnVideoSizeChangeWithBlock: |
Adds a handler that is raised whenever the video's frame size changes. More... | |
(FMLiveSwitchSize *) | - addOnVideoSizeWithBlock |
Adds a handler that is raised whenever the video's frame size is known, once per frame. More... | |
(void) | - addOnVideoSizeWithBlock: |
Adds a handler that is raised whenever the video's frame size is known, once per frame. More... | |
(void) | - addVideoTrack: |
Adds a video track. More... | |
(NSMutableArray *) | - arrayFromAudioTracks: |
Creates an array of tracks from a list of audio tracks. More... | |
(NSMutableArray *) | - arrayFromVideoTracks: |
Creates an array of tracks from a list of video tracks. More... | |
(int) | - audioLevelInterval |
Gets the interval in milliseconds between FMLiveSwitchMedia`2addOnAudioLevel: events. More... | |
(NSMutableArray *) | - audioTracks |
Gets all audio tracks from this media. More... | |
(NSMutableArray< TAudioTrack > *) | - createAudioTrackCollection |
Creates an audio track collection. More... | |
(NSMutableArray< TVideoTrack > *) | - createVideoTrackCollection |
Creates a video track collection. More... | |
(void) | - destroy |
Destroys all non-persistent internal objects encapsulated by the Media class. More... | |
(FMLiveSwitchFuture< FMLiveSwitchVideoBuffer * > *) | - grabVideoFrame |
Gets the next frame from the video track once it is rendered. More... | |
(instancetype) | - init |
Initializes a new instance of the FMLiveSwitchMedia`2 class. More... | |
(bool) | - isRecordingAudio |
Gets whether audio is being recorded locally. More... | |
(bool) | - isRecordingVideo |
Gets whether video is being recorded locally. More... | |
(bool) | - removeAudioTrack: |
Removes an audio track. More... | |
(void) | - removeOnAudioDestroyed: |
Removes a handler that is raised when the audio track is destroyed. More... | |
(void) | - removeOnAudioLevel: |
Removes a handler that is raised periodically when the audio's level is calculated. More... | |
(void) | - removeOnVideoDestroyed: |
Removes a handler that is raised when the video track is destroyed. More... | |
(void) | - removeOnVideoSize: |
Removes a handler that is raised whenever the video's frame size is known, once per frame. More... | |
(void) | - removeOnVideoSizeChange: |
Removes a handler that is raised whenever the video's frame size changes. More... | |
(bool) | - removeVideoTrack: |
Removes a video track. More... | |
(void) | - setAudioLevelInterval: |
Sets the interval in milliseconds between FMLiveSwitchMedia`2addOnAudioLevel: events. More... | |
(void) | - setIsRecordingAudio: |
Sets whether audio is being recorded locally. More... | |
(void) | - setIsRecordingVideo: |
Sets whether video is being recorded locally. More... | |
(FMLiveSwitchSize *) | - videoSize |
Gets the size of the video track. More... | |
(NSMutableArray *) | - videoTracks |
Gets all video tracks from this media. More... | |
Class Methods | |
(FMLiveSwitchMedia *) | + media |
Initializes a new instance of the FMLiveSwitchMedia`2 class. More... | |
Protected Attributes | |
__pad0__: FMLiveSwitchMediaBase<TAudioTrack | |
A collection of audio/video tracks.
- (void) addAudioTrack: | (TAudioTrack) | audioTrack |
Adds an audio track.
audioTrack | The audio track. |
- (void) addOnAudioDestroyed: | (FMLiveSwitchAction0 *) | value |
Adds a handler that is raised when the audio track is destroyed.
If there are multiple audio tracks in a custom media stack, only the first audio track triggers this event.
- (void) addOnAudioLevel: | (FMLiveSwitchAction1< id > *) | value |
Adds a handler that is raised periodically when the audio's level is calculated.
When the media is in the Started state, the function runs multiple times per second. The frequency depends on the audio sampling rate.
Use this method to determine which audio streams are active.
If there are multiple audio tracks in a custom media stack, only the first audio track triggers this event.
- (double) addOnAudioLevelWithBlock |
Adds a handler that is raised periodically when the audio's level is calculated.
When the media is in the Started state, the function runs multiple times per second. The frequency depends on the audio sampling rate.
Use this method to determine which audio streams are active.
If there are multiple audio tracks in a custom media stack, only the first audio track triggers this event.
- (void) addOnAudioLevelWithBlock: | (void(^)(double)) | valueBlock |
Adds a handler that is raised periodically when the audio's level is calculated.
When the media is in the Started state, the function runs multiple times per second. The frequency depends on the audio sampling rate.
Use this method to determine which audio streams are active.
If there are multiple audio tracks in a custom media stack, only the first audio track triggers this event.
- (void) addOnVideoDestroyed: | (FMLiveSwitchAction0 *) | value |
Adds a handler that is raised when the video track is destroyed.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) addOnVideoSize: | (FMLiveSwitchAction1< FMLiveSwitchSize * > *) | value |
Adds a handler that is raised whenever the video's frame size is known, once per frame.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) addOnVideoSizeChange: | (FMLiveSwitchAction1< FMLiveSwitchSize * > *) | value |
Adds a handler that is raised whenever the video's frame size changes.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (FMLiveSwitchSize*) addOnVideoSizeChangeWithBlock |
Adds a handler that is raised whenever the video's frame size changes.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) addOnVideoSizeChangeWithBlock: | (void(^)(FMLiveSwitchSize *)) | valueBlock |
Adds a handler that is raised whenever the video's frame size changes.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (FMLiveSwitchSize*) addOnVideoSizeWithBlock |
Adds a handler that is raised whenever the video's frame size is known, once per frame.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) addOnVideoSizeWithBlock: | (void(^)(FMLiveSwitchSize *)) | valueBlock |
Adds a handler that is raised whenever the video's frame size is known, once per frame.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) addVideoTrack: | (TVideoTrack) | videoTrack |
Adds a video track.
videoTrack | The video track. |
- (NSMutableArray*) arrayFromAudioTracks: | (NSMutableArray< TAudioTrack > *) | tracks |
Creates an array of tracks from a list of audio tracks.
tracks | The list of tracks. |
- (NSMutableArray*) arrayFromVideoTracks: | (NSMutableArray< TVideoTrack > *) | tracks |
Creates an array of tracks from a list of video tracks.
tracks | The list of tracks. |
- (int) audioLevelInterval |
Gets the interval in milliseconds between FMLiveSwitchMedia`2addOnAudioLevel: events.
Defaults to 200.
- (NSMutableArray*) audioTracks |
Gets all audio tracks from this media.
- (NSMutableArray<TAudioTrack>*) createAudioTrackCollection |
Creates an audio track collection.
Implemented in FMLiveSwitchRemoteMedia.
- (NSMutableArray<TVideoTrack>*) createVideoTrackCollection |
Creates a video track collection.
Implemented in FMLiveSwitchRemoteMedia.
- (void) destroy |
Destroys all non-persistent internal objects encapsulated by the Media class.
This method iterates over all audio and video tracks and calls each track's Destroy method for non-persistent tracks.
- (FMLiveSwitchFuture<FMLiveSwitchVideoBuffer*>*) grabVideoFrame |
Gets the next frame from the video track once it is rendered.
If there are multiple video tracks in a custom media stack, this method calls into the first video track.
This method could be used for asynchronous video processing or analysis.
- (instancetype) init |
Initializes a new instance of the FMLiveSwitchMedia`2 class.
Implemented in FMLiveSwitchRemoteMedia.
- (bool) isRecordingAudio |
Gets whether audio is being recorded locally.
- (bool) isRecordingVideo |
Gets whether video is being recorded locally.
+ (FMLiveSwitchMedia*) media |
Initializes a new instance of the FMLiveSwitchMedia`2 class.
- (bool) removeAudioTrack: | (TAudioTrack) | audioTrack |
Removes an audio track.
audioTrack | The audio track. |
- (void) removeOnAudioDestroyed: | (FMLiveSwitchAction0 *) | value |
Removes a handler that is raised when the audio track is destroyed.
If there are multiple audio tracks in a custom media stack, only the first audio track triggers this event.
- (void) removeOnAudioLevel: | (FMLiveSwitchAction1< id > *) | value |
Removes a handler that is raised periodically when the audio's level is calculated.
When the media is in the Started state, the function runs multiple times per second. The frequency depends on the audio sampling rate.
Use this method to determine which audio streams are active.
If there are multiple audio tracks in a custom media stack, only the first audio track triggers this event.
- (void) removeOnVideoDestroyed: | (FMLiveSwitchAction0 *) | value |
Removes a handler that is raised when the video track is destroyed.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) removeOnVideoSize: | (FMLiveSwitchAction1< FMLiveSwitchSize * > *) | value |
Removes a handler that is raised whenever the video's frame size is known, once per frame.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (void) removeOnVideoSizeChange: | (FMLiveSwitchAction1< FMLiveSwitchSize * > *) | value |
Removes a handler that is raised whenever the video's frame size changes.
If there are multiple video tracks in a custom media stack, only the first video track triggers this event.
- (bool) removeVideoTrack: | (TVideoTrack) | videoTrack |
Removes a video track.
videoTrack | The video track. |
- (void) setAudioLevelInterval: | (int) | value |
Sets the interval in milliseconds between FMLiveSwitchMedia`2addOnAudioLevel: events.
Defaults to 200.
- (void) setIsRecordingAudio: | (bool) | value |
Sets whether audio is being recorded locally.
- (void) setIsRecordingVideo: | (bool) | value |
Sets whether video is being recorded locally.
- (FMLiveSwitchSize*) videoSize |
Gets the size of the video track.
If there are multiple video tracks in a custom media stack, this property is bound to the first video track.
If you need to adjust a UI’s layout, use this property to check video dimensions. You can also use OnVideoSize to ensure that the code is responsive.
- (NSMutableArray*) videoTracks |
Gets all video tracks from this media.
|
protected |