diff --git a/tcrsdk/3.16.0/allclasses-frame.html b/tcrsdk/3.16.0/allclasses-frame.html new file mode 100755 index 00000000..e993d395 --- /dev/null +++ b/tcrsdk/3.16.0/allclasses-frame.html @@ -0,0 +1,71 @@ + + + +
+ +public interface AsyncCallback<T>
+Modifier and Type | +Method and Description | +
---|---|
void |
+onFailure(int code,
+ java.lang.String msg)
+This is called when the async task is executed failed.
+ |
+
void |
+onSuccess(T result)
+This is called when the async task is executed successfully.
+ |
+
void onSuccess(T result)+
result
- The result of the task execution.void onFailure(int code, + java.lang.String msg)+
code
- The error code of the task execution.msg
- The error message of the task execution.public interface AudioSink
+TcrSession.setAudioSink(AudioSink)
Modifier and Type | +Method and Description | +
---|---|
void |
+onAudioData(byte[] audioData,
+ int offsetInBytes,
+ int sizeInBytes)
+Called when a piece of audio data is ready.
+ |
+
void |
+onAudioFormat(int audioFormat,
+ int channelMask,
+ int sampleRate)
+Called when the audio sample format has changed.
+ |
+
void onAudioData(byte[] audioData, + int offsetInBytes, + int sizeInBytes)+
audioData
- The audio data that can be played via android.media.AudioTrack
.offsetInBytes
- The offset expressed in bytes in audioData where the data to write starts.sizeInBytes
- The number of bytes to write in audioData after the offset.void onAudioFormat(int audioFormat, + int channelMask, + int sampleRate)+
AudioFormat
.audioFormat
- The audio data encoding format. See AudioFormat.Builder#setEncoding(int)
channelMask
- The channel position mask. See AudioFormat.Builder#setChannelMask(int)
sampleRate
- The sample rate expressed in Hz. See AudioFormat.Builder#setSampleRate(int)
public static interface CustomDataChannel.Observer
+Observer
interface when it wants to be informed of events
+ in CustomDataChannel objects.Modifier and Type | +Method and Description | +
---|---|
void |
+onConnected(int port)
+This method is called when the listened
+CustomDataChannel is connected successfully. |
+
void |
+onError(int port,
+ int code,
+ java.lang.String msg)
+This method is called whenever some error is happened in the listened
+CustomDataChannel . |
+
void |
+onMessage(int port,
+ java.nio.ByteBuffer buffer)
+This method is called whenever the listened
+CustomDataChannel receives cloud message. |
+
void onConnected(int port)+
CustomDataChannel
is connected successfully.port
- The identify of the listened CustomDataChannel
.void onError(int port, + int code, + java.lang.String msg)+
CustomDataChannel
.port
- The identify of the listened CustomDataChannel
.code
- The error code.msg
- The error message.void onMessage(int port, + java.nio.ByteBuffer buffer)+
CustomDataChannel
receives cloud message.
+
+ NOTE: |buffer.data| will be freed once this function returns so callers who want to use the data + asynchronously must make sure to copy it first.
port
- The identify of the listened CustomDataChannel
.buffer
- The message sent from the cloud.public interface CustomDataChannel
+The client can send a message to the cloud application via the send(ByteBuffer)
method, and receive the
+ reply message from the cloud application via CustomDataChannel.Observer.onMessage(int, ByteBuffer)
.
In terms of implementation, the send(ByteBuffer)
method in fact sends the message to a UDP port of the
+ cloud machine, which is defined when creating this CustomDataChannel. The cloud application listens to this UDP port
+ to receive messages from the client. When the cloud application replies a message, the Cloud Rendering SDK will call
+ back the message to the client application through CustomDataChannel.Observer.onMessage(int, ByteBuffer)
. Note that the
+ associated UDP port identifies a data channel uniquely.
com.tencent.tcr.sdk.api.TcrSession#createCustomDataChannel(int, Observer)
Modifier and Type | +Interface and Description | +
---|---|
static interface |
+CustomDataChannel.Observer
+A class can implement the
+Observer interface when it wants to be informed of events
+ in CustomDataChannel objects. |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+close()
+Close this data channel.
+ |
+
boolean |
+send(java.nio.ByteBuffer data)
+Send data to the cloud Application.
+ |
+
boolean send(java.nio.ByteBuffer data)+
data
- The data to be sent, which cannot exceed 1,200 bytes.void close()+
public static enum Gamepad.KeyType +extends java.lang.Enum<Gamepad.KeyType>+
Enum Constant and Description | +
---|
LS
+The left stick
+ |
+
LT
+The left trigger
+ |
+
RS
+The right stick
+ |
+
RT
+The right trigger
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Gamepad.KeyType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Gamepad.KeyType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Gamepad.KeyType LS+
public static final Gamepad.KeyType RS+
public static final Gamepad.KeyType LT+
public static final Gamepad.KeyType RT+
public static Gamepad.KeyType[] values()+
+for (Gamepad.KeyType c : Gamepad.KeyType.values()) + System.out.println(c); +
public static Gamepad.KeyType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic interface Gamepad
+Modifier and Type | +Interface and Description | +
---|---|
static class |
+Gamepad.KeyType
+The type of a general controller button
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+connectGamepad()
+Trigger the cloud machine to insert the virtual Gamepad.
+ |
+
void |
+disconnectGamepad()
+Trigger the cloud machine to pull out the virtual Gamepad.
+ |
+
void |
+onGamepadKey(int keycode,
+ boolean down)
+Trigger a key event of the cloud Gamepad.
+ |
+
void |
+onGamepadStick(Gamepad.KeyType type,
+ int x,
+ int y)
+Trigger a stick event of the cloud Gamepad.
+ |
+
void |
+onGamepadTrigger(Gamepad.KeyType type,
+ int value,
+ boolean down)
+Trigger a trigger event of the cloud Gamepad.
+ |
+
void connectGamepad()+
void disconnectGamepad()+
void onGamepadKey(int keycode, + boolean down)+
keycode
- The keycode. Please refer to WindowsKeyEvent
for the
+ definition of key codes.down
- true if the button is pressed, false if the button is released.void onGamepadStick(Gamepad.KeyType type, + int x, + int y)+
type
- The stick type. See Gamepad.KeyType.LS
, Gamepad.KeyType.RS
.x
- The X coordinate of the sticky
- The Y coordinate of the stickvoid onGamepadTrigger(Gamepad.KeyType type, + int value, + boolean down)+
type
- The trigger type. See Gamepad.KeyType.LT
, Gamepad.KeyType.RT
.value
- The absolute position of the trigger control. The value is normalized to a range from 0
+ (released) to 255 (fully pressed).down
- true if the trigger is pressed, false if the trigger is released.public interface Keyboard
+Modifier and Type | +Method and Description | +
---|---|
void |
+checkKeyboardCapsLock(AsyncCallback<java.lang.String> callback)
+Query the capitalization status of the cloud virtual keyboard.
+ |
+
void |
+onKeyboard(int keycode,
+ boolean down)
+Trigger a key event of the cloud keyboard.
+ |
+
void |
+onKeyboard(int keycode,
+ boolean down,
+ boolean isLeft)
+Trigger a key event of the cloud keyboard.
+ |
+
void |
+resetKeyboard()
+Reset the key status of the cloud keyboard.
++ This API is used to release all keys when there are stuck keys on the keyboard. |
+
void |
+resetKeyboardCapsLock()
+Reset the capitalization status (to lowercase) of the cloud virtual keyboard.
+ |
+
void onKeyboard(int keycode, + boolean down)+
keycode
- The keycodedown
- Valid values: `true`: Press; `false`: Release.void onKeyboard(int keycode, + boolean down, + boolean isLeft)+
keycode
- The keycode. Please refer to KeycodeDefinition
for the definition of key codes.down
- Valid values: `true`: Press; `false`: Release.isLeft
- Used to distinguish between left and right keys of the keyboard: `true`: Left; `false` :
+ Right.void checkKeyboardCapsLock(AsyncCallback<java.lang.String> callback)+
callback
- Asynchronous callback object for returning results.void resetKeyboardCapsLock()+
void resetKeyboard()+
public static enum Mouse.CursorStyle +extends java.lang.Enum<Mouse.CursorStyle>+
Enum Constant and Description | +
---|
HUGE
+The big cursor style
+ |
+
NORMAL
+The default cursor style
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Mouse.CursorStyle |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Mouse.CursorStyle[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Mouse.CursorStyle NORMAL+
public static final Mouse.CursorStyle HUGE+
public static Mouse.CursorStyle[] values()+
+for (Mouse.CursorStyle c : Mouse.CursorStyle.values()) + System.out.println(c); +
public static Mouse.CursorStyle valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static enum Mouse.KeyType +extends java.lang.Enum<Mouse.KeyType>+
Enum Constant and Description | +
---|
BACKWARD
+The back side button
+ |
+
FORWARD
+The forward side button
+ |
+
LEFT
+The left mouse button
+ |
+
MIDDLE
+The middle mouse button (scroll wheel)
+ |
+
RIGHT
+The right mouse button
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static Mouse.KeyType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static Mouse.KeyType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final Mouse.KeyType LEFT+
public static final Mouse.KeyType RIGHT+
public static final Mouse.KeyType MIDDLE+
public static final Mouse.KeyType FORWARD+
public static final Mouse.KeyType BACKWARD+
public static Mouse.KeyType[] values()+
+for (Mouse.KeyType c : Mouse.KeyType.values()) + System.out.println(c); +
public static Mouse.KeyType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic interface Mouse
+Modifier and Type | +Interface and Description | +
---|---|
static class |
+Mouse.CursorStyle
+The style of the cloud cursor
+ |
+
static class |
+Mouse.KeyType
+General mouse button types
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onMouseDeltaMove(int deltaX,
+ int deltaY)
+According to the offset pixel amount [localDeltaX, localDeltaY] of the local mouse movement,
+ calculate the relative movement pixel amount [DeltaX, DeltaY] of the remote movement.
+ |
+
void |
+onMouseKey(Mouse.KeyType key,
+ boolean down)
+Trigger a click event of the cloud mouse.
+ |
+
void |
+onMouseMoveTo(int x,
+ int y)
+After you get the coordinates of the local View, you need to convert the coordinates to the coordinates of the
+ remote end before calling this method.Before calculation, you need to get the width and height of the gameView
+ [localViewWidth, localViewHeight] and the position of the click position in the game screen [localX, localY].
+ |
+
void |
+onMouseScroll(float delta)
+Rotate the scroll wheel of the cloud mouse.
+ |
+
void |
+setMouseCursorStyle(Mouse.CursorStyle cursorStyle)
+Set the cursor style.
+ |
+
void setMouseCursorStyle(Mouse.CursorStyle cursorStyle)+
Mouse.CursorStyle
will be updated immediately: the new cursor style will be distributed
+ from the cloud through the data channel. You can get the latest mouse style image from Observer.cursorStyle
- The new cursor style, which will overwrite the original style value.void onMouseKey(Mouse.KeyType key, + boolean down)+
key
- The mouse button. Valid values: `left`: The left button; `middle`: The scroll wheel; `right`:
+ The right button; `forward`: The forward side button; `backward`: The back side button.down
- Valid values: `true`: Press; `false`: Release.void onMouseScroll(float delta)+
delta
- Valid values: -1.0~1.0void onMouseDeltaMove(int deltaX, + int deltaY)+
+ // localX/localY: click coordinates on gameView
+ // localViewWidth/localViewHeight: gameView width&height
+ DeltaX = localDeltaX * MouseConfig.getMoveSensitivity() * 8192 / localViewWidth;
+ DeltaY = localDeltaY * MouseConfig.getMoveSensitivity() * 8192 / localViewHeight;
+ // send mouse move message
+ onDeltaMove(DeltaX,DeltaY);
+
deltaX
- The offset on the horizontal axis by which the cursor needs to move in remote devicedeltaY
- The offset on the vertical axis by which the cursor needs to move in remote devicevoid onMouseMoveTo(int x, + int y)+
+ // localX/localY: click coordinates on gameView
+ // localViewWidth/localViewHeight: gameView width&height
+ remoteX = localX * 8192 / localViewWidth;
+ remoteY = localY * 8192 / localViewHeight;
+ // send mouse move message
+ onMoveTo(remoteX,remoteY);
+
x
- The X coordinate on the remote devicey
- The Y coordinate on the remote devicepublic static interface TcrCode.SessionStop
+TcrSession.Event.STATE_CLOSED
Modifier and Type | +Field and Description | +
---|---|
static int |
+CONNECT_FAILED
+This value indicate that failed to connect to cloud
+ |
+
static int |
+RECONNECT_FAILED
+This value indicates that reconnection failure leads to exit
+ |
+
static int |
+SERVER_DUPLICATE_CONNECT
+This value indicates that the server issues an exit command: Repeat userID connection.
++ The cloud service background received a CreateSession request with the same UserID when the front-end and + back-end were connected. |
+
static int |
+SERVER_EXIT
+This value indicates that the server issues an exit command: the cloud actively exits
+ |
+
static int |
+SERVER_STOP_GAME
+This value indicates that the server issues exit instructions: Cloud API call exit
+ |
+
static int |
+SERVER_UNKNOWN
+This value indicates that an unknown error occurred in the cloud
+ |
+
static int |
+STOP_MANUALLY
+This value indicates that the App call
+TcrSession.release() to actively exit |
+
static final int SERVER_UNKNOWN+
static final int SERVER_DUPLICATE_CONNECT+
static final int SERVER_STOP_GAME+
static final int SERVER_EXIT+
static final int STOP_MANUALLY+
TcrSession.release()
to actively exitstatic final int RECONNECT_FAILED+
static final int CONNECT_FAILED+
public interface TcrCode
+Modifier and Type | +Interface and Description | +
---|---|
static interface |
+TcrCode.SessionStop
+The code returned when the state of TcrSession changes to
+
+TcrSession.Event.STATE_CLOSED |
+
Modifier and Type | +Field and Description | +
---|---|
static int |
+ERR_CLOSED
+This indicates that the data channel has been closed.
+ |
+
static int |
+ERR_CREATE_DIRECTORY_FAILED
+The directory failed to be created.
+ |
+
static int |
+ERR_CREATE_FAILURE
+This indicates that the data channel is created failed.
+ |
+
static int |
+ERR_DATA_CHANNEL_BASE_CODE
+The starting error code of the data channel module.
+ |
+
static int |
+ERR_EXTRACT_PLUGIN_FAILED
+The plugin failed to be extracted
+ |
+
static int |
+ERR_INSTALL_PLUGIN_FAILED
+The plugin failed to be installed.
+ |
+
static int |
+ERR_INTERNAL_ERROR
+This indicates that some internal error has happened.
+ |
+
static int |
+ERR_INVALID_PARAMS
+This indicates that the request parameter is invalid.
+ |
+
static int |
+ERR_MULTI_PLAYER_BASE_CODE
+The starting error code of the multi-player module.
+ |
+
static int |
+ERR_PLUGIN_DO_NOT_EXIST
+The plugin doesn't exist.
+ |
+
static int |
+ERR_PLUGIN_MD5_VERIFY_FAILED
+The MD5 value of the plugin failed to be verified.
+ |
+
static int |
+ERR_SDK_STATE_INITIALIZING
+The sdk is initializing
+ |
+
static int |
+ERR_STATE_ILLEGAL
+This indicates that the context state is illegal.
+ |
+
static int |
+ERR_TCRSDK_BASE_CODE
+The starting error code of the TcrSdk class.
+ |
+
static int |
+ERR_TIMEOUT
+This indicates that the request is timed out.
+ |
+
static int |
+ERR_UNKNOWN
+This indicates that some unknown error has happened.
+ |
+
static int |
+MULTI_PLAYER_ASSIGN_SEAT_FAILED
+Seat assignment failed.
+ |
+
static int |
+MULTI_PLAYER_IGNORED_HOST_SUBMIT
+The host didn't need to change the seat.
+ |
+
static int |
+MULTI_PLAYER_INVALID_SEAT_INDEX
+An invalid seat
+ |
+
static int |
+MULTI_PLAYER_NO_AUTHORIZED
+The viewer couldn't switch the seat.
+ |
+
static int |
+MULTI_PLAYER_NO_SUCH_ROLE
+The role dosen’t exist.
+ |
+
static int |
+MULTI_PLAYER_NO_SUCH_USER
+The `user_id` doesn’t exist.
+ |
+
static int |
+SESSION_STOP_BASE_CODE |
+
static int |
+SUCCESS
+This indicates that the result is success.
+ |
+
static final int SUCCESS+
static final int ERR_TIMEOUT+
static final int ERR_INVALID_PARAMS+
static final int ERR_UNKNOWN+
static final int ERR_INTERNAL_ERROR+
static final int ERR_STATE_ILLEGAL+
static final int ERR_MULTI_PLAYER_BASE_CODE+
static final int MULTI_PLAYER_INVALID_SEAT_INDEX+
static final int MULTI_PLAYER_NO_AUTHORIZED+
static final int MULTI_PLAYER_NO_SUCH_ROLE+
static final int MULTI_PLAYER_NO_SUCH_USER+
static final int MULTI_PLAYER_ASSIGN_SEAT_FAILED+
static final int MULTI_PLAYER_IGNORED_HOST_SUBMIT+
static final int ERR_DATA_CHANNEL_BASE_CODE+
static final int ERR_CREATE_FAILURE+
static final int ERR_CLOSED+
static final int ERR_TCRSDK_BASE_CODE+
static final int ERR_PLUGIN_DO_NOT_EXIST+
static final int ERR_PLUGIN_MD5_VERIFY_FAILED+
static final int ERR_CREATE_DIRECTORY_FAILED+
static final int ERR_EXTRACT_PLUGIN_FAILED+
static final int ERR_INSTALL_PLUGIN_FAILED+
static final int ERR_SDK_STATE_INITIALIZING+
static final int SESSION_STOP_BASE_CODE+
public interface TcrLogger
+android.util.Log
,
+TcrSdk.setLogger(TcrLogger)
Modifier and Type | +Method and Description | +
---|---|
void |
+d(java.lang.String tag,
+ java.lang.String msg) |
+
void |
+e(java.lang.String tag,
+ java.lang.String msg) |
+
void |
+i(java.lang.String tag,
+ java.lang.String msg) |
+
void |
+v(java.lang.String tag,
+ java.lang.String msg) |
+
void |
+w(java.lang.String tag,
+ java.lang.String msg) |
+
void v(java.lang.String tag, + java.lang.String msg)+
void d(java.lang.String tag, + java.lang.String msg)+
void i(java.lang.String tag, + java.lang.String msg)+
void e(java.lang.String tag, + java.lang.String msg)+
void w(java.lang.String tag, + java.lang.String msg)+
public class TcrSdk
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
TcrRenderView |
+createTcrRenderView(Context context,
+ TcrSession session,
+ TcrRenderView.TcrRenderViewType mode)
+Create a rendering view for a session.
+ |
+
TcrSession |
+createTcrSession(TcrSessionConfig cfg)
+Create a session.
+ |
+
EGLContext |
+getEGLContext()
+Get the EGLContext.
+ |
+
static TcrSdk |
+getInstance()
+Return The singleton of this class
+ |
+
static java.lang.String |
+getPluginUrl()
+Get the plugin download url for the light version TcrSdk.
+ |
+
void |
+init(Context ctx,
+ java.lang.String pluginPath,
+ AsyncCallback<java.lang.Void> callback)
+Initialize this TcrSdk.
+ |
+
void |
+setEGLContext(EGLContext eglContext)
+Set the EGLContext.
+ |
+
void |
+setLogger(TcrLogger logger)
+Set a logger for the TcrSdk.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static TcrSdk getInstance()+
public void init(Context ctx, + java.lang.String pluginPath, + AsyncCallback<java.lang.Void> callback)+
ctx
- The Android context. It should not be null
.pluginPath
- The local file path of the plugin for the lite version TcrSdk. null
if you
+ are using the full version TcrSdk.callback
- The callback for initialization result. It cannot be null
.AsyncCallback.onSuccess(Object)
method will be called if the initialization is
+ successful.AsyncCallback.onFailure(int, String)
method will be called if the initialization fails. The
+ error code of the callback refers to ERR_PLUGIN_DO_NOT_EXIST
,
+ ERR_PLUGIN_MD5_VERIFY_FAILED
, ERR_CREATE_DIRECTORY_FAILED
, ERR_EXTRACT_PLUGIN_FAILED
, ERR_INSTALL_PLUGIN_FAILED
,TcrCode.ERR_SDK_STATE_INITIALIZING
.public TcrRenderView createTcrRenderView(Context context, + TcrSession session, + TcrRenderView.TcrRenderViewType mode)+
The TcrRenderView.release()
method of the returned view should be called to release the underlying
+ resources if it is no longer used.
This method should only be called on UI Thread.
context
- The context of the return view. It cannot be null
.session
- The session that return view associates with. It cannot be null
.mode
- The type of the return view. It cannot be null
.null
maybe returned if creation fails due to the TcrSdk plugin
+ fails to be initialized.public TcrSession createTcrSession(TcrSessionConfig cfg)+
The TcrSession.release()
method of the returned session should be called to release the underlying
+ resources if it is no longer used.
cfg
- The configuration of the session.null
maybe returned if creation fails due to the TcrSdk plugin fails to
+ be initialized.public void setEGLContext(EGLContext eglContext)+
+ This API is associated with VideoSink
.
+
+ If you want TcrSdk to use your EGLContext as a `sharedContext` to create an EGLContext, you can set it through
+ this API. When you get VideoFrame
for rendering, the EGLContext in your rendering thread must be
+ `sharedContext` with the EGLContext used by TcrSdk internally to generate video frames. Otherwise, it cannot be
+ guaranteed that the frames callback by VideoSink.onFrame(VideoFrame)
can be successfully rendered. You
+ should call this method before createTcrSession(TcrSessionConfig)
. Otherwise, the setting will be
+ invalid.
+
+ When you want to use the internal EGLContext of TcrSdk as a `sharedContext` to create your EGLContext,
+ you can use this API: getEGLContext()
+
eglContext
- eglContextpublic EGLContext getEGLContext()+
+ This API is associated with VideoSink
.
+
+ If you want to use the internal EGLContext of TcrSdk as a `sharedContext` to create your EGLContext, you need
+ to call getEGLContext()
in your rendering thread as the `sharedContext` to create your EGLContext.
+ When you get VideoFrame
for rendering, the EGLContext in your rendering thread must be `sharedContext`
+ with the EGLContext used by TcrSdk internally to generate video frames. Otherwise, it cannot be guaranteed that
+ the frames callback by VideoSink.onFrame(VideoFrame)
can be successfully rendered.
+
+ If you want TcrSdk to use your EGLContext as a `sharedContext` to create an EGLContext,
+ you can use this API: setEGLContext(EGLContext)
+
public void setLogger(TcrLogger logger)+
By default, the TcrSdk will print logs to a temporary file on the sdcard as well as the android device logs.
+ If you set a custom logger
via this method, the TcrSdk will then only callback logs to your
+ logger
.
This method can be called before init(Context, String, AsyncCallback)
.
logger
- the TcrLogger object to be set. It should not be null
.public static java.lang.String getPluginUrl()+
null
if in full version TcrSdk.public static enum TcrSession.Event +extends java.lang.Enum<TcrSession.Event>+
Observer#onEvent(Event, Object)
Enum Constant and Description | +
---|
ARCHIVE_LOAD_STATUS
+This event indicates the status of the archive loading in the server.
++ + The associated event data is of type String in json format: |
+
ARCHIVE_SAVE_STATUS
+This event indicates the status of the archive saving in the server.
++ + The associated event data is of type String in json format: |
+
CLIENT_IDLE
+This event indicates that the user is in an idle state, that is, the user does not operate the mouse,
+ keyboard or screen for a while.
++ + This event has no associated data. |
+
CLIENT_LOW_FPS
+This event indicates that the frame rate remains low for a while.
+ |
+
CLIENT_STATS
+This event indicates that the performance data is updated.
+ |
+
CURSOR_IMAGE_INFO
+This event indicates that the remote cursor image information is updated.
+ |
+
CURSOR_STATE_CHANGE
+This event indicates that the showing status of cloud cursor is changed.
+ |
+
GAME_PROCESS_STOPPED
+This event indicates that the status of the game process on the server has been stopped.
++ + The associated event data is of type String in json format: |
+
GAME_START_COMPLETE
+This event indicates that the status of the game process on the server has been changed.
++ + The associated event data is of type String in json format: |
+
INPUT_STATE_CHANGE
+This event indicates that the status of the remote input box has changed.
+ |
+
INPUT_STATUS_CHANGED
+This event indicates that the input status of the server has changed.
+ |
+
MULTI_USER_ROLE_APPLY
+This event indicates that some user request to change seat.
+ |
+
MULTI_USER_SEAT_INFO
+This event indicates that the multi user seat info is updated.
+ |
+
REMOTE_DESKTOP_INFO
+This event indicates that the cloud PC desktop information is updated.
+ |
+
SCREEN_CONFIG_CHANGE
+This event indicates that the configuration of the cloud phone screen configuration has been changed.
++ + The associated event data is of type ScreenConfig . |
+
START_AUTO_LOGIN |
+
STATE_CLOSED
+This event indicates that the session is closed, and thus it can not be used any more.
++ + The associated event data is of type Integer.For the value range, refer to + TcrCode.SessionStop . |
+
STATE_CONNECTED
+This event indicates that the session is connected.
++ + This event has no associated data. |
+
STATE_INITED
+This event indicates that the session has been initialized.
++ + The associated event data is of type String and represents the ClientSession which is further
+ used as a parameter to call the Cloud API CreateSession. |
+
STATE_RECONNECTING
+This event indicates that the session is reconnecting.
+ |
+
VIDEO_STREAM_CONFIG_CHANGED
+This event indicates that the cloud Mobile screen information is updated.
++ + The associated event data is of type VideoStreamConfig . |
+
Modifier and Type | +Method and Description | +
---|---|
static TcrSession.Event |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static TcrSession.Event[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TcrSession.Event STATE_INITED+
ClientSession
which is further
+ used as a parameter to call the Cloud API CreateSession.public static final TcrSession.Event STATE_CONNECTED+
public static final TcrSession.Event STATE_RECONNECTING+
public static final TcrSession.Event STATE_CLOSED+
TcrCode.SessionStop
.public static final TcrSession.Event CLIENT_STATS+
StatsInfo
.public static final TcrSession.Event CLIENT_IDLE+
public static final TcrSession.Event CLIENT_LOW_FPS+
TcrSessionConfig.Builder.lowFpsThreshold(int, int)
.public static final TcrSession.Event GAME_START_COMPLETE+
+ {
+ user_id: String // The user ID
+ game_id: String // The game ID
+ app_id: number
+ request_id: string
+ status: number // The game start error code. Valid values:
+ // `0`: Started the game successfully;
+ // `1`: Failed to start the game;
+ }
+
public static final TcrSession.Event GAME_PROCESS_STOPPED+
+ {
+ user_id: String // The user ID
+ game_name: String // The game name
+ timestamp: number // stop time stamp
+ message: String // stop message
+ }
+
public static final TcrSession.Event ARCHIVE_LOAD_STATUS+
+ {
+ user_id: String // The user ID
+ game_id: String // The game ID
+ name: String // The eventual filename of the archive
+ url: String // The archive download address
+ status: number // The error code of the archive loading status.
+ // Valid values:
+ // `0`: loaded the archive successfully;
+ // `1`: Failed to download the archive;
+ // `2`: Failed to verify the archive;
+ // `3`: Failed to extract the archive;
+ // `4`: Other error;
+ // `5`: The archive was being downloaded.
+ save_type: String // "`Auto` or `Normal`",
+ category_id: String // The archive category ID
+ archive_size: number // The archive size
+ loaded_size: number // The size of the downloaded archive
+ }
+
public static final TcrSession.Event ARCHIVE_SAVE_STATUS+
+ {
+ user_id: String // The user ID
+ game_id: String // The game ID
+ name: String // The eventual filename of the archive
+ md5: String // The MD5 value of the archive
+ status: number // The error code of the archive saving status.
+ // Valid values:
+ // `0`: saved the archive successfully;
+ // `1`: Failed to save the archive;
+ // `2`: Failed to compress the archive;
+ // `3`: Other error;
+ // `4`: The archive was being uploaded;
+ // `5`: The archive could not be found;
+ // `6`: The archive operations were too frequent.
+ save_type: String // "`Auto` or `Normal`",
+ category_id: String // The archive category ID
+ archive_size: number // The archive size
+ saved_size: number // The size of the saved archive
+ }
+
public static final TcrSession.Event INPUT_STATUS_CHANGED+
+ {
+ status: String // If the status distributed by the cloud is `disabled`, input is disabled.
+ }
+
public static final TcrSession.Event REMOTE_DESKTOP_INFO+
RemoteDesktopInfo
.public static final TcrSession.Event SCREEN_CONFIG_CHANGE+
ScreenConfig
.public static final TcrSession.Event VIDEO_STREAM_CONFIG_CHANGED+
VideoStreamConfig
.public static final TcrSession.Event CURSOR_IMAGE_INFO+
CursorImageInfo
.public static final TcrSession.Event CURSOR_STATE_CHANGE+
CursorState
.public static final TcrSession.Event MULTI_USER_SEAT_INFO+
MultiUserSeatInfo
.public static final TcrSession.Event MULTI_USER_ROLE_APPLY+
RoleApplyInfo
.public static final TcrSession.Event INPUT_STATE_CHANGE+
+ {
+ field_type: String // the type input box
+ // Valid values:
+ // `normal_input`: This type represents the input box of a regular window gaining
+ // focus.
+ //
+ // `autologin_input`: This value has been deprecated.
+ //
+ // `unfocused`: This type represents the focus being moved out of the window.
+
+ text: String // The text content in the remote input box.<br>
+ // This field is only supported when the cloud application is an Android application
+ }
+
public static final TcrSession.Event START_AUTO_LOGIN+
public static TcrSession.Event[] values()+
+for (TcrSession.Event c : TcrSession.Event.values()) + System.out.println(c); +
public static TcrSession.Event valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static interface TcrSession.Observer
+Modifier and Type | +Method and Description | +
---|---|
void |
+onEvent(TcrSession.Event event,
+ java.lang.Object eventData)
+This will be called when some event happened in the session.
+ |
+
void onEvent(TcrSession.Event event, + java.lang.Object eventData)+
event
- TcrSession.Event
.eventData
- The data relative to the event.public interface TcrSession
+Modifier and Type | +Interface and Description | +
---|---|
static class |
+TcrSession.Event
+Session event definitions.
+ |
+
static interface |
+TcrSession.Observer
+This interface represents the observer of TcrSession.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+changeSeat(java.lang.String userId,
+ MultiUser.Role targetRole,
+ int targetPlayerIndex,
+ AsyncCallback<java.lang.Void> callback)
+Switch the role and seat of a user (`userID`) to `targetRole` and `targetPlayerIndex` respectively.
+ |
+
CustomDataChannel |
+createCustomDataChannel(int port,
+ CustomDataChannel.Observer observer)
+Creates a custom data channel.
+ |
+
Gamepad |
+getGamepad()
+Return the interface to interact with the cloud Gamepad in this session.
+ |
+
Keyboard |
+getKeyboard()
+Return the interface to interact with the cloud keyboard in this session.
+ |
+
Mouse |
+getMouse()
+Return the interface to interact with the cloud Mouse in this session.
+ |
+
TouchScreen |
+getTouchScreen()
+Return the interface to interact with the cloud TouchScreen in this session.
+ |
+
void |
+pasteText(java.lang.String text)
+Send the text to the input box in the cloud application.
++ The input box of the cloud application must have obtained the focus and allow the user to paste text from the + clipboard. + + For Android cloud applications, sent text replaces the input box content. + For Windows cloud applications, sent text is added to the existing content in the input box. |
+
void |
+pauseStreaming()
+Pause the media stream.
+ |
+
void |
+release()
+Release the session.
+ |
+
void |
+requestChangeSeat(java.lang.String userId,
+ MultiUser.Role targetRole,
+ int targetPlayerIndex,
+ AsyncCallback<java.lang.Void> callback)
+Apply to the room owner to switch the role and seat of a player (`userID`) to `targetRole` and
+ `targetPlayerIndex` respectively.
+ |
+
void |
+restartCloudApp()
+Restart the cloud application process.
+ |
+
void |
+resumeStreaming()
+Resume the media stream.
+ |
+
void |
+sendCustomAudioData(java.nio.ByteBuffer audioData,
+ long captureTimeNs)
+Send custom audio data.
+ |
+
void |
+setAudioSink(AudioSink audioSink)
+Sets a audio sink for this session.
+ |
+
void |
+setDisableCloudInput(boolean disableCloudInput)
+Disable the Cloud input.
++ When the cloud input is disable, the cloud application's soft keyboard won't appear. + + This function is only supported for mobile cloud applications. + |
+
void |
+setEnableAudioPlaying(boolean enable)
+Set whether the SDK plays audio.
+ |
+
void |
+setEnableLocalAudio(boolean enableLocalAudio)
+Enable or disable the local audio track that is captured from the mic.
+ |
+
void |
+setEnableLocalVideo(boolean enableLocalVideo)
+Enable or disable the local video track that is captured from the camera.
+ |
+
void |
+setLocalVideoProfile(int width,
+ int height,
+ int fps,
+ int minBitrate,
+ int maxBitrate,
+ boolean isFrontCamera)
+Set the local video profile.
+ |
+
void |
+setMicMute(java.lang.String userID,
+ int micStatus,
+ AsyncCallback<java.lang.Void> callback)
+Change the mic status of the `
+userID ` user. |
+
void |
+setRemoteAudioPlayProfile(float volume)
+Set the playing profile of the remote audio.
+ |
+
void |
+setRemoteDesktopResolution(int width,
+ int height)
+Set the resolution of Cloud Desktop.
+ |
+
void |
+setRemoteVideoProfile(int fps,
+ int minBitrate,
+ int maxBitrate,
+ AsyncCallback<java.lang.String> callback)
+Set the remote video profile.
+ |
+
void |
+setRenderView(TcrRenderView renderView)
+Set the rendering view for this session, and thus the SDK will render the streaming content to the view.
+ |
+
void |
+setVideoSink(VideoSink videoSink)
+Sets a video sink for this session.
+ |
+
boolean |
+start(java.lang.String serverSession)
+Starts the session.
+ |
+
void |
+syncRoomInfo()
+Refresh the information of all seats.
+ |
+
boolean start(java.lang.String serverSession)+
serverSession
- The ServerSession
returned from CreateSession
+ API.void release()+
void setRenderView(TcrRenderView renderView)+
renderView
- The rendering view to be set. This can be null to remove any existing renderView.void setVideoSink(VideoSink videoSink)+
You may use this interface to post-process or render video images.
videoSink
- The view sink to be set.This can be null to remove any existing one.void setAudioSink(AudioSink audioSink)+
audioSink
- The audio sink to be set.void setEnableAudioPlaying(boolean enable)+
enable
- true to enable audio playback, false otherwise.void pauseStreaming()+
void resumeStreaming()+
void setRemoteVideoProfile(int fps, + int minBitrate, + int maxBitrate, + AsyncCallback<java.lang.String> callback)+
fps
- The frame rate. Value range: [10,60]. Default value: `60`.minBitrate
- The minimum bitrate in Kbps. Value range: [1000,15000]. Default value: `1000`.maxBitrate
- The maximum bitrate in Kbps. Value range: [1000,15000]. Default value: `15000`.callback
- The callback for the call resultAsyncCallback.onSuccess(Object)
` will be called back if the success parameter is sent to the
+ cloud server. However, the eventual setting effect of this API is subject to the cloud settings. The
+ value set in the SDK can take effect only if it doesn't exceed the upper limit configured in the
+ cloud.AsyncCallback.onFailure(int, String)
` will be called back if the API call times out. The error
+ code is `TcrCode.ERR_TIMEOUT
`.void setRemoteAudioPlayProfile(float volume)+
volume
- The volume scalar in the range of [0,10] that will be set on this remote audio stream.void setLocalVideoProfile(int width, + int height, + int fps, + int minBitrate, + int maxBitrate, + boolean isFrontCamera)+
width
- The frame width, range[128, 1920]. Suggested value: 640.height
- The frame height, range[128, 1920]. Suggested value: 480.fps
- The frame rate must be greater than 0. Suggested value: 30.minBitrate
- The minimum bitrate in kbps must be greater than or equal to 0. Suggested value: 512.maxBitrate
- The maximum bitrate in kbps must be greater than 0. Suggested value: 1024.isFrontCamera
- whether to use the front camera. Suggested value: true.void setEnableLocalVideo(boolean enableLocalVideo)+
enableLocalVideo
- true to enable the local video, false otherwise.void setEnableLocalAudio(boolean enableLocalAudio)+
enableLocalAudio
- true to enable the local audio, false otherwise.void sendCustomAudioData(java.nio.ByteBuffer audioData, + long captureTimeNs)+
TcrSessionConfig.enableCustomAudioCapture
is true.audioData
- A ByteBuffer containing the audio data. This buffer MUST contain PCM data
+ (16-bit) according to the configured audio format.captureTimeNs
- The capture time of the audio data, in nanoseconds. This timestamp should be a monotonically
+ increasing value, used for synchronizing the audio data.TcrSessionConfig.Builder.enableCustomAudioCapture(boolean, int, boolean)
void restartCloudApp()+
void pasteText(java.lang.String text)+
text
- The text to be sentvoid setDisableCloudInput(boolean disableCloudInput)+
disableCloudInput
- true disables the cloud input. void setRemoteDesktopResolution(int width, + int height)+
width
- Width of cloud desktop.height
- Height of cloud desktop.Keyboard getKeyboard()+
Mouse getMouse()+
Gamepad getGamepad()+
TouchScreen getTouchScreen()+
CustomDataChannel createCustomDataChannel(int port, + CustomDataChannel.Observer observer)+
port
- The cloud port number uniquely identifying the data channel.observer
- The CustomDataChannel.Observer
.CustomDataChannel
void changeSeat(java.lang.String userId, + MultiUser.Role targetRole, + int targetPlayerIndex, + AsyncCallback<java.lang.Void> callback)+
AsyncCallback.onSuccess(Object)
` will be called back.
+ TcrCode.MULTI_PLAYER_ASSIGN_SEAT_FAILED
`
+ will be passed in to `code
` of the `AsyncCallback.onFailure(int, String)
` callback.
+ TcrCode.MULTI_PLAYER_NO_AUTHORIZED
` will be passed in to `code
` of the `AsyncCallback.onFailure(int, String)
` callback.
+ TcrCode.ERR_TIMEOUT
` will be passed in to
+ `code
` of the `AsyncCallback.onFailure(int, String)
` callback.userId
- The target user IDtargetRole
- The target role `MultiUser.Role
`targetPlayerIndex
- The target seat. This parameter can take effect only for the `Player` role and
+ will be `0` for the `Viewer` role.callback
- The callback for the setting result.
+ `AsyncCallback.onSuccess(Object)
` will be called back if the setting succeeds.
+ `AsyncCallback.onFailure(int, String)
` will be called back if the setting fails.void requestChangeSeat(java.lang.String userId, + MultiUser.Role targetRole, + int targetPlayerIndex, + AsyncCallback<java.lang.Void> callback)+
AsyncCallback.onSuccess(Object)
` will be called back.
+ TcrCode.MULTI_PLAYER_IGNORED_HOST_SUBMIT
` will be passed in to `code
` of the `AsyncCallback.onFailure(int, String)
` callback.
+ TcrCode.ERR_TIMEOUT
` will be passed in to
+ `code
` of the `AsyncCallback.onFailure(int, String)
` callback.userId
- The target player IDtargetRole
- The target role `MultiUser.Role
`targetPlayerIndex
- The target seat. This parameter can take effect only for the `Player` role and
+ will be `0` for the `Viewer` role.callback
- The callback for the setting result.void setMicMute(java.lang.String userID, + int micStatus, + AsyncCallback<java.lang.Void> callback)+
userID
` user.
+ AsyncCallback.onSuccess(Object)
` will be called back.
+ userID
` of another user, `AsyncCallback.onFailure(int,
+ String)
` will be called back, and TcrCode.MULTI_PLAYER_NO_AUTHORIZED
will be passed in to `code
`.
+ userID
` is incorrect, `AsyncCallback.onFailure(int, String)
` will be called back, and
+ `TcrCode.MULTI_PLAYER_NO_SUCH_USER
` will be passed in to `code
`.micStatus
- The mic status. Valid values: `MultiUser.MIC_STATUS_DISABLE
`, `MultiUser.MIC_STATUS_OFF
`, `MultiUser.MIC_STATUS_ON
`.callback
- The callback for the setting result.void syncRoomInfo()+
TcrSession.Event.MULTI_USER_SEAT_INFO
callback.public static class TcrSessionConfig.Builder
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
TcrSessionConfig |
+build()
+Construct a
+TcrSessionConfig . |
+
TcrSessionConfig.Builder |
+enableCustomAudioCapture(boolean enableCustomAudioCapture,
+ int inputSampleRate,
+ boolean useStereoInput)
+
+ |
+
TcrSessionConfig.Builder |
+enableLowLegacyRendering(boolean enableLowLegacyRendering)
+
+ |
+
TcrSessionConfig.Builder |
+idleThreshold(long idleThreshold)
+
+ |
+
TcrSessionConfig.Builder |
+lowFpsThreshold(int fps,
+ int duration)
+
+ |
+
TcrSessionConfig.Builder |
+observer(TcrSession.Observer observer)
+
+ |
+
TcrSessionConfig.Builder |
+preferredCodec(TcrSessionConfig.VideoCodecType preferredCodec)
+
+ |
+
TcrSessionConfig.Builder |
+videoFrameCallback(VideoFrameBufferCallback videoFrameBufferCallback)
+
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public TcrSessionConfig.Builder idleThreshold(long idleThreshold)+ +
public TcrSessionConfig.Builder lowFpsThreshold(int fps, + int duration)+ +
public TcrSessionConfig.Builder observer(TcrSession.Observer observer)+ +
public TcrSessionConfig.Builder videoFrameCallback(VideoFrameBufferCallback videoFrameBufferCallback)+ +
public TcrSessionConfig.Builder enableLowLegacyRendering(boolean enableLowLegacyRendering)+ +
public TcrSessionConfig.Builder preferredCodec(TcrSessionConfig.VideoCodecType preferredCodec)+ +
public TcrSessionConfig.Builder enableCustomAudioCapture(boolean enableCustomAudioCapture, + int inputSampleRate, + boolean useStereoInput)+
TcrSessionConfig.enableCustomAudioCapture
, TcrSessionConfig.inputSampleRate
+ and TcrSessionConfig.useStereoInput
.
+ #getCustomAudioCaptureDataBufferSize(int, boolean)
to obtain the buffer size for allocating space to your
+ ByteBuffer, otherwise TcrSdk cannot process it.
+ TcrSession.sendCustomAudioData(ByteBuffer, long)
to transmit custom audio data. Reiterate: The size
+ of the input ByteBuffer MUST be consistent with the size obtained from
+ CustomAudioBufferUtil.getCustomAudioCaptureDataBufferSize(int,boolean)
,
+ otherwise TcrSdk cannot process it.public TcrSessionConfig build()+
TcrSessionConfig
.TcrSessionConfig
public static enum TcrSessionConfig.VideoCodecType +extends java.lang.Enum<TcrSessionConfig.VideoCodecType>+
Enum Constant and Description | +
---|
H264 |
+
H265 |
+
Modifier and Type | +Method and Description | +
---|---|
static TcrSessionConfig.VideoCodecType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static TcrSessionConfig.VideoCodecType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TcrSessionConfig.VideoCodecType H264+
public static final TcrSessionConfig.VideoCodecType H265+
public static TcrSessionConfig.VideoCodecType[] values()+
+for (TcrSessionConfig.VideoCodecType c : TcrSessionConfig.VideoCodecType.values()) + System.out.println(c); +
public static TcrSessionConfig.VideoCodecType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class TcrSessionConfig
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+TcrSessionConfig.Builder |
+
static class |
+TcrSessionConfig.VideoCodecType
+Enumeration of supported video codec types.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
boolean |
+enableCustomAudioCapture
+Indicates whether custom audio capture is enabled (true) or disabled (false).
+ |
+
boolean |
+enableLowLegacyRendering
+Turn on low-latency rendering.
++ Rendering delay will be reduced when turned on. + When the network condition is good, the delay is significantly reduced after opening. |
+
long |
+idleThreshold
+The idle detection threshold, that is, the duration of user inactivity.
+ |
+
int |
+inputSampleRate
+The sample rate (in Hz) of the input audio, e.g., 44100 or 48000.
+ |
+
int |
+lowFpsThresholdCount
+The frame rate threshold.
+ |
+
int |
+lowFpsThresholdDuration
+The frame rate duration threshold.
+ |
+
TcrSession.Observer |
+observer
+The observer of TcrSession
+ |
+
TcrSessionConfig.VideoCodecType |
+preferredCodec
+The Preferred Codec.
+ |
+
boolean |
+useStereoInput
+Indicates whether stereo input (true) or mono input (false) is used.
+ |
+
VideoFrameBufferCallback |
+videoFrameBufferCallback
+The callback of video frame buffer
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static TcrSessionConfig.Builder |
+builder()
+return the builder for TcrSessionConfig
+ |
+
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public final long idleThreshold+
TcrSession.Event.CLIENT_IDLE
will be triggered.public final int lowFpsThresholdCount+
fps
and the duration exceeds duration
second, the
+ event TcrSession.Event.CLIENT_LOW_FPS
will be triggered.public final int lowFpsThresholdDuration+
fps
and the duration exceeds duration
second, the
+ event TcrSession.Event.CLIENT_LOW_FPS
will be triggered.public final TcrSessionConfig.VideoCodecType preferredCodec+
This parameter can be used to configure the preferred codec. Currently, the supported preferred codecs that + can be chosen are H264 and H265. If the preferred codec you have chosen is not supported on a particular device, + we will select a codec that is supported natively on that device.
public final boolean enableCustomAudioCapture+
TcrSessionConfig.Builder.enableCustomAudioCapture(boolean, int, boolean)
+ TcrSession.sendCustomAudioData(ByteBuffer, long)
public final int inputSampleRate+
TcrSessionConfig.Builder.enableCustomAudioCapture(boolean, int, boolean)
+ TcrSession.sendCustomAudioData(ByteBuffer, long)
public final boolean useStereoInput+
TcrSessionConfig.Builder.enableCustomAudioCapture(boolean, int, boolean)
+ TcrSession.sendCustomAudioData(ByteBuffer, long)
public final TcrSession.Observer observer+
public final VideoFrameBufferCallback videoFrameBufferCallback+
public final boolean enableLowLegacyRendering+
public java.lang.String toString()+
toString
in class java.lang.Object
public static TcrSessionConfig.Builder builder()+
public class TcrTestEnv
+extends java.lang.Object
+Modifier and Type | +Method and Description | +
---|---|
static TcrTestEnv |
+getInstance()
+获取
+TcrTestEnv 实例。 |
+
void |
+startSession(Context ctx,
+ java.lang.String experienceCode,
+ java.lang.String clientSession,
+ <any> listener,
+ ErrorListener errorListener)
+Request to start the session in the test environment and obtain the server session.
+ |
+
void |
+stopSession(java.lang.String experienceCode)
+Request to stop the session in the test environment.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static TcrTestEnv getInstance()+
TcrTestEnv
实例。public void startSession(Context ctx, + java.lang.String experienceCode, + java.lang.String clientSession, + <any> listener, + ErrorListener errorListener)+
ctx
- Android's Context
experienceCode
- The experience code created in the console.clientSession
- The client session returned by the TcrSession.Event.STATE_INITED
event
+ after SDK initialization is successful.listener
- The listener for successful requests.
+ The parameter of the onResponse method after a successful request is the server session.errorListener
- The listener for failed requests.public void stopSession(java.lang.String experienceCode)+
experienceCode
- The experience code created in the console.public interface TouchScreen
+Modifier and Type | +Method and Description | +
---|---|
void |
+touch(float x,
+ float y,
+ int eventType,
+ int fingerID,
+ int width,
+ int height,
+ long timestamp)
+Trigger the touch event of the cloud touch screen.
+ |
+
void touch(float x, + float y, + int eventType, + int fingerID, + int width, + int height, + long timestamp)+
If you have rendered streaming video on the local view and want to obtain the parameters of the touch event + that triggers the cloud touch screen from the touch event of the local view, then you may need to perform some + coordinate system conversion, and convert the coordinates of the touch point on the local view to a coordinate + value on the streaming video. The coordinate system of the streaming video is based on the upper left corner of + the streaming video as the origin, the x-axis is rightward, and the y-axis is downward. For example, the + streaming video shown in the figure below is centered and rendered on the local view, and the touch point + coordinates (a, b) of the local view need to be converted to coordinates (x, y) in the streaming video coordinate + system.
+
+ ┌─────┬─────────────────┬─────┐
+ │ │ +(a,b) │ │
+ │ │ (x,y) │ │
+ │ │ │ │
+ │ │ │ │
+ │ │ │ │
+ └─────┴─────────────────┴─────┘
+
x
- The coordinate value x of the touch point on the streaming video coordinate system.y
- The coordinate value y of the touch point on the streaming video coordinate system.eventType
- 0 for press, 1 for move, 2 for lift.fingerID
- The pointer identifier associated with a particular pointer data index in this event. The
+ identifier tells you the actual pointer number associated with the data, accounting for individual
+ pointers going up and down since the start of the current gesture. You may obtain this value from
+ android.view.MotionEvent#getPointerId(int)
.width
- The width of the streaming video.height
- The height of the streaming video.timestamp
- The time this event occurred, in the android.os.SystemClock#uptimeMillis
time
+ base. You may obtain this value from android.view.MotionEvent#getEventTime()
.public static interface VideoFrame.Buffer
+Modifier and Type | +Method and Description | +
---|---|
void |
+release()
+Decreases ref count by one.
+ |
+
void |
+retain()
+Increases ref count by one.
+ |
+
VideoFrame.I420Buffer |
+toI420()
+Convert Buffer to yuv 420 type
+ |
+
VideoFrame.I420Buffer toI420()+
void retain()+
void release()+
public static interface VideoFrame.I420Buffer +extends VideoFrame.Buffer+
Modifier and Type | +Method and Description | +
---|---|
java.nio.ByteBuffer |
+getDataU()
+A direct ByteBuffer containing U-plane data.
+ |
+
java.nio.ByteBuffer |
+getDataV()
+A direct ByteBuffer containing V-plane data.
+ |
+
java.nio.ByteBuffer |
+getDataY()
+A direct ByteBuffer containing Y-plane data.
+ |
+
int |
+getStrideU()
+Represents the number of bytes between the start of each row of U-plane pixels in the video frame
+ |
+
int |
+getStrideV()
+Represents the number of bytes between the start of each row of V-plane pixels in the video frame
+ |
+
int |
+getStrideY()
+Represents the number of bytes between the start of each row of Y-plane pixels in the video frame
+ |
+
release, retain, toI420
java.nio.ByteBuffer getDataY()+
java.nio.ByteBuffer getDataU()+
java.nio.ByteBuffer getDataV()+
int getStrideY()+
int getStrideU()+
int getStrideV()+
public static interface VideoFrame.TextureBuffer +extends VideoFrame.Buffer+
Modifier and Type | +Method and Description | +
---|---|
int |
+getTextureID()
+The parameter "textureID" is a public integer variable that represents the ID of a texture in the graphics
+ memory.
+ |
+
Matrix |
+getTransformMatrix()
+Retrieve the transform matrix associated with the frame.
+ |
+
release, retain, toI420
int getTextureID()+
Matrix getTransformMatrix()+
public interface VideoFrame
+Modifier and Type | +Interface and Description | +
---|---|
static interface |
+VideoFrame.Buffer
+Video frame buffer basic class
+ |
+
static interface |
+VideoFrame.I420Buffer
+Definition of I420 buffers
+ |
+
static interface |
+VideoFrame.TextureBuffer
+Definition of texture buffers
+ |
+
Modifier and Type | +Method and Description | +
---|---|
VideoFrame.Buffer |
+getBuffer()
+When the sdk uses a hard decoder to decode, the returned Buffer type is
+VideoFrame.TextureBuffer + When the sdk uses a soft decoder to decode, the returned Buffer type is VideoFrame.I420Buffer |
+
int |
+getHeight()
+Video frame height
+ |
+
int |
+getRotation()
+The clockwise rotation angle of video pixels.
+ |
+
long |
+getTimestampNs()
+The timestamp of the video frame, in ns
+ |
+
int |
+getWidth()
+Video frame width
+ |
+
void |
+release()
+Decreases ref count by one.
+ |
+
void |
+retain()
+Increases ref count by one.
+ |
+
VideoFrame.Buffer getBuffer()+
VideoFrame.TextureBuffer
VideoFrame.I420Buffer
int getRotation()+
long getTimestampNs()+
int getWidth()+
int getHeight()+
void retain()+
void release()+
public interface VideoFrameBufferCallback
+Modifier and Type | +Method and Description | +
---|---|
void |
+onMediaCodecFormat(java.lang.String mimeType,
+ int width,
+ int height)
+Called when the video format has changed.
+ |
+
void |
+onVideoBufferCallback(java.nio.ByteBuffer byteBuffer,
+ int width,
+ int height,
+ long captureTimeNs)
+Called when a piece of video raw data is ready.
+ |
+
void onVideoBufferCallback(java.nio.ByteBuffer byteBuffer, + int width, + int height, + long captureTimeNs)+
byteBuffer
- The data buffer to be decoded.width
- The width of the frame (in pixels)height
- The height of the frame (in pixels)captureTimeNs
- The capture time of the frame in nano secondsvoid onMediaCodecFormat(java.lang.String mimeType, + int width, + int height)+
MediaFormat
.mimeType
- The mime type of the content.width
- The width of the frame (in pixels)height
- The height of the frame (in pixels)MediaFormat#createVideoFormat(String, int, int)
public interface VideoSink
+Modifier and Type | +Method and Description | +
---|---|
void |
+onFrame(VideoFrame frame)
+Called when a video frame is received.
+ |
+
void onFrame(VideoFrame frame)+
frame
- The received video frame. See VideoFrame
.public class CursorImageInfo
+extends java.lang.Object
+
+ HotSpotY
+ ┌──────────────────▲───────────────────────────┐
+ │ │ │
+ │ HotSpotX │ │
+ ◀───────────────── ●● │
+ │ ●●●●●●● │
+ │ ●●● ●●● │
+ │ ●●● ●●● │
+ │ ●●● ●● │
+ │ ●● ●● │
+ │ ●●●●●●●●●●●●●●●●●●●●● │
+ │ ● ● │
+ │ ● ● │
+ │ ● ● │
+ │ ● ● │
+ │ ● ● │
+ │ ● ● │
+ │ ●●●●●●●●● │
+ │ │
+ │ │
+ │ │
+ └──────────────────────────────────────────────┘
+
Modifier and Type | +Field and Description | +
---|---|
Bitmap |
+cursorBitmap
+cursorBitmap mouse pointer picture
+ |
+
int |
+hotSpotX
+hotSpotX mouse x coordinate offset, default value is 0 (The mouse pointer points to the upper left vertex)
+ |
+
int |
+hotSpotY
+hotSpotY mouse y coordinate offset, default value is 0 (The mouse pointer points to the upper left vertex)
+ |
+
Constructor and Description | +
---|
CursorImageInfo(Bitmap cursorBitmap,
+ int hotSpotX,
+ int hotSpotY) |
+
public Bitmap cursorBitmap+
public int hotSpotX+
public int hotSpotY+
public class CursorState
+extends java.lang.Object
+Constructor and Description | +
---|
CursorState(boolean cursorShowState) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static enum MultiUser.Role +extends java.lang.Enum<MultiUser.Role>+
Enum Constant and Description | +
---|
PLAYER
+Player
+ |
+
VIEWER
+Viewer
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static MultiUser.Role |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static MultiUser.Role[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final MultiUser.Role VIEWER+
public static final MultiUser.Role PLAYER+
public static MultiUser.Role[] values()+
+for (MultiUser.Role c : MultiUser.Role.values()) + System.out.println(c); +
public static MultiUser.Role valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class MultiUser
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static class |
+MultiUser.Role
+Multiplayer interactive cloud game user roles
+ |
+
Modifier and Type | +Field and Description | +
---|---|
static <any> |
+CREATOR |
+
static int |
+MIC_STATUS_DISABLE
+If the mic is muted by the room owner, the user cannot unmute it.
+ |
+
static int |
+MIC_STATUS_OFF
+If the mic is muted by the user, the user can unmute it.
+ |
+
static int |
+MIC_STATUS_ON
+The user unmutes the mic.
+ |
+
int |
+micStatus
+The status of the user mic
+ `0`: The mic is muted by the room owner.
+ |
+
int |
+seatIndex
+The user seat
+ |
+
java.lang.String |
+userID
+The user ID
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+MultiUser(Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public java.lang.String userID+
public int seatIndex+
public int micStatus+
MIC_STATUS_DISABLE
,
+MIC_STATUS_OFF
,
+MIC_STATUS_ON
public static final int MIC_STATUS_DISABLE+
public static final int MIC_STATUS_OFF+
public static final int MIC_STATUS_ON+
public static final <any> CREATOR+
public class MultiUserSeatInfo
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
int |
+maxPlayerSeats
+The current maximum number of players
+ |
+
java.util.List<MultiUser> |
+players
+The player list
+ |
+
int |
+playerSeatLeft
+The current number of idle player seats
+ |
+
java.lang.String |
+userID
+The user ID
+ |
+
java.util.List<MultiUser> |
+viewers
+The viewer list
+ |
+
Constructor and Description | +
---|
MultiUserSeatInfo(java.lang.String userID,
+ java.util.List<MultiUser> players,
+ java.util.List<MultiUser> viewers,
+ int maxPlayerSeats,
+ int playerSeatLeft) |
+
public java.lang.String userID+
public java.util.List<MultiUser> players+
public java.util.List<MultiUser> viewers+
public int maxPlayerSeats+
public int playerSeatLeft+
public class RemoteDesktopInfo
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
int |
+mAppWindowLeftOffset
+Deprecated.
+ |
+
int |
+mAppWindowTopOffset
+Deprecated.
+ |
+
boolean |
+mCursorShowing
+cursor show status true:showing false:hidden.
+ |
+
int |
+mScreenHeight
+Deprecated.
+ |
+
int |
+mScreenWidth
+Deprecated.
+ |
+
Constructor and Description | +
---|
RemoteDesktopInfo(boolean mCursorShowing,
+ int left,
+ int top,
+ int width,
+ int height) |
+
Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+toString() |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public boolean mCursorShowing+
When the remote device mouse is displayed, you need to send absolute (Mouse#onMoveTo(int, int)) coordinates to + the remote device.
+When the remote device mouse is hidden, you need to send relative (Mouse#onDeltaMove(int, int)) coordinates to + the remote device
@Deprecated +public int mAppWindowLeftOffset+
@Deprecated +public int mAppWindowTopOffset+
@Deprecated +public int mScreenWidth+
@Deprecated +public int mScreenHeight+
public class RoleApplyInfo
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
MultiUser.Role |
+role
+The role want to apply for
+ |
+
int |
+seatIndex
+The seat index want to apply for
+ |
+
java.lang.String |
+userID
+The user ID
+ |
+
Constructor and Description | +
---|
RoleApplyInfo(java.lang.String userID,
+ MultiUser.Role role,
+ int seatIndex) |
+
public java.lang.String userID+
public MultiUser.Role role+
public int seatIndex+
public RoleApplyInfo(java.lang.String userID, + MultiUser.Role role, + int seatIndex)+
public class ScreenConfig
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
java.lang.String |
+orientation
+The orientation of the activity's display on the device.
+ |
+
int |
+screenHeight
+The height of the cloud screen
+ |
+
int |
+screenWidth
+The width of the cloud screen
+ |
+
Constructor and Description | +
---|
ScreenConfig(java.lang.String orientation,
+ int width,
+ int height) |
+
public java.lang.String orientation+
public int screenWidth+
public int screenHeight+
public class StatsInfo
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
long |
+audioRecvBitrate
+The calculated bitrate of the audio bytes received over the network.
+ |
+
long |
+audioSentBitrate
+The calculated bitrate of the audio bytes sent to the server over network.
+ |
+
long |
+bitrate
+The calculated bitrate of the audio and video bytes received over the network.
+ |
+
java.lang.String |
+cpu
+CPU usage of the remote device
+ |
+
long |
+fps
+The frame rate of the decoded video
+ |
+
java.lang.String |
+gpu
+GPU usage of the remote device
+ |
+
int |
+packetLost
+The number of discarded packets
+ |
+
long |
+rtt
+The round-trip event to STUN
+ |
+
long |
+videoFreezeCount
+Number of video freezes
+ |
+
double |
+videoFreezeDuration
+Total video freeze time
+ |
+
long |
+videoRecvBitrate
+The calculated bitrate of the video bytes received over the network.
+ |
+
long |
+videoSentBitrate
+The calculated bitrate of the video bytes sent to the server over network.
+ |
+
Constructor and Description | +
---|
StatsInfo(java.lang.String cpu,
+ java.lang.String gpu,
+ long fps,
+ long rtt,
+ long bitrate,
+ long audioRecvBitrate,
+ long videoRecvBitrate,
+ long audioSentBitrate,
+ long videoSentBitrate,
+ int packetLost,
+ long videoFreezeCount,
+ double videoFreezeDuration) |
+
public java.lang.String cpu+
public java.lang.String gpu+
public long fps+
public long rtt+
public long bitrate+
public long audioRecvBitrate+
public long videoRecvBitrate+
public long audioSentBitrate+
public long videoSentBitrate+
public int packetLost+
public long videoFreezeCount+
public double videoFreezeDuration+
public StatsInfo(java.lang.String cpu, + java.lang.String gpu, + long fps, + long rtt, + long bitrate, + long audioRecvBitrate, + long videoRecvBitrate, + long audioSentBitrate, + long videoSentBitrate, + int packetLost, + long videoFreezeCount, + double videoFreezeDuration)+
public class VideoStreamConfig
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
int |
+height
+The height of the streaming video
+ |
+
int |
+width
+The width of the streaming video
+ |
+
Constructor and Description | +
---|
VideoStreamConfig(int videoWidth,
+ int videoHeight) |
+
Class | +Description | +
---|---|
CursorImageInfo | +
+ The remote cursor image information.
++ + The mouse picture is a rectangle. |
+
CursorState | +
+ The showing state of cloud cursor
+ |
+
MultiUser | +
+ Message body for user parameters.
+ |
+
MultiUserSeatInfo | +
+ The multi user seat info
+ |
+
RemoteDesktopInfo | +
+ Remote desktop information.
+ |
+
RoleApplyInfo | +
+ role apply information
+ |
+
ScreenConfig | +
+ The cloud screen configuration
+ |
+
StatsInfo | +
+ Stats (performance) information.
+ |
+
VideoStreamConfig | +
+ The streaming video configuration
+ |
+
Enum | +Description | +
---|---|
MultiUser.Role | +
+ Multiplayer interactive cloud game user roles
+ |
+
Interface | +Description | +
---|---|
AsyncCallback<T> | +
+ This interface defines a general async task callback schema.
+ |
+
AudioSink | +
+ Implement this interface if you want to get and play the audio data by yourself.
+ |
+
CustomDataChannel | +
+ This interface represents a data channel between the client and the cloud application.
+ |
+
CustomDataChannel.Observer | +
+ A class can implement the
+Observer interface when it wants to be informed of events
+ in CustomDataChannel objects. |
+
Gamepad | +
+ This interface is used to interact with the virtual Gamepad device on the server.
+ |
+
Keyboard | +
+ This interface is used to interact with the virtual Keyboard device on the server.
+ |
+
Mouse | +
+ This interface is used to interact with the virtual Mouse device on the server.
+ |
+
TcrCode | +
+ This interface defines common codes of TcrSdk.
+ |
+
TcrCode.SessionStop | +
+ The code returned when the state of TcrSession changes to
+
+TcrSession.Event.STATE_CLOSED |
+
TcrLogger | +
+ This interface represents the log callbacks of the TcrSdk.
+ |
+
TcrSession | +
+ This interface represents a session between the client and the TCR server.
+ |
+
TcrSession.Observer | +
+ This interface represents the observer of TcrSession.
+ |
+
TouchScreen | +
+ This interface is used to interact with the virtual touch screen on the server.
+ |
+
VideoFrame | +
+ This interface represents a Video frame data.
+ |
+
VideoFrame.Buffer | +
+ Video frame buffer basic class
+ |
+
VideoFrame.I420Buffer | +
+ Definition of I420 buffers
+ |
+
VideoFrame.TextureBuffer | +
+ Definition of texture buffers
+ |
+
VideoFrameBufferCallback | +
+ Implement this interface if you want to get and decode the raw video data by yourself.
+ |
+
VideoSink | +
+ This interface represents a video sink.
+ |
+
Class | +Description | +
---|---|
TcrSdk | +
+ This is the entry class for the TcrSdk.
+ |
+
TcrSessionConfig | +
+ The Tcr session configuration class
+ |
+
TcrSessionConfig.Builder | ++ |
TcrTestEnv | +
+ This class helps app developers quickly verify the correctness of SDK integration, so that
+ potential issues can be discovered and resolved before using the SDK in production.
++ With TcrTestEnv, app developers can test SDK integration without relying on a real backend service. + Once the integration testing is completed, app developers must use their own backend APIs + to communicate with the SDK. |
+
Enum | +Description | +
---|---|
Gamepad.KeyType | +
+ The type of a general controller button
+ |
+
Mouse.CursorStyle | +
+ The style of the cloud cursor
+ |
+
Mouse.KeyType | +
+ General mouse button types
+ |
+
TcrSession.Event | +
+ Session event definitions.
+ |
+
TcrSessionConfig.VideoCodecType | +
+ Enumeration of supported video codec types.
+ |
+
public class CustomAudioBufferUtil
+extends java.lang.Object
+Constructor and Description | +
---|
CustomAudioBufferUtil() |
+
Modifier and Type | +Method and Description | +
---|---|
static int |
+getCustomAudioCaptureDataBufferSize(int sampleRate,
+ boolean useStereoInput)
+Calculates the buffer size for custom audio capture data based on the given sample rate and whether stereo input
+ is used.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static int getCustomAudioCaptureDataBufferSize(int sampleRate, + boolean useStereoInput)+
sampleRate
- The sample rate of the custom audio capture data (in Hz), e.g., 44100 or 48000.useStereoInput
- If true, stereo input is used; if false, mono input is used.TcrSessionConfig.Builder#enableCustomAudioCapture(boolean, int, boolean)
public class VideoCapabilityUtil
+extends java.lang.Object
+Constructor and Description | +
---|
VideoCapabilityUtil() |
+
Modifier and Type | +Method and Description | +
---|---|
static <any> |
+getRecommendedResolution(int originalWidth,
+ int originalHeight)
+Returns the recommended resolution that take into account the capability of hardware decoders.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static <any> getRecommendedResolution(int originalWidth, + int originalHeight)+
android.util.Range#clamp(Comparable)
.
+ The aspect ratio of the returning resolution will remain the same as that of the original resolution.originalWidth
- The width of the original resolution.originalHeight
- The height of the original resolution.Pair#first
as the recommended width and Pair#second
as the
+ recommended height. Return null if there's no suitable resolution.Class | +Description | +
---|---|
CustomAudioBufferUtil | ++ |
VideoCapabilityUtil | +
+ The util to query video capability.
+ |
+
public class MobileTouchListener
+extends java.lang.Object
+Constructor and Description | +
---|
MobileTouchListener(TcrSession session) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+onTouch(View view,
+ MotionEvent event) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public MobileTouchListener(TcrSession session)+
public class PcClickListener +extends java.lang.Object +implements PcTouchListener.OnClickListener+
PcTouchListener.OnClickListener
. The behavior of this class is to send the key down/up
+ event to the cloud in the callbacks of PcTouchListener.OnClickListener
. The default key is left mouse button,
+ which can be changed via #setMouseKey(KeyType)
.Constructor and Description | +
---|
PcClickListener(TcrSession session) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+onClickDown()
+Called when a view has been clicked and the finger is down.
+ |
+
void |
+onClickUp()
+Called when a view has been clicked and the finger is up.
+ |
+
void |
+setMouseKey(Mouse.KeyType mouseKeyType)
+Set the mouse button type to be sent to the cloud when a click is triggered.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public PcClickListener(TcrSession session)+
public void onClickDown()+
PcTouchListener.OnClickListener
onClickDown
in interface PcTouchListener.OnClickListener
public void onClickUp()+
PcTouchListener.OnClickListener
onClickUp
in interface PcTouchListener.OnClickListener
public void setMouseKey(Mouse.KeyType mouseKeyType)+
mouseKeyType
- The mouse button type to be sent to the cloudpublic static interface PcTouchListener.OnClickListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onClickDown()
+Called when a view has been clicked and the finger is down.
+ |
+
void |
+onClickUp()
+Called when a view has been clicked and the finger is up.
+ |
+
public static interface PcTouchListener.OnDoubleClickListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onDoubleClick()
+Called when a view has been double clicked.
+ |
+
public class PcTouchListener
+extends java.lang.Object
+implements java.util.Observer
+setZoomHandler(PcZoomHandler)
.Modifier and Type | +Class and Description | +
---|---|
static interface |
+PcTouchListener.OnClickListener
+Interface definition for callbacks to be invoked when a view is clicked.
+ |
+
static interface |
+PcTouchListener.OnDoubleClickListener
+Interface definition for callbacks to be invoked when a view is double clicked.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
protected static int |
+LONG_PRESS
+异步长按事件
+ |
+
protected Handler |
+mHandler
+触摸事件的处理器
+ |
+
protected static int |
+SINGLE_CLICK
+异步单击(包括按下和抬起)
+ |
+
Constructor and Description | +
---|
PcTouchListener(TcrSession session)
+constructor
+ |
+
Modifier and Type | +Method and Description | +
---|---|
PcZoomHandler |
+getZoomHandler()
+return the
+PcZoomHandler |
+
boolean |
+onTouch(View view,
+ MotionEvent event) |
+
void |
+release()
+Release the underlying resources.
+ |
+
void |
+setDoubleClickListener(PcTouchListener.OnDoubleClickListener listener)
+Set the double-click listener.
+ |
+
void |
+setLongClickListener(PcTouchListener.OnClickListener listener)
+Set the long click listener.
+ |
+
void |
+setMouseConfig(boolean isRelativeMove,
+ float moveSensitivity,
+ boolean cursorVisibility)
+Set the mouse parameters.
+ |
+
void |
+setShortClickListener(PcTouchListener.OnClickListener listener)
+Set the short click listener.
+ |
+
void |
+setZoomHandler(PcZoomHandler handler)
+set the
+PcZoomHandler . |
+
void |
+update(java.util.Observable o,
+ java.lang.Object arg) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected static final int LONG_PRESS+
protected static final int SINGLE_CLICK+
protected final Handler mHandler+
public PcTouchListener(TcrSession session)+
session
- the associated sessionpublic void release()+
public void setZoomHandler(PcZoomHandler handler)+ +
handler
- the handler to be set. If null
, remove any exist zoom handler.public PcZoomHandler getZoomHandler()+
PcZoomHandler
PcZoomHandler
public void setShortClickListener(PcTouchListener.OnClickListener listener)+
PcClickListener
is used by default.listener
- The listener to be set. If null
, remove any exist listener.public void setLongClickListener(PcTouchListener.OnClickListener listener)+
PcClickListener
is used by default.listener
- The listener to be set. If null
, remove any exist listener.public void setDoubleClickListener(PcTouchListener.OnDoubleClickListener listener)+
listener
- The listener to be set. If null
, remove any exist listener.public void setMouseConfig(boolean isRelativeMove, + float moveSensitivity, + boolean cursorVisibility)+
isRelativeMove
- Set the mode for the cursor to move with the finger.moveSensitivity
- The cursor sensitivity, which is a floating point number in the range of
+ [0.01,10.0].cursorVisibility
- The cursor visibility. 'true': cursor is visible. 'false': cursor is invisible.public boolean onTouch(View view, + MotionEvent event)+
public void update(java.util.Observable o, + java.lang.Object arg)+
update
in interface java.util.Observer
public static interface PcZoomHandler.ZoomListener
+Modifier and Type | +Method and Description | +
---|---|
void |
+onPivot(float x,
+ float y)
+Called when the zoom center is changed.
+ |
+
void |
+onZoom(float ratio)
+Called when the zoom radio is changed.
+ |
+
void onPivot(float x, + float y)+
x
- The horizontal coordinate of the zoomy
- The vertical coordinate of the zoomvoid onZoom(float ratio)+
ratio
- The current zoom ratio.public class PcZoomHandler
+extends java.lang.Object
+Modifier and Type | +Class and Description | +
---|---|
static interface |
+PcZoomHandler.ZoomListener
+Interface definition for callbacks to be invoked when the two-finger pinch zoom status has changed.
+ |
+
Constructor and Description | +
---|
PcZoomHandler(PcTouchListener touchHandler) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+onTouch(View view,
+ MotionEvent event)
+Perform two-finger pinch zoom and swipe based on the gesture.
+ |
+
void |
+resetZoom()
+Reset the zoom of the render view.
+ |
+
void |
+setZoomListener(PcZoomHandler.ZoomListener listener)
+Set the two-finger pinch zoom listener.
+ |
+
void |
+setZoomOffset(Rect rect)
+Set the offsets of the video image frame during zoom.
+ |
+
void |
+setZoomRatio(float min,
+ float max)
+Set zoom ratio.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public PcZoomHandler(PcTouchListener touchHandler)+
public void setZoomRatio(float min, + float max)+
min
- The minimum zoom ratio, which must be greater than 0.max
- The maximum zoom ratio, which must be greater than 1.public void resetZoom()+
public void setZoomOffset(Rect rect)+
rect
- The size of the area within which the video image can slide out of the four borders of the
+ phone screen. The coordinates are all `0` by default.public void setZoomListener(PcZoomHandler.ZoomListener listener)+
listener
- the listener to be set.public boolean onTouch(View view, + MotionEvent event)+
view
- The view to be zoomedevent
- The current touch operationpublic static enum TcrRenderView.InputDeviceType +extends java.lang.Enum<TcrRenderView.InputDeviceType>+
Enum Constant and Description | +
---|
GAMEPAD |
+
KEYBOARD |
+
MOUSE |
+
Modifier and Type | +Method and Description | +
---|---|
static TcrRenderView.InputDeviceType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static TcrRenderView.InputDeviceType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TcrRenderView.InputDeviceType MOUSE+
public static final TcrRenderView.InputDeviceType KEYBOARD+
public static final TcrRenderView.InputDeviceType GAMEPAD+
public static TcrRenderView.InputDeviceType[] values()+
+for (TcrRenderView.InputDeviceType c : TcrRenderView.InputDeviceType.values()) + System.out.println(c); +
public static TcrRenderView.InputDeviceType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static interface TcrRenderView.Observer
+Modifier and Type | +Method and Description | +
---|---|
void |
+onFirstFrameRendered()
+This will be called when the TcrRenderView renders its first frame.
+ |
+
void |
+onFrame(Bitmap bitmap)
+This will be called when a new video frame has been rendered if
+TcrRenderView.setEnableFrameCallback(float) has
+ been called with scale greater or equal to 0. |
+
void onFirstFrameRendered()+
void onFrame(Bitmap bitmap)+
TcrRenderView.setEnableFrameCallback(float)
has
+ been called with scale
greater or equal to 0. bitmap
- Bitmap of the rendered video framepublic static enum TcrRenderView.ScaleType +extends java.lang.Enum<TcrRenderView.ScaleType>+
Enum Constant and Description | +
---|
SCALE_ASPECT_CROP
+Crop mode: The video image is scaled proportionally to ensure that the entire view is filled,
+ and the parts that exceed the view will be cropped.
+ |
+
SCALE_ASPECT_FILL
+Fill mode: The video image is scaled disproportionally to ensure that the entire video image is displayed and
+ fills the view.
+ |
+
SCALE_ASPECT_FIT
+Fit mode: The video image is scaled proportionally to ensure that the entire video image is displayed.
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static TcrRenderView.ScaleType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static TcrRenderView.ScaleType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TcrRenderView.ScaleType SCALE_ASPECT_FIT+
public static final TcrRenderView.ScaleType SCALE_ASPECT_CROP+
public static final TcrRenderView.ScaleType SCALE_ASPECT_FILL+
public static TcrRenderView.ScaleType[] values()+
+for (TcrRenderView.ScaleType c : TcrRenderView.ScaleType.values()) + System.out.println(c); +
public static TcrRenderView.ScaleType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static enum TcrRenderView.TcrRenderViewType +extends java.lang.Enum<TcrRenderView.TcrRenderViewType>+
Enum Constant and Description | +
---|
SURFACE
+The underlying layer uses `
+android.view.SurfaceView ` for rendering. |
+
TEXTURE
+The underlying layer uses `
+android.view.TextureView ` for rendering. |
+
Modifier and Type | +Method and Description | +
---|---|
static TcrRenderView.TcrRenderViewType |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static TcrRenderView.TcrRenderViewType[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TcrRenderView.TcrRenderViewType SURFACE+
android.view.SurfaceView
` for rendering.public static final TcrRenderView.TcrRenderViewType TEXTURE+
android.view.TextureView
` for rendering.public static TcrRenderView.TcrRenderViewType[] values()+
+for (TcrRenderView.TcrRenderViewType c : TcrRenderView.TcrRenderViewType.values()) + System.out.println(c); +
public static TcrRenderView.TcrRenderViewType valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static enum TcrRenderView.VideoRotation +extends java.lang.Enum<TcrRenderView.VideoRotation>+
Enum Constant and Description | +
---|
ROTATION_0
+A 0-degree rotation
+ |
+
ROTATION_180
+A 180-degree rotation
+ |
+
ROTATION_270
+A 270-degree rotation
+ |
+
ROTATION_90
+A 90-degree rotation
+ |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getValue()
+Return the angle value.
+ |
+
java.lang.String |
+toString() |
+
static TcrRenderView.VideoRotation |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static TcrRenderView.VideoRotation[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final TcrRenderView.VideoRotation ROTATION_0+
public static final TcrRenderView.VideoRotation ROTATION_90+
public static final TcrRenderView.VideoRotation ROTATION_180+
public static final TcrRenderView.VideoRotation ROTATION_270+
public static TcrRenderView.VideoRotation[] values()+
+for (TcrRenderView.VideoRotation c : TcrRenderView.VideoRotation.values()) + System.out.println(c); +
public static TcrRenderView.VideoRotation valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toString()+
toString
in class java.lang.Enum<TcrRenderView.VideoRotation>
public int getValue()+
public abstract class TcrRenderView
+extends FrameLayout
+Modifier and Type | +Class and Description | +
---|---|
static class |
+TcrRenderView.InputDeviceType
+An enumeration that defines the input device type.
+ |
+
static interface |
+TcrRenderView.Observer
+This interface represents the observer of TcrRenderView.
+ |
+
static class |
+TcrRenderView.ScaleType
+An enumeration that defines the video scaling type.
+ |
+
static class |
+TcrRenderView.TcrRenderViewType
+An enumeration that defines the types of the rendering view.
+ |
+
static class |
+TcrRenderView.VideoRotation
+An enumeration that defines the video rotation angle.
+ |
+
Modifier and Type | +Field and Description | +
---|---|
protected TcrRenderView.Observer |
+mObserver |
+
protected View |
+mRenderView |
+
protected TcrRenderView.TcrRenderViewType |
+mTcrRenderViewType |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+TcrRenderView(Context context,
+ TcrRenderView.TcrRenderViewType type,
+ TcrSession session)
+The constructor
+ |
+
Modifier and Type | +Method and Description | +
---|---|
protected abstract View |
+createRenderView(TcrRenderView.TcrRenderViewType type)
+创建渲染视图
+ |
+
boolean |
+dispatchGenericMotionEvent(MotionEvent event) |
+
boolean |
+dispatchKeyEvent(KeyEvent event) |
+
java.util.Map |
+getKeyCodeMapping(TcrRenderView.InputDeviceType inputDeviceType)
+Returns a mapping table, based on which TcrRenderView maps local peripheral input events to cloud input events.
+ |
+
void |
+handleMotion(MotionEvent event)
+Handle touch event.
+ |
+
boolean |
+onCapturedPointerEvent(MotionEvent event) |
+
protected void |
+onLayout(boolean changed,
+ int left,
+ int top,
+ int right,
+ int bottom) |
+
abstract void |
+release()
+Release the underlying resources of this view.
++ You need to call this API to release the underlying resources if it is no longer needed, for example, when the + Activity is to be destroyed. |
+
abstract void |
+setDisplayDebugView(boolean displayDebugView)
+Set whether to display the debug view.
+ |
+
abstract void |
+setEnableFrameCallback(float scale)
+Set whether to enable the callback of video frame rendering.
++ + If the scale is greater or equal to 0, the callback (TcrRenderView.Observer.onFrame(Bitmap) ) will be
+ invoked whenever a new video frame has been rendered. |
+
void |
+setEnableInputDeviceHandle(boolean enableInputDeviceHandler)
+Set whether to enable TcrRenderView to process the peripheral input events.
+ |
+
abstract void |
+setEnableSuperResolution(boolean enableSuperResolution)
+Set whether the video super-resolution capability should be enabled.
+ |
+
void |
+setObserver(TcrRenderView.Observer observer)
+Set the observer of this TcrRenderView instance.
+ |
+
void |
+setOnTouchListener(View.OnTouchListener listener)
+Set the listener for the touch events of the view.
+ |
+
abstract void |
+setVideoRotation(TcrRenderView.VideoRotation rotation)
+Set the rotation angle of the rendered video.
+ |
+
abstract void |
+setVideoScaleType(TcrRenderView.ScaleType type)
+Set the scaling type of the rendered video.
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected final View mRenderView+
protected final TcrRenderView.TcrRenderViewType mTcrRenderViewType+
protected TcrRenderView.Observer mObserver+
protected TcrRenderView(Context context, + TcrRenderView.TcrRenderViewType type, + TcrSession session)+
context
- The context of this view.type
- The type of this view.protected abstract View createRenderView(TcrRenderView.TcrRenderViewType type)+
type
- 渲染视图的类型protected void onLayout(boolean changed, + int left, + int top, + int right, + int bottom)+
public void setOnTouchListener(View.OnTouchListener listener)+
PcTouchListener
: Convert local screen touch events to mouse events on the cloud machine.MobileTouchListener
: Map local screen touch events to touch events on the cloud machine.public abstract void release()+
Activity
is to be destroyed.public void handleMotion(MotionEvent event)+
This method will be useful in scenarios like the following: a virtual keyboard view is placed on top of the
+ rendering view, and it is hoped that the buttons on the virtual keyboard view can be clicked while touching the
+ rendering view, such as controlling a character to attack while moving in a mobile game. You can achieve this
+ interactive effect like this:
+ 1. Place the virtual keyboard view above the level of the rendering view, with the same size.
+ 2. In the virtual keyboard view, at the same level as the button, create an empty view, named
+ delegateView
for example, that fills the virtual keyboard view in the layout.
+ 3. Listen to the OnTouchListener
of delegateView, call this in onTouch() callback, and return true.
+ For example:
+ delegateView.setOnTouchListener(new OnTouchListener() {
+ public boolean onTouch(View v, MotionEvent event) {
+ tcrRenderView.handleMotion(event);
+ return true;
+ }
+ });
+
event
- The motion event.public abstract void setVideoRotation(TcrRenderView.VideoRotation rotation)+
rotation
- The rotation anglepublic abstract void setVideoScaleType(TcrRenderView.ScaleType type)+
If not set, the default scaling type is TcrRenderView.ScaleType.SCALE_ASPECT_FIT
.
type
- The scaling typepublic abstract void setEnableSuperResolution(boolean enableSuperResolution)+
If enabled, the rendering quality will be improved, but the GPU and power consumption will increase, and the + frame rate may decrease.
+ +Note that this method only works in api level 21 or above.
enableSuperResolution
- true
to enable SuperResolution, false
otherwise.public abstract void setDisplayDebugView(boolean displayDebugView)+
The debug view shows the information such as performance data, version information, encoding type, key and + touch information, etc.
displayDebugView
- true
to display the debug view, false
otherwise.public java.util.Map getKeyCodeMapping(TcrRenderView.InputDeviceType inputDeviceType)+
If the input device type is TcrRenderView.InputDeviceType.MOUSE
, the returned map is of type HashMap<Integer,
+ KeyType>. The key of the returned map refers to the keycodes defined in KeyEvent
, and the value of
+ the returned map refers to the enums defined in Mouse.KeyType
.
+
+ If the input device type is TcrRenderView.InputDeviceType.GAMEPAD
or TcrRenderView.InputDeviceType.KEYBOARD
, the returned
+ map is of type HashMap<Integer, Integer>. The key of the returned map refers to the keycodes defined in
+ KeyEvent
, and the value of the returned map refers to the keycodes defined in
+ WindowsKeyEvent
.
You can modify the returned map to customize the mapping.
inputDeviceType
- The input device type.public void setEnableInputDeviceHandle(boolean enableInputDeviceHandler)+
Setting this to true tells the TcrRenderView to process input device events automatically. This is the default + behavior of TcrRenderView.
enableInputDeviceHandler
- true to enable, false to disable.public boolean dispatchKeyEvent(KeyEvent event)+
public boolean dispatchGenericMotionEvent(MotionEvent event)+
public boolean onCapturedPointerEvent(MotionEvent event)+
public void setObserver(TcrRenderView.Observer observer)+
observer
- The observer to be set.public abstract void setEnableFrameCallback(float scale)+
scale
is greater or equal to 0, the callback (TcrRenderView.Observer.onFrame(Bitmap)
) will be
+ invoked whenever a new video frame has been rendered. Otherwise, the callback is disabled.scale
- The scale of the Bitmap passed to the callback, or 0 if no Bitmap is required.public class WindowsKeyEvent
+extends java.lang.Object
+Modifier and Type | +Field and Description | +
---|---|
static int |
+KEYBOARD_KEYCODE_0
+Keyboard key '0' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_1
+Keyboard key '1' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_2
+Keyboard key '2' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_3
+Keyboard key '3' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_4
+Keyboard key '4' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_5
+Keyboard key '5' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_6
+Keyboard key '6' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_7
+Keyboard key '7' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_8
+Keyboard key '8' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_9
+Keyboard key '9' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_A
+Keyboard key 'A' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_ALT
+Keyboard key 'alt' keycode
+ Note: Android can distinguish left and right keycode, use here
+
+Keyboard.onKeyboard(int, boolean) to press/release key |
+
static int |
+KEYBOARD_KEYCODE_APOSTROPHE
+Keyboard key ''' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_B
+Keyboard key 'B' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_BACKSLASH
+Keyboard key '\' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_BACKSPACE
+Keyboard key 'BackSpace' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_C
+Keyboard key 'C' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_CAPS_LOCK
+Keyboard key 'CapsLock' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_COMMA
+Keyboard key ',' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_CTRL
+Keyboard key 'ctrl' keycode
+ Note: Android can distinguish left and right keycode, use here
+
+Keyboard.onKeyboard(int, boolean) to press/release key |
+
static int |
+KEYBOARD_KEYCODE_D
+Keyboard key 'D' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_DEL
+Keyboard key 'Delete' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_DOT
+Keyboard key '.' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_DPAD_DOWN
+Keyboard key '⬇' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_DPAD_LEFT
+Keyboard key '⬅' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_DPAD_RIGHT
+Keyboard key '➡' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_DPAD_UP
+Keyboard key '⬆' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_E
+Keyboard key 'E' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_END
+Keyboard key 'End' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_ENTER
+Keyboard key 'Enter' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_EQUALS
+Keyboard key '=' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_ESCAPE
+Keyboard key 'ESC' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F
+Keyboard key 'F' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F1
+Keyboard key 'F1' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F10
+Keyboard key 'F10' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F11
+Keyboard key 'F11' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F12
+Keyboard key 'F12' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F2
+Keyboard key 'F2' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F3
+Keyboard key 'F3' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F4
+Keyboard key 'F4' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F5
+Keyboard key 'F5' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F6
+Keyboard key 'F6' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F7
+Keyboard key 'F7' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F8
+Keyboard key 'F8' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_F9
+Keyboard key 'F9' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_G
+Keyboard key 'G' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_GRAV
+Keyboard key '`' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_H
+Keyboard key 'H' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_HOME
+Keyboard key 'Home' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_I
+Keyboard key 'I' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_INSERT
+Keyboard key 'Insert' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_J
+Keyboard key 'J' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_K
+Keyboard key 'K' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_L
+Keyboard key 'L' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_LEFT_BRACKET
+Keyboard key '[' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_M
+Keyboard key 'M' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_MINUS
+Keyboard key '-' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_N
+Keyboard key 'N' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_LOCK
+Keyboard key 'NumLock' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_0
+Keyboard NumPad key '0' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_1
+Keyboard NumPad key '1' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_2
+Keyboard NumPad key '2' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_3
+Keyboard NumPad key '3' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_4
+Keyboard NumPad key '4' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_5
+Keyboard NumPad key '5' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_6
+Keyboard NumPad key '6' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_7
+Keyboard NumPad key '7' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_8
+Keyboard NumPad key '8' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_9
+Keyboard NumPad key '9' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_ADD
+Keyboard NumPad key '+' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_DIVIDE
+Keyboard NumPad key '/' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_DOT
+Keyboard NumPad key '.' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_ENTER
+Keyboard NumPad key 'Enter' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_MULTIPLY
+Keyboard NumPad key '*' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_NUM_PAD_SUBTRACT
+Keyboard NumPad key '-' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_O
+Keyboard key 'O' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_P
+Keyboard key 'P' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_PAGE_DOWN
+Keyboard key 'PageDown' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_PAGE_UP
+Keyboard key 'PageUp' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_Q
+Keyboard key 'Q' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_R
+Keyboard key 'R' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_RIGHT_BRACKET
+Keyboard key ']' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_S
+Keyboard key 'S' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_SEMICOLON
+Keyboard key ';' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_SHIFT
+Keyboard key 'shift' keycode
+ Note: Android can distinguish left and right keycode, use here
+
+Keyboard.onKeyboard(int, boolean) to press/release key |
+
static int |
+KEYBOARD_KEYCODE_SLASH
+Keyboard key '/' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_SPACE
+Keyboard key 'Space' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_T
+Keyboard key 'T' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_TAB
+Keyboard key 'Tab' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_U
+Keyboard key 'U' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_V
+Keyboard key 'V' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_W
+Keyboard key 'W' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_X
+Keyboard key 'X' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_Y
+Keyboard key 'Y' keycode
+ |
+
static int |
+KEYBOARD_KEYCODE_Z
+Keyboard key 'Z' keycode
+ |
+
static int |
+XBOX_KEYCODE_A
+XBOX key 'A' keycode
+ |
+
static int |
+XBOX_KEYCODE_B
+XBOX key 'B' keycode
+ |
+
static int |
+XBOX_KEYCODE_DOWN
+XBOX key 'DPad ⬇' keycode
+ |
+
static int |
+XBOX_KEYCODE_L1
+XBOX key 'L1' keycode
+ |
+
static int |
+XBOX_KEYCODE_L3
+XBOX key 'L3' keycode
+ |
+
static int |
+XBOX_KEYCODE_LEFT
+XBOX key 'DPad ⬅' keycode
+ |
+
static int |
+XBOX_KEYCODE_R1
+XBOX key 'R1' keycode
+ |
+
static int |
+XBOX_KEYCODE_R3
+XBOX key 'R3' keycode
+ |
+
static int |
+XBOX_KEYCODE_RIGHT
+XBOX key 'DPad ➡' keycode
+ |
+
static int |
+XBOX_KEYCODE_SELECT
+XBOX key 'SELECT' keycode
+ |
+
static int |
+XBOX_KEYCODE_START
+XBOX key 'START' keycode
+ |
+
static int |
+XBOX_KEYCODE_UP
+XBOX key 'DPad ⬆' keycode
+ |
+
static int |
+XBOX_KEYCODE_X
+XBOX key 'X' keycode
+ |
+
static int |
+XBOX_KEYCODE_Y
+XBOX key 'Y' keycode
+ |
+
Constructor and Description | +
---|
WindowsKeyEvent() |
+
public static final int XBOX_KEYCODE_SELECT+
public static final int XBOX_KEYCODE_START+
public static final int XBOX_KEYCODE_UP+
public static final int XBOX_KEYCODE_DOWN+
public static final int XBOX_KEYCODE_LEFT+
public static final int XBOX_KEYCODE_RIGHT+
public static final int XBOX_KEYCODE_X+
public static final int XBOX_KEYCODE_Y+
public static final int XBOX_KEYCODE_A+
public static final int XBOX_KEYCODE_B+
public static final int XBOX_KEYCODE_L1+
public static final int XBOX_KEYCODE_R1+
public static final int XBOX_KEYCODE_L3+
public static final int XBOX_KEYCODE_R3+
public static final int KEYBOARD_KEYCODE_0+
public static final int KEYBOARD_KEYCODE_1+
public static final int KEYBOARD_KEYCODE_2+
public static final int KEYBOARD_KEYCODE_3+
public static final int KEYBOARD_KEYCODE_4+
public static final int KEYBOARD_KEYCODE_5+
public static final int KEYBOARD_KEYCODE_6+
public static final int KEYBOARD_KEYCODE_7+
public static final int KEYBOARD_KEYCODE_8+
public static final int KEYBOARD_KEYCODE_9+
public static final int KEYBOARD_KEYCODE_A+
public static final int KEYBOARD_KEYCODE_B+
public static final int KEYBOARD_KEYCODE_C+
public static final int KEYBOARD_KEYCODE_D+
public static final int KEYBOARD_KEYCODE_E+
public static final int KEYBOARD_KEYCODE_F+
public static final int KEYBOARD_KEYCODE_G+
public static final int KEYBOARD_KEYCODE_H+
public static final int KEYBOARD_KEYCODE_I+
public static final int KEYBOARD_KEYCODE_J+
public static final int KEYBOARD_KEYCODE_K+
public static final int KEYBOARD_KEYCODE_L+
public static final int KEYBOARD_KEYCODE_M+
public static final int KEYBOARD_KEYCODE_N+
public static final int KEYBOARD_KEYCODE_O+
public static final int KEYBOARD_KEYCODE_P+
public static final int KEYBOARD_KEYCODE_Q+
public static final int KEYBOARD_KEYCODE_R+
public static final int KEYBOARD_KEYCODE_S+
public static final int KEYBOARD_KEYCODE_T+
public static final int KEYBOARD_KEYCODE_U+
public static final int KEYBOARD_KEYCODE_V+
public static final int KEYBOARD_KEYCODE_W+
public static final int KEYBOARD_KEYCODE_X+
public static final int KEYBOARD_KEYCODE_Y+
public static final int KEYBOARD_KEYCODE_Z+
public static final int KEYBOARD_KEYCODE_SEMICOLON+
public static final int KEYBOARD_KEYCODE_EQUALS+
public static final int KEYBOARD_KEYCODE_COMMA+
public static final int KEYBOARD_KEYCODE_MINUS+
public static final int KEYBOARD_KEYCODE_DOT+
public static final int KEYBOARD_KEYCODE_SLASH+
public static final int KEYBOARD_KEYCODE_GRAV+
public static final int KEYBOARD_KEYCODE_LEFT_BRACKET+
public static final int KEYBOARD_KEYCODE_BACKSLASH+
public static final int KEYBOARD_KEYCODE_RIGHT_BRACKET+
public static final int KEYBOARD_KEYCODE_APOSTROPHE+
public static final int KEYBOARD_KEYCODE_F1+
public static final int KEYBOARD_KEYCODE_F2+
public static final int KEYBOARD_KEYCODE_F3+
public static final int KEYBOARD_KEYCODE_F4+
public static final int KEYBOARD_KEYCODE_F5+
public static final int KEYBOARD_KEYCODE_F6+
public static final int KEYBOARD_KEYCODE_F7+
public static final int KEYBOARD_KEYCODE_F8+
public static final int KEYBOARD_KEYCODE_F9+
public static final int KEYBOARD_KEYCODE_F10+
public static final int KEYBOARD_KEYCODE_F11+
public static final int KEYBOARD_KEYCODE_F12+
public static final int KEYBOARD_KEYCODE_NUM_PAD_0+
public static final int KEYBOARD_KEYCODE_NUM_PAD_1+
public static final int KEYBOARD_KEYCODE_NUM_PAD_2+
public static final int KEYBOARD_KEYCODE_NUM_PAD_3+
public static final int KEYBOARD_KEYCODE_NUM_PAD_4+
public static final int KEYBOARD_KEYCODE_NUM_PAD_5+
public static final int KEYBOARD_KEYCODE_NUM_PAD_6+
public static final int KEYBOARD_KEYCODE_NUM_PAD_7+
public static final int KEYBOARD_KEYCODE_NUM_PAD_8+
public static final int KEYBOARD_KEYCODE_NUM_PAD_9+
public static final int KEYBOARD_KEYCODE_NUM_PAD_DOT+
public static final int KEYBOARD_KEYCODE_NUM_PAD_ADD+
public static final int KEYBOARD_KEYCODE_NUM_PAD_DIVIDE+
public static final int KEYBOARD_KEYCODE_NUM_PAD_MULTIPLY+
public static final int KEYBOARD_KEYCODE_NUM_PAD_ENTER+
public static final int KEYBOARD_KEYCODE_NUM_PAD_SUBTRACT+
public static final int KEYBOARD_KEYCODE_NUM_LOCK+
public static final int KEYBOARD_KEYCODE_DEL+
public static final int KEYBOARD_KEYCODE_BACKSPACE+
public static final int KEYBOARD_KEYCODE_TAB+
public static final int KEYBOARD_KEYCODE_CAPS_LOCK+
public static final int KEYBOARD_KEYCODE_SHIFT+
Keyboard.onKeyboard(int, boolean)
to press/release keypublic static final int KEYBOARD_KEYCODE_CTRL+
Keyboard.onKeyboard(int, boolean)
to press/release keypublic static final int KEYBOARD_KEYCODE_ALT+
Keyboard.onKeyboard(int, boolean)
to press/release keypublic static final int KEYBOARD_KEYCODE_ENTER+
public static final int KEYBOARD_KEYCODE_INSERT+
public static final int KEYBOARD_KEYCODE_PAGE_DOWN+
public static final int KEYBOARD_KEYCODE_PAGE_UP+
public static final int KEYBOARD_KEYCODE_END+
public static final int KEYBOARD_KEYCODE_HOME+
public static final int KEYBOARD_KEYCODE_ESCAPE+
public static final int KEYBOARD_KEYCODE_SPACE+
public static final int KEYBOARD_KEYCODE_DPAD_LEFT+
public static final int KEYBOARD_KEYCODE_DPAD_RIGHT+
public static final int KEYBOARD_KEYCODE_DPAD_UP+
public static final int KEYBOARD_KEYCODE_DPAD_DOWN+
Interface | +Description | +
---|---|
PcTouchListener.OnClickListener | +
+ Interface definition for callbacks to be invoked when a view is clicked.
+ |
+
PcTouchListener.OnDoubleClickListener | +
+ Interface definition for callbacks to be invoked when a view is double clicked.
+ |
+
PcZoomHandler.ZoomListener | +
+ Interface definition for callbacks to be invoked when the two-finger pinch zoom status has changed.
+ |
+
TcrRenderView.Observer | +
+ This interface represents the observer of TcrRenderView.
+ |
+
Class | +Description | +
---|---|
MobileTouchListener | +
+ This class implements the touch logic for mobile applications on the cloud machine.
++ It Maps local screen touch events to touch events on the cloud machine. |
+
PcClickListener | +
+ This class implements
+PcTouchListener.OnClickListener . |
+
PcTouchListener | +
+ This class implements the touch logic for PC applications on the cloud machine.
++ It converts local screen touch events to mouse events and recognize the click, long press, and double-click events. |
+
PcZoomHandler | +
+ This class handles the two-finger pinch zoom logic.
+ |
+
TcrRenderView | +
+ This view is used to render and display the cloud streaming video.
+ |
+
WindowsKeyEvent | +
+ This class defines key and button events in Windows platform.
+ |
+
Enum | +Description | +
---|---|
TcrRenderView.InputDeviceType | +
+ An enumeration that defines the input device type.
+ |
+
TcrRenderView.ScaleType | +
+ An enumeration that defines the video scaling type.
+ |
+
TcrRenderView.TcrRenderViewType | +
+ An enumeration that defines the types of the rendering view.
+ |
+
TcrRenderView.VideoRotation | +
+ An enumeration that defines the video rotation angle.
+ |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+ERR_CLOSED |
+102002 |
+
+
+public static final int |
+ERR_CREATE_DIRECTORY_FAILED |
+103003 |
+
+
+public static final int |
+ERR_CREATE_FAILURE |
+102001 |
+
+
+public static final int |
+ERR_DATA_CHANNEL_BASE_CODE |
+102000 |
+
+
+public static final int |
+ERR_EXTRACT_PLUGIN_FAILED |
+103004 |
+
+
+public static final int |
+ERR_INSTALL_PLUGIN_FAILED |
+103005 |
+
+
+public static final int |
+ERR_INTERNAL_ERROR |
+100013 |
+
+
+public static final int |
+ERR_INVALID_PARAMS |
+100011 |
+
+
+public static final int |
+ERR_MULTI_PLAYER_BASE_CODE |
+101000 |
+
+
+public static final int |
+ERR_PLUGIN_DO_NOT_EXIST |
+103001 |
+
+
+public static final int |
+ERR_PLUGIN_MD5_VERIFY_FAILED |
+103002 |
+
+
+public static final int |
+ERR_SDK_STATE_INITIALIZING |
+103006 |
+
+
+public static final int |
+ERR_STATE_ILLEGAL |
+100014 |
+
+
+public static final int |
+ERR_TCRSDK_BASE_CODE |
+103000 |
+
+
+public static final int |
+ERR_TIMEOUT |
+100010 |
+
+
+public static final int |
+ERR_UNKNOWN |
+100012 |
+
+
+public static final int |
+MULTI_PLAYER_ASSIGN_SEAT_FAILED |
+101005 |
+
+
+public static final int |
+MULTI_PLAYER_IGNORED_HOST_SUBMIT |
+101006 |
+
+
+public static final int |
+MULTI_PLAYER_INVALID_SEAT_INDEX |
+101001 |
+
+
+public static final int |
+MULTI_PLAYER_NO_AUTHORIZED |
+101002 |
+
+
+public static final int |
+MULTI_PLAYER_NO_SUCH_ROLE |
+101003 |
+
+
+public static final int |
+MULTI_PLAYER_NO_SUCH_USER |
+101004 |
+
+
+public static final int |
+SESSION_STOP_BASE_CODE |
+104000 |
+
+
+public static final int |
+SUCCESS |
+0 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+CONNECT_FAILED |
+104007 |
+
+
+public static final int |
+RECONNECT_FAILED |
+104006 |
+
+
+public static final int |
+SERVER_DUPLICATE_CONNECT |
+104002 |
+
+
+public static final int |
+SERVER_EXIT |
+104004 |
+
+
+public static final int |
+SERVER_STOP_GAME |
+104003 |
+
+
+public static final int |
+SERVER_UNKNOWN |
+104001 |
+
+
+public static final int |
+STOP_MANUALLY |
+104005 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+MIC_STATUS_DISABLE |
+0 |
+
+
+public static final int |
+MIC_STATUS_OFF |
+1 |
+
+
+public static final int |
+MIC_STATUS_ON |
+2 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final int |
+LONG_PRESS |
+1 |
+
+
+protected static final int |
+SINGLE_CLICK |
+2 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+KEYBOARD_KEYCODE_0 |
+48 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_1 |
+49 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_2 |
+50 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_3 |
+51 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_4 |
+52 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_5 |
+53 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_6 |
+54 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_7 |
+55 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_8 |
+56 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_9 |
+57 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_A |
+65 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_ALT |
+18 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_APOSTROPHE |
+222 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_B |
+66 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_BACKSLASH |
+220 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_BACKSPACE |
+8 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_C |
+67 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_CAPS_LOCK |
+20 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_COMMA |
+188 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_CTRL |
+17 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_D |
+68 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_DEL |
+46 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_DOT |
+190 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_DPAD_DOWN |
+40 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_DPAD_LEFT |
+37 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_DPAD_RIGHT |
+39 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_DPAD_UP |
+38 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_E |
+69 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_END |
+35 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_ENTER |
+13 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_EQUALS |
+187 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_ESCAPE |
+27 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F |
+70 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F1 |
+112 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F10 |
+121 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F11 |
+122 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F12 |
+123 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F2 |
+113 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F3 |
+114 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F4 |
+115 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F5 |
+116 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F6 |
+117 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F7 |
+118 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F8 |
+119 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_F9 |
+120 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_G |
+71 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_GRAV |
+192 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_H |
+72 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_HOME |
+36 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_I |
+73 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_INSERT |
+45 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_J |
+74 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_K |
+75 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_L |
+76 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_LEFT_BRACKET |
+219 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_M |
+77 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_MINUS |
+189 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_N |
+78 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_LOCK |
+144 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_0 |
+96 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_1 |
+97 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_2 |
+98 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_3 |
+99 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_4 |
+100 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_5 |
+101 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_6 |
+102 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_7 |
+103 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_8 |
+104 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_9 |
+105 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_ADD |
+107 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_DIVIDE |
+111 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_DOT |
+110 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_ENTER |
+108 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_MULTIPLY |
+106 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_NUM_PAD_SUBTRACT |
+109 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_O |
+79 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_P |
+80 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_PAGE_DOWN |
+34 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_PAGE_UP |
+33 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_Q |
+81 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_R |
+82 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_RIGHT_BRACKET |
+221 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_S |
+83 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_SEMICOLON |
+186 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_SHIFT |
+16 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_SLASH |
+191 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_SPACE |
+32 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_T |
+84 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_TAB |
+9 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_U |
+85 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_V |
+86 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_W |
+87 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_X |
+88 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_Y |
+89 |
+
+
+public static final int |
+KEYBOARD_KEYCODE_Z |
+90 |
+
+
+public static final int |
+XBOX_KEYCODE_A |
+4096 |
+
+
+public static final int |
+XBOX_KEYCODE_B |
+8192 |
+
+
+public static final int |
+XBOX_KEYCODE_DOWN |
+2 |
+
+
+public static final int |
+XBOX_KEYCODE_L1 |
+256 |
+
+
+public static final int |
+XBOX_KEYCODE_L3 |
+128 |
+
+
+public static final int |
+XBOX_KEYCODE_LEFT |
+4 |
+
+
+public static final int |
+XBOX_KEYCODE_R1 |
+512 |
+
+
+public static final int |
+XBOX_KEYCODE_R3 |
+64 |
+
+
+public static final int |
+XBOX_KEYCODE_RIGHT |
+8 |
+
+
+public static final int |
+XBOX_KEYCODE_SELECT |
+32 |
+
+
+public static final int |
+XBOX_KEYCODE_START |
+16 |
+
+
+public static final int |
+XBOX_KEYCODE_UP |
+1 |
+
+
+public static final int |
+XBOX_KEYCODE_X |
+16384 |
+
+
+public static final int |
+XBOX_KEYCODE_Y |
+32768 |
+
Field and Description | +
---|
com.tencent.tcr.sdk.api.data.RemoteDesktopInfo.mAppWindowLeftOffset | +
com.tencent.tcr.sdk.api.data.RemoteDesktopInfo.mAppWindowTopOffset | +
com.tencent.tcr.sdk.api.data.RemoteDesktopInfo.mScreenHeight | +
com.tencent.tcr.sdk.api.data.RemoteDesktopInfo.mScreenWidth | +
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+TcrSessionConfig
.Observer
interface when it wants to be informed of events
+ in CustomDataChannel objects.VideoFrame.TextureBuffer
VideoFrame.I420Buffer
TcrTestEnv
实例。PcZoomHandler
Keyboard.onKeyboard(int, boolean)
to press/release keyKeyboard.onKeyboard(int, boolean)
to press/release keyKeyboard.onKeyboard(int, boolean)
to press/release keyCustomDataChannel
is connected successfully.CustomDataChannel
.TcrRenderView.setEnableFrameCallback(float)
has
+ been called with scale
greater or equal to 0.CustomDataChannel
receives cloud message.PcTouchListener.OnClickListener
.Activity
is to be destroyed.scale
is greater or equal to 0, the callback (TcrRenderView.Observer.onFrame(Bitmap)
) will be
+ invoked whenever a new video frame has been rendered.userID
` user.PcZoomHandler
.TcrSession.release()
to actively exitTcrSession.Event.STATE_CLOSED
+ + diff --git a/tcrsdk/3.16.0/overview-summary.html b/tcrsdk/3.16.0/overview-summary.html new file mode 100755 index 00000000..57f49039 --- /dev/null +++ b/tcrsdk/3.16.0/overview-summary.html @@ -0,0 +1,147 @@ + + + + + +
Package | +Description | +
---|---|
com.tencent.tcr.sdk.api | ++ |
com.tencent.tcr.sdk.api.data | ++ |
com.tencent.tcr.sdk.api.utils | ++ |
com.tencent.tcr.sdk.api.view | ++ |