FMLiveSwitchMediaIntent Class Reference

Represents media intent information for negotiating the intentions of the SDK. More...

Instance Methods

(long long) - bitrate
 Gets the target output bitrate, in kbps. More...
 
(instancetype) - init
 Initializes a new instance of the MediaIntent class. More...
 
(bool) - isVideo
 Gets whether this intent is for video media. More...
 
(FMLiveSwitchStreamDirection) - localDirection
 Gets the local stream direction. More...
 
(NSString *) - serialize
 Serializes the media intent to a string format. More...
 
(void) - setBitrate:
 Sets the target output bitrate, in kbps. More...
 
(void) - setLocalDirection:
 Sets the local stream direction. More...
 

Class Methods

(FMLiveSwitchMediaIntent *) + mediaIntent
 Initializes a new instance of the MediaIntent class. More...
 
(FMLiveSwitchMediaIntent *) + parseWithMedia:
 Parses a media intent string into a MediaIntent object. More...
 

Detailed Description

Represents media intent information for negotiating the intentions of the SDK.

Method Documentation

◆ bitrate

- (long long) bitrate

Gets the target output bitrate, in kbps.

A value of -1 indicates unset (no target).

◆ init

- (instancetype) init

Initializes a new instance of the MediaIntent class.

Implemented in FMLiveSwitchVideoIntent, and FMLiveSwitchAudioIntent.

◆ isVideo

- (bool) isVideo

Gets whether this intent is for video media.

◆ localDirection

- (FMLiveSwitchStreamDirection) localDirection

Gets the local stream direction.

◆ mediaIntent

+ (FMLiveSwitchMediaIntent*) mediaIntent

Initializes a new instance of the MediaIntent class.

◆ parseWithMedia:

+ (FMLiveSwitchMediaIntent*) parseWithMedia: (NSString *)  media

Parses a media intent string into a MediaIntent object.

Parameters
mediaThe serialized media intent string.
Returns
A MediaIntent object, or null if parsing fails.

◆ serialize

- (NSString*) serialize

Serializes the media intent to a string format.

Returns
Serialized media intent string.

Implemented in FMLiveSwitchVideoIntent.

◆ setBitrate:

- (void) setBitrate: (long long)  value

Sets the target output bitrate, in kbps.

A value of -1 indicates unset (no target).

◆ setLocalDirection:

- (void) setLocalDirection: (FMLiveSwitchStreamDirection)  value

Sets the local stream direction.