|
Agora Java API Reference for Android
|
Public Member Functions | |
| Canvas (Rte rte, CanvasInitialConfig config) | |
| long | getNativeHandle () |
| void | addView (View view, ViewConfig viewConfig) throws RteException |
| Adds a rendering view. More... | |
| void | removeView (View view, ViewConfig viewConfig) throws RteException |
| Removes a rendering view. More... | |
| void | getConfigs (CanvasConfig config) throws RteException |
| Gets the current video rendering configuration of the player. More... | |
| void | setConfigs (CanvasConfig config) throws RteException |
| Sets the video rendering configuration for the player. More... | |
Protected Member Functions | |
| void | finalize () |
Canvas interface, used to set the video rendering view.
| io.agora.rte.Canvas.Canvas | ( | Rte | rte, |
| CanvasInitialConfig | config | ||
| ) |
Construct a Canvas object.
| rte | Rte object. |
| config | CanvasInitialConfig initialization configuration object. Currently, a null pointer can be passed. |
| void io.agora.rte.Canvas.addView | ( | View | view, |
| ViewConfig | viewConfig | ||
| ) | throws RteException |
Adds a rendering view.
Applicable scenarios: When you need to play a video using the player, you can call this method to add a view to the video renderer in order to display the video content. Call timing: You must call this method before setCanvas.
| view | A SurfaceView object. |
| config | The settings for the View object. Pass null for now. |
| RteException | If the method call fails, the SDK throws an RteException with the corresponding error information. You need to catch and handle the exception. |
| void io.agora.rte.Canvas.removeView | ( | View | view, |
| ViewConfig | viewConfig | ||
| ) | throws RteException |
Removes a rendering view.
After you call AddView to add a view, you can call this method to remove the rendering view. Call timing: This method must be called after AddView.
| view | The view object to be removed. |
| config | The settings of the View object. Pass null for now. |
| RteException | If the method call fails, the SDK throws an RteException with the corresponding error information. You need to catch and handle the exception. |
| void io.agora.rte.Canvas.getConfigs | ( | CanvasConfig | config | ) | throws RteException |
Gets the current video rendering configuration of the player.
Call timing: You must call this method after Canvas.
| config | Settings of the Canvas object. See CanvasConfig for details. |
| RteException | If the method call fails, the SDK throws an RteException with the corresponding error information. You need to catch and handle the exception. |
| void io.agora.rte.Canvas.setConfigs | ( | CanvasConfig | config | ) | throws RteException |
Sets the video rendering configuration for the player.
Call timing: You must call this method before openWithUrl.
| config | Settings for the Canvas object. See CanvasConfig for details. |
| RteException | If the method call fails, the SDK throws an RteException with the corresponding error information. You need to catch and handle the exception. |
1.8.18