A class that supplies simple video frame layout management. More...
Instance Methods | |
(FMLiveSwitchLayout *) | - addOnLayoutWithBlock |
Adds a handler that is raised when a layout is calculated. More... | |
(void) | - addOnLayoutWithBlock: |
Adds a handler that is raised when a layout is calculated. More... | |
(bool) | - addRemoteMedia: |
Adds remote media to the layout. More... | |
(bool) | - addRemoteViewsWithIds:views: |
Adds remote views to the layout. More... | |
(bool) | - addRemoteViewWithId:view: |
Adds a remote view to the layout. More... | |
(void) | - addView: |
Adds a view to the container. More... | |
(void) | - dispatchToMainThreadWithAction:arg1:arg2: |
Dispatches an action to the main thread. More... | |
(void) | - dispatchToMainThreadWithActionBlock:arg1:arg2: |
Dispatches an action to the main thread. More... | |
(id, id) | - dispatchToMainThreadWithActionBlockAndArg1AndArg2 |
Dispatches an action to the main thread. More... | |
(T) | - doGetLocalView |
Gets the local view. More... | |
(NSMutableArray *) | - doGetRemoteViewsIds |
Gets the remote view IDs. More... | |
(NSMutableArray< T > *) | - doGetRemoteViewsWithId: |
Gets the remote views for a given remote view ID. More... | |
(FMLiveSwitchLayout *) | - getLayoutWithLayoutWidth:layoutHeight:local:remoteCount: |
Gets a video frame layout. More... | |
(FMLiveSwitchLayout *) | - getLayoutWithLayoutWidth:layoutHeight:local:remoteCount:remoteViewIds: |
Gets a video frame layout. More... | |
(FMLiveSwitchLayout *) | - getLayoutWithLayoutWidth:layoutHeight:local:remoteCount:remoteViewIds:localVideoSize:remoteVideoSizes: |
Gets a video frame layout. More... | |
(FMLiveSwitchLayout *) | - getLayoutWithLayoutWidth:layoutHeight:remoteCount: |
Gets a video frame layout. More... | |
(FMLiveSwitchLayout *) | - getLayoutWithLayoutWidth:layoutHeight:remoteCount:remoteViewIds: |
Gets a video frame layout. More... | |
(T) | - getLocalView |
Gets the local view from the layout. More... | |
(NSMutableArray *) | - getRemoteViewIds |
Gets the IDs of the remote views in the layout. More... | |
(NSMutableArray< T > *) | - getRemoteViews |
Gets all remote views from the layout. More... | |
(NSMutableArray< T > *) | - getRemoteViewsWithIds: |
Gets remote views from the layout. More... | |
(T) | - getRemoteViewWithId: |
Gets a remote view from the layout. More... | |
(instancetype) | - init |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class. More... | |
(instancetype) | - initWithPreset: |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class. More... | |
(void) | - layout |
Positions the local and remote views within the layout. More... | |
(void) | - layoutOnMainThread |
Positions the local and remote views within the layout after dispatching to the main thread. More... | |
(FMLiveSwitchLayoutOrigin) | - layoutOrigin |
Gets the layout origin. More... | |
(void) | - removeOnLayout: |
Removes a handler that is raised when a layout is calculated. More... | |
(bool) | - removeRemoteMedia: |
Removes remote media from the layout. More... | |
(void) | - removeRemoteViews |
Removes all remote views from the layout. More... | |
(bool) | - removeRemoteViewsWithIds: |
Removes remote views from the layout. More... | |
(bool) | - removeRemoteViewWithId: |
Removes a remote view from the layout. More... | |
(void) | - removeView: |
Removes a view from the container. More... | |
(void) | - reset |
Removes all remote views from the layout, then removes the local view from the layout. More... | |
(void) | - setLayoutOrigin: |
Sets the layout origin. More... | |
(bool) | - setLocalMedia: |
Adds the local media to the layout. More... | |
(bool) | - setLocalView: |
Adds the local view to the layout. More... | |
(bool) | - swapRemoteMediaWithRemoteMediaToRemove:remoteMediaToAdd: |
Swaps remote media in the layout. More... | |
(bool) | - swapRemoteViewsWithIdsToRemove:idsToAdd:viewsToAdd: |
Swaps remote views in the layout. More... | |
(bool) | - swapRemoteViewWithIdToRemove:idToAdd:viewToAdd: |
Swaps a remote view in the layout. More... | |
(bool) | - unsetLocalView |
Removes the local view from the layout. More... | |
Class Methods | |
(FMLiveSwitchLayoutManager *) | + layoutManager |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class. More... | |
(FMLiveSwitchLayoutManager *) | + layoutManagerWithPreset: |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class. More... | |
Protected Attributes | |
__pad0__: FMLiveSwitchLayoutPreset- (void) addOnLayout:(FMLiveSwitchAction1<FMLiveSwitchLayout*>*)value | |
A class that supplies simple video frame layout management.
- (FMLiveSwitchLayout*) addOnLayoutWithBlock |
Adds a handler that is raised when a layout is calculated.
- (void) addOnLayoutWithBlock: | (void(^)(FMLiveSwitchLayout *)) | valueBlock |
Adds a handler that is raised when a layout is calculated.
- (bool) addRemoteMedia: | (NSObject< FMLiveSwitchIViewableMedia > *) | remoteMedia |
Adds remote media to the layout.
remoteMedia | The remote media. |
true
if successful; otherwise, false
. - (bool) addRemoteViewsWithIds: | (NSMutableArray *) | ids | |
views: | (NSMutableArray *) | views | |
Adds remote views to the layout.
ids | The remote view IDs. |
views | The remote views. |
true
if successful; otherwise, false
. Check the logs for additional information. - (bool) addRemoteViewWithId: | (NSString *) | idValue | |
view: | (T) | view | |
Adds a remote view to the layout.
idValue | The remote view ID. |
view | The remote view. |
true
if successful; otherwise, false
. Check the logs for additional information. - (void) addView: | (T) | view |
Adds a view to the container.
view | The view to add. |
- (void) dispatchToMainThreadWithAction: | (FMLiveSwitchAction2< id, id > *) | action | |
arg1: | (id) | arg1 | |
arg2: | (id) | arg2 | |
Dispatches an action to the main thread.
action | The action to invoke. |
arg1 | The first argument. |
arg2 | The second argument. |
- (void) dispatchToMainThreadWithActionBlock: | (void(^)(id, id)) | actionBlock | |
arg1: | (id) | arg1 | |
arg2: | (id) | arg2 | |
Dispatches an action to the main thread.
actionBlock | The action to invoke. |
arg1 | The first argument. |
arg2 | The second argument. |
Dispatches an action to the main thread.
@inlineparam actionBlock The action to invoke. @inlineparam arg1 The first argument. @inlineparam arg2 The second argument.
- T doGetLocalView |
Gets the local view.
- (NSMutableArray*) doGetRemoteViewsIds |
Gets the remote view IDs.
- (NSMutableArray<T>*) doGetRemoteViewsWithId: | (NSString *) | idValue |
Gets the remote views for a given remote view ID.
idValue | The remote view ID. |
- (FMLiveSwitchLayout*) getLayoutWithLayoutWidth: | (int) | layoutWidth | |
layoutHeight: | (int) | layoutHeight | |
local: | (bool) | local | |
remoteCount: | (int) | remoteCount | |
Gets a video frame layout.
layoutWidth | The total width of the layout. |
layoutHeight | The total height of the layout. |
local | Whether a local frame is needed. |
remoteCount | The number of remote frames. |
- (FMLiveSwitchLayout*) getLayoutWithLayoutWidth: | (int) | layoutWidth | |
layoutHeight: | (int) | layoutHeight | |
local: | (bool) | local | |
remoteCount: | (int) | remoteCount | |
remoteViewIds: | (NSMutableArray *) | remoteViewIds | |
Gets a video frame layout.
layoutWidth | The total width of the layout. |
layoutHeight | The total height of the layout. |
local | Whether a local frame is needed. |
remoteCount | The number of remote frames. |
remoteViewIds | The remote view IDs. |
- (FMLiveSwitchLayout*) getLayoutWithLayoutWidth: | (int) | layoutWidth | |
layoutHeight: | (int) | layoutHeight | |
local: | (bool) | local | |
remoteCount: | (int) | remoteCount | |
remoteViewIds: | (NSMutableArray *) | remoteViewIds | |
localVideoSize: | (FMLiveSwitchSize *) | localVideoSize | |
remoteVideoSizes: | (NSMutableArray *) | remoteVideoSizes | |
Gets a video frame layout.
layoutWidth | The total width of the layout. |
layoutHeight | The total height of the layout. |
local | Whether a local frame is needed. |
remoteCount | The number of remote frames. |
remoteViewIds | The remote view IDs. |
localVideoSize | The local video size. |
remoteVideoSizes | The remote video sizes. |
- (FMLiveSwitchLayout*) getLayoutWithLayoutWidth: | (int) | layoutWidth | |
layoutHeight: | (int) | layoutHeight | |
remoteCount: | (int) | remoteCount | |
Gets a video frame layout.
layoutWidth | The total width of the layout. |
layoutHeight | The total height of the layout. |
remoteCount | The number of remote frames. |
- (FMLiveSwitchLayout*) getLayoutWithLayoutWidth: | (int) | layoutWidth | |
layoutHeight: | (int) | layoutHeight | |
remoteCount: | (int) | remoteCount | |
remoteViewIds: | (NSMutableArray *) | remoteViewIds | |
Gets a video frame layout.
layoutWidth | The total width of the layout. |
layoutHeight | The total height of the layout. |
remoteCount | The number of remote frames. |
remoteViewIds | The remote view IDs. |
- T getLocalView |
Gets the local view from the layout.
- (NSMutableArray*) getRemoteViewIds |
Gets the IDs of the remote views in the layout.
- (NSMutableArray<T>*) getRemoteViews |
Gets all remote views from the layout.
- (NSMutableArray<T>*) getRemoteViewsWithIds: | (NSMutableArray *) | ids |
Gets remote views from the layout.
ids | The remote view IDs. |
- T getRemoteViewWithId: | (NSString *) | idValue |
Gets a remote view from the layout.
idValue | The remote view ID. |
- (instancetype) init |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class.
- (instancetype) initWithPreset: | (FMLiveSwitchLayoutPreset *) | preset |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class.
- (void) layout |
Positions the local and remote views within the layout.
+ (FMLiveSwitchLayoutManager*) layoutManager |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class.
+ (FMLiveSwitchLayoutManager*) layoutManagerWithPreset: | (FMLiveSwitchLayoutPreset *) | preset |
Initializes a new instance of the FMLiveSwitchLayoutManager`1 class.
- (void) layoutOnMainThread |
Positions the local and remote views within the layout after dispatching to the main thread.
- (FMLiveSwitchLayoutOrigin) layoutOrigin |
Gets the layout origin.
Defaults to TopLeft.
- (void) removeOnLayout: | (FMLiveSwitchAction1< FMLiveSwitchLayout * > *) | value |
Removes a handler that is raised when a layout is calculated.
- (bool) removeRemoteMedia: | (NSObject< FMLiveSwitchIViewableMedia > *) | remoteMedia |
Removes remote media from the layout.
remoteMedia | The remote media. |
true
if successful; otherwise, false
. - (void) removeRemoteViews |
Removes all remote views from the layout.
- (bool) removeRemoteViewsWithIds: | (NSMutableArray *) | ids |
Removes remote views from the layout.
ids | The remote view IDs. |
true
if successful; otherwise, false
. Check the logs for additional information. - (bool) removeRemoteViewWithId: | (NSString *) | idValue |
Removes a remote view from the layout.
idValue | The remote view ID. |
true
if successful; otherwise, false
. Check the logs for additional information. - (void) removeView: | (T) | view |
Removes a view from the container.
view | The view to remove. |
- (void) reset |
Removes all remote views from the layout, then removes the local view from the layout.
- (void) setLayoutOrigin: | (FMLiveSwitchLayoutOrigin) | value |
Sets the layout origin.
Defaults to TopLeft.
- (bool) setLocalMedia: | (NSObject< FMLiveSwitchIViewableMedia > *) | localMedia |
Adds the local media to the layout.
localMedia | The local media. |
true
if successful; otherwise, false
. - (bool) setLocalView: | (T) | view |
Adds the local view to the layout.
view | The local view. |
true
if successful; otherwise, false
. Check the logs for additional information. - (bool) swapRemoteMediaWithRemoteMediaToRemove: | (NSObject< FMLiveSwitchIViewableMedia > *) | remoteMediaToRemove | |
remoteMediaToAdd: | (NSObject< FMLiveSwitchIViewableMedia > *) | remoteMediaToAdd | |
Swaps remote media in the layout.
remoteMediaToRemove | The remote media to remove. |
remoteMediaToAdd | The remote media to add. |
- (bool) swapRemoteViewsWithIdsToRemove: | (NSMutableArray *) | idsToRemove | |
idsToAdd: | (NSMutableArray *) | idsToAdd | |
viewsToAdd: | (NSMutableArray *) | viewsToAdd | |
Swaps remote views in the layout.
idsToRemove | The remote view IDs to remove. |
idsToAdd | The remote view IDs to add. |
viewsToAdd | The remote views to add. |
true
if successful; otherwise, false
. Check the logs for additional information. - (bool) swapRemoteViewWithIdToRemove: | (NSString *) | idToRemove | |
idToAdd: | (NSString *) | idToAdd | |
viewToAdd: | (T) | viewToAdd | |
Swaps a remote view in the layout.
idToRemove | The remote view ID to remove. |
idToAdd | The remote view ID to add. |
viewToAdd | The remote view to add. |
- (bool) unsetLocalView |
Removes the local view from the layout.
true
if successful; otherwise, false
. Check the logs for additional information.
|
protected |