Inherits MonoBehaviour.

Public Member Functions

void SetGameFps (uint fps)
 
void SetForUser (uint uid)
 
void EnableFilpTextureApply (bool enableFlipHorizontal, bool enableFlipVertical)
 
void SetVideoSurfaceType (AgoraVideoSurfaceType agoraVideoSurfaceType)
 
void SetEnable (bool enable)
 

Detailed Description

The definition of VideoSurface.

Member Function Documentation

◆ SetGameFps()

void VideoSurface.SetGameFps ( uint  fps)

Sets the video rendering frame rate.

Note
  • Ensure that you call this method in the main thread.
  • Ensure that you call this method before binding VideoSurface.cs.
Parameters
fpsThe real video refreshing frame rate of the program.

◆ SetForUser()

void VideoSurface.SetForUser ( uint  uid)

Sets the local/remote video.

Note
  • Ensure that you call this method in the main thread.
  • Ensure that you call this method before binding VideoSurface.cs.
Parameters
uidThe ID of the remote user, which is retrieved from OnUserJoinedHandler. The default value is 0, which means you can see the local video.

◆ EnableFilpTextureApply()

void VideoSurface.EnableFilpTextureApply ( bool  enableFlipHorizontal,
bool  enableFlipVertical 
)

Enables/Disables the mirror mode when renders the Texture.

Note
  • Ensure that you call this method in the main thread.
  • Ensure that you call this method before binding VideoSurface.cs.
Parameters
enableFlipHorizontalWhether to enable the horizontal mirror mode of Texture.
  • true: Enable.
  • false: (Default) Disable.
enableFlipVerticalWhether to enable the vertical mirror mode of Texture.
  • true: Enable.
  • false: (Default) Disable.

◆ SetVideoSurfaceType()

void VideoSurface.SetVideoSurfaceType ( AgoraVideoSurfaceType  agoraVideoSurfaceType)

Set the video renderer type.

Parameters
agoraVideoSurfaceTypeThe renderer type, see AgoraVideoSurfaceType:
  • Renderer(0): (Default) The renderer for rendering 3D GameObject, such as Cube, Cylinder, and Plane.
  • RawImage(1): The renderer for rendering Raw Image of the UI components.

◆ SetEnable()

void VideoSurface.SetEnable ( bool  enable)

Starts/Stops the video rendering.

Parameters
enableWhether to start/stop the video rendering.
  • true: (Default) Start.
  • false: Stop.