Callbacks. Refer to the following example to set a callback:
The user's device type, which determines how the SDK handles mouse and touch events.
Whether to disable the user from adjusting (moving or zooming) the view through touchscreen gestures or mousewheel movement:
true
: Disable the user from adjusting the view.false
: (Default) Enable the user to adjust the view.Note
This method does not affect the setCameraBound
, moveCamera
, or moveCameraToContain
methods.
Whether to disable the highlighted box when another user puts their cursor on an object on the whiteboard:
Whether the user currently has write permission:
Whether to enable the hand tool:
true
: Enable the hand tool.false
: Disable the hand tool.The hotkeys for the hand tool. The user can use the hand tool to move the page.
If you set this property to undefined
, the hand tool has no hotkeys.
The ID of the user.
In a live Interactive Whiteboard room, observerId
is the ID of the local user.
The data center, which supports the following values:
region |
Data center | Service area |
---|---|---|
us-sv |
Silicon Valley, United States | North America and South America |
sg |
Singapore | Singapore, East Asia, and Southeast Asia |
in-mum |
Mumbai, India | India |
gb-lon |
London, United Kingdom | Europe |
cn-hz |
Hangzhou, China | Areas not covered by other data centers |
The user's screen type, which is used to adjust parameters for gesture recognition.
The unique identifier (UUID) of the current slice.
The state of the Displayer
object.
The version of the current SDK.
Adds a listener for a customized event.
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 same name.
The name of the customized event to be listened for.
The customized event callback. See EventListener. If you add multiple callbacks for the same event, the callback added later overrides the one added earlier.
Since v2.15.2. Options for setting a custom event listener. See MagixEventListenerOptions.
Adds a high-frequency listener for a customized event.
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.
The name of the customized event to be listened for.
The customized events callback. See EventsListener. If you add multiple callbacks for the same event, the callback added later overrides the one added earlier.
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.
Binds the whiteboard to an HTML container.
The HTML container for the whiteboard. You can unbind the
whiteboard by setting this parameter to null
.
Converts the coordinates of a point on the whiteboard.
This method converts the coordinates of the screen 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).
The coordinates of the point in the screen coordinate system.
The X coordinate of the point in the screen coordinate system.
The Y coordinate of the point in the screen coordinate system.
The coordinates of the point in the world coordinate system.
The X coordinate of the point in the world coordinate system.
The Y coordinate of the point in the world coordinate system.
Gets information about all scenes in the room.
Information about all scenes in the room.
Generates the snapshot of the specified scene.
The path of the specified scene.
The div for the snapshot.
The width of the snapshot. This paramter is optional since v2.3.8. If you do not set this parameter, it is set to the width of the div for the snapshot.
The height of the snapshot. This paramter is optional since v2.3.8. If you do not set this parameter, it is set to the height of the div for the snapshot.
Generates the screenshot of the specified scene.
The path of the scene.
The width of the screenshot.
The height of the screenshot.
The URL address of the screenshot.
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 screenshot.
Gets the specified invisible plugin.
The type of the invisible plugin.
The specified invisible plugin.
Gets the state of the whiteboard tool used by the user.
The ID of the user.
The state of the whiteboard tool used by the user.
Refreshes the whiteboard view.
When the whiteboardView changes, you need to call this method to refresh the whiteboard view.
This method takes effect only when autoResize
is set to false
.
Removes a listener for a customized event.
The name of the event.
The listener you want to remove. If you do not set this parameter, all listeners for the event are removed.
Adjusts the view in the specified mode to ensure the complete display of the PPT slide.
The animation mode for adjusting the view. See AnimationMode.
Gets the type of the scene path.
The path of the scene.
The type of the scene path.
Generates the preview of the specified scene.
The path of the specified scene.
The div for the preview.
The width of the preview. This paramter is optional since v2.3.8. If you do not set this parameter, it is set to the width of the div for the preview.
The height of the preview. This paramter is optional since v2.3.8. If you do not set this parameter, it is set to the height of the div for the preview.
Sets the boundary of the local user's view.
The boundary of the view.
Waits for a customized event.
The event filter.
The specified customized event when it occurs.
The
Displayer
interface is the basic interface for interactive whiteboard rooms.