Video SDK v3.7.1 API Reference for Unity
Public Member Functions | List of all members
agora_gaming_rtc.VideoSurface Class Reference

Inherits MonoBehaviour.

Public Member Functions

void SetGameFps (uint fps)
 
void SetForUser (uint uid)
 
void SetForMultiChannelUser (string channelId, 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 agora_gaming_rtc.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 agora_gaming_rtc.VideoSurface.SetForUser ( uint  uid)

Sets the local or remote video.

Note
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.

◆ SetForMultiChannelUser()

void agora_gaming_rtc.VideoSurface.SetForMultiChannelUser ( string  channelId,
uint  uid 
)

Sets the local or remote video of users in multiple channels.

Since
v3.0.1
Note
  • This method only applies to the multi-channel feature.
  • Do not call this method and SetForUser together.
  • Ensure that you call this method in the main thread.
  • Ensure that you call this method before binding VideoSurface.cs.
Parameters
channelIdThe channel name.
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 agora_gaming_rtc.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 agora_gaming_rtc.VideoSurface.SetVideoSurfaceType ( AgoraVideoSurfaceType  agoraVideoSurfaceType)

Set the video renderer type.

Parameters
agoraVideoSurfaceTypeThe renderer type, see AgoraVideoSurfaceType.

◆ SetEnable()

void agora_gaming_rtc.VideoSurface.SetEnable ( bool  enable)

Starts/Stops the video rendering.

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

Member Data Documentation

◆ isMultiChannelWant

bool agora_gaming_rtc.VideoSurface.isMultiChannelWant = false

◆ _enableFlipHorizontal

bool agora_gaming_rtc.VideoSurface._enableFlipHorizontal = false

◆ _enableFlipVertical

bool agora_gaming_rtc.VideoSurface._enableFlipVertical = false

◆ videoFps

uint agora_gaming_rtc.VideoSurface.videoFps = 30

The documentation for this class was generated from the following file: