WhiteDisplayer Class Reference
Inherits from | NSObject |
---|---|
Declared in | WhiteDisplayer.h |
Overview
Whiteboard room basic information.
The WhiteRoom
class can inherit the methods of the WhiteDisplayer
class.
)
This property is deprecated. The WhiteboardView
class inherits from the UIView
class, so you can use the backgroundcolor
property of the UIView
class to modify the background color of the whiteboard. See backgroundcolor
for details.
@property (nonatomic, strong) UIColor *__deprecated_msg ( "use WhiteboardView's backgroundColor property" )
Declared In
WhiteDisplayer.h
– postIframeMessage:
The key information sent to the iframe plugin.
- (void)postIframeMessage:(id)payload
Parameters
payload |
Key information. |
---|
Declared In
WhiteDisplayer.h
– getSceneFromScenePath:result:
Gets the information about a specified scene.
- (void)getSceneFromScenePath:(NSString *)scenePath result:(void ( ^ ) ( WhiteScene *_Nullable scene ))result
Parameters
scenePath |
The path of a scene. Ensure the scene path stars with |
---|---|
result |
The call result. The SDK outputs the information about the specified scene if the method call succeeds. See WhiteScene. |
Declared In
WhiteDisplayer.h
– getScenePathType:result:
Gets the type of the scene path.
- (void)getScenePathType:(NSString *)pathOrDir result:(void ( ^ ) ( WhiteScenePathType pathType ))result
Parameters
pathOrDir |
The path of the scene. |
---|---|
result |
The callback, which reports the global state of the room. See WhiteScenePathType. |
Discussion
This method returns the scene type for the scene path that you specify in the method.
Declared In
WhiteDisplayer.h
– getEntireScenes:
Gets information about all scenes in the room.
- (void)getEntireScenes:(void ( ^ ) ( NSDictionary<NSString*,NSArray<WhiteScene*> *> *dict ))result
Parameters
result |
The callback, which reports the information about all scenes in the room. |
---|
Declared In
WhiteDisplayer.h
– addMagixEventListener:
Adds a listener for a customized event.
- (void)addMagixEventListener:(NSString *)eventName
Parameters
eventName |
The name of the event. |
---|
Discussion
You can receive the customized event callback after a successful call of this method.
Note:
The SDK triggers only one callback for the customized events with the sane name.
Declared In
WhiteDisplayer.h
– addHighFrequencyEventListener:fireInterval:
Adds a listener for a customized high-frequency event.
- (void)addHighFrequencyEventListener:(NSString *)eventName fireInterval:(NSUInteger)millseconds
Parameters
eventName |
The name of the event. |
---|---|
millseconds |
The interval (ms) at which the SDK triggers the callback. The minimum interval is 500 ms. The SDK automatically adjusts the value smaller than 500 to 500. |
Discussion
You can receive the customized event callback after a successful call of this method.
Note:
The SDK triggers only one callback for the customized events with the sane name.
Declared In
WhiteDisplayer.h
– removeMagixEventListener:
Removes a listener for a customized event.
- (void)removeMagixEventListener:(NSString *)eventName
Parameters
eventName |
The name of the event. |
---|
Declared In
WhiteDisplayer.h
– refreshViewSize
Refreshes the whiteboard view.
- (void)refreshViewSize
Discussion
When the WhiteboardView
changes, you need to call this method to refresh the whiteboard view.
Declared In
WhiteDisplayer.h
– convertToPointInWorld:result:
Converts the coordinates of a point on the whiteboard.
- (void)convertToPointInWorld:(WhitePanEvent *)point result:(void ( ^ ) ( WhitePanEvent *convertPoint ))result
Parameters
point |
The coordinate of the point in the iOS internal coordinate system. |
---|---|
result |
The callback, which reports the coordinate of the point. See WhitePanEvent. |
Discussion
This method converts the coordinates of the iOS internal coordinate system (taking the upper left corner as the origin) to the coordinates of the world coordinate system (taking the center of the initial whiteboard as the origin).
Declared In
WhiteDisplayer.h
– setCameraBound:
Sets the viewable area of the local user.
- (void)setCameraBound:(WhiteCameraBound *)cameraBound
Parameters
cameraBound |
The viewable area of the local user. See WhiteCameraBound. |
---|
Declared In
WhiteDisplayer.h
– moveCamera:
Adjusts the view.
- (void)moveCamera:(WhiteCameraConfig *)camera
Parameters
camera |
The configuration of the view. See WhiteCameraConfig。 |
---|
Declared In
WhiteDisplayer.h
– moveCameraToContainer:
Adjusts the view to ensure the complete display of the view rectangle.
- (void)moveCameraToContainer:(WhiteRectangleConfig *)rectange
Parameters
rectange |
The configuration of the view. See WhiteRectangleConfig. |
---|
Declared In
WhiteDisplayer.h
– scalePptToFit:
Adjusts the view to ensure the complete display of the PPT slide.
- (void)scalePptToFit:(WhiteAnimationMode)mode
Parameters
mode |
Animation mode. See WhiteAnimationMode. |
---|
Availability
2.5.1
Note:
If the current user has called the setViewMode method and set it to follower
,
calling scalePptToFit
method may cause the content seen by the current user and the host to be inconsistent.
Discussion
This operation is one-time.
Declared In
WhiteDisplayer.h
– scaleIframeToFit
Adjusts the view to ensure the complete display of the HTML5 file.
- (void)scaleIframeToFit
Availability
2.12.5
Note:
If the current user has called the setViewMode method and set it to follower
,
calling scaleIframeToFit
method may cause the content seen by the current user and the host to be inconsistent.
Discussion
This method is a one-time operation. If the HTML5 file is not inserted, calling this method does not take effect.
Declared In
WhiteDisplayer.h
– disableCameraTransform:
Disables the user from adjusting the view.
- (void)disableCameraTransform:(BOOL)disable
Parameters
disable |
Whether to disable the user from adjusting the view:
|
---|
Availability
2.11.0
This method disables the user from moving or zooming the view through touch screen gestures.
Declared In
WhiteDisplayer.h
– getScenePreviewImage:completion:
Gets the preview of the specified scene.
- (void)getScenePreviewImage:(NSString *)scenePath completion:(void ( ^ ) ( UIImage *_Nullable image ))completionHandler
Parameters
scenePath |
The path of the scene. |
---|---|
completionHandler |
The call result:
|
Discussion
Note:
- The content of the scene that the user sees when switching is intercepted, not all the content in the scene.
- Only when the picture server supports Cross-Origin Resource Sharing(CORS), it can be displayed in the screenshot. (Run in a real machine).
Declared In
WhiteDisplayer.h
– getSceneSnapshotImage:completion:
Gets the screenshot of the specified scene.
- (void)getSceneSnapshotImage:(NSString *)scenePath completion:(void ( ^ ) ( UIImage *_Nullable image ))completionHandler
Parameters
scenePath |
The path of the scene. |
---|---|
completionHandler |
The call result:
|
Discussion
Note:
- If the scene displays an image or dynamic PPT slide, ensure that the storage server of the image or the PPT slide supports cross-origin resource sharing; otherwise, the image or PPT slide may not be shown in the generated sceenshot.
- To ensure the normal display of screenshots, Agora recommends using the interactive whiteboard screenshot function.
Declared In
WhiteDisplayer.h
– getLocalSnapShotWithCompletion:
Gets the screenshot of the specified scene.
- (void)getLocalSnapShotWithCompletion:(void ( ^ ) ( UIImage *_Nullable image , NSError *_Nullable error ))completionHandler
Parameters
completionHandler |
The call result:
|
---|
Discussion
NOTE: The size of the screenshot is equal to that of the current whiteboard view.
Declared In
WhiteDisplayer.h