armcloud-rtc 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.global.js +4 -4
- package/dist/index.global.js.map +1 -1
- package/dist/types/lib/customRtc.d.ts +1 -0
- package/dist/types/lib/pkg.d.ts +1 -0
- package/dist/types/lib/types/webrtcType.d.ts +69 -0
- package/dist/types/lib/webRtc.d.ts +33 -9
- package/package.json +1 -1
|
@@ -135,6 +135,7 @@ declare class customRtc {
|
|
|
135
135
|
onCheckInputState(): Promise<void>;
|
|
136
136
|
setAutoRecycleTime(second: number): void;
|
|
137
137
|
getAutoRecycleTime(): any;
|
|
138
|
+
triggerKeyboardShortcut(metaState: number | string, keyCode: number | string, forwardOff?: boolean): void;
|
|
138
139
|
sendCommand(command: string, forwardOff?: boolean): void;
|
|
139
140
|
injectVideoStream(type: "startVideoInjection" | "stopVideoInjection", options?: any, timeout?: number, forwardOff?: boolean): Promise<unknown>;
|
|
140
141
|
increaseVolume(forwardOff?: boolean): void;
|
package/dist/types/lib/pkg.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ declare class ArmcloudEngine {
|
|
|
68
68
|
setGPS(longitude: number, latitude: number): void;
|
|
69
69
|
executeAdbCommand(command: string, forwardOff?: boolean): void;
|
|
70
70
|
setKeyboardStyle(keyBoardType: "pad" | "local"): void;
|
|
71
|
+
triggerKeyboardShortcut(metaState: number | string, actionKey: number | string, forwardOff?: boolean): void;
|
|
71
72
|
setAutoRecycleTime(second: number): void;
|
|
72
73
|
getAutoRecycleTime(): any;
|
|
73
74
|
sendCommand(command: string, forwardOff?: boolean): void;
|
|
@@ -6,3 +6,72 @@ export interface TouchInfo {
|
|
|
6
6
|
toolMajor: number;
|
|
7
7
|
toolMinor: number;
|
|
8
8
|
}
|
|
9
|
+
export declare enum MediaType {
|
|
10
|
+
AUDIO = 1,
|
|
11
|
+
VIDEO = 2,
|
|
12
|
+
AUDIO_AND_VIDEO = 3
|
|
13
|
+
}
|
|
14
|
+
export declare enum TouchType {
|
|
15
|
+
GESTURE = "gesture",
|
|
16
|
+
GESTURE_SWIPE = "gestureSwipe",
|
|
17
|
+
EVENT_SDK = "eventSdk",
|
|
18
|
+
KEYSTROKE = "keystroke",
|
|
19
|
+
CLIPBOARD = "clipboard",
|
|
20
|
+
INPUT_BOX = "inputBox",
|
|
21
|
+
INPUT_STATE = "inputState",
|
|
22
|
+
RTC_STATS = "rtcStats",
|
|
23
|
+
KICK_OUT_USER = "kickOutUser",
|
|
24
|
+
EQUIPMENT_INFO = "equipmentInfo",
|
|
25
|
+
APP_UNINSTALL = "appUnInstall"
|
|
26
|
+
}
|
|
27
|
+
export declare enum WebSocketEventType {
|
|
28
|
+
PING = "ping",
|
|
29
|
+
BROADCAST_MSG = "broadcastMsg",
|
|
30
|
+
SPECIFIED_MSG = "specifiedMsg",
|
|
31
|
+
OWN_JOIN_ROOM = "ownJoinRoom"
|
|
32
|
+
}
|
|
33
|
+
export declare enum MessageKey {
|
|
34
|
+
VIDEO_AND_AUDIO_CONTROL = "videoAndAudioControl",
|
|
35
|
+
AUDIO_CONTROL = "audioControl",
|
|
36
|
+
MESSAGE = "message",
|
|
37
|
+
INPUT_ADB = "inputAdb",
|
|
38
|
+
EQUIPMENT_INFO = "equipmentInfo",
|
|
39
|
+
REFRESH_UI_TYPE = "refreshUiType",
|
|
40
|
+
INPUT_STATE = "inputState",
|
|
41
|
+
CLIPBOARD = "clipboard",
|
|
42
|
+
ICE_CANDIDATE = "ice_candidate",
|
|
43
|
+
RE_ANSWER = "re_answer",
|
|
44
|
+
OFFER = "offer",
|
|
45
|
+
RE_OFFER = "re_offer",
|
|
46
|
+
ANSWER = "answer",
|
|
47
|
+
START_INJECTION_VIDEO = "startVideoInjection",
|
|
48
|
+
STOP_INJECTION_VIDEO = "stopVideoInjection",
|
|
49
|
+
INJECTION_VIDEO_STATS = "injectionVideoStats",
|
|
50
|
+
CALL_BACK_EVENT = "callBack"
|
|
51
|
+
}
|
|
52
|
+
export declare enum SdkEventType {
|
|
53
|
+
UPDATE_UI_H5 = "updateUiH5",
|
|
54
|
+
INPUT_ADB = "inputAdb",
|
|
55
|
+
INJECTION_CAMERA = "injectionCamera",
|
|
56
|
+
INJECTION_AUDIO = "injectionAudio",
|
|
57
|
+
DEFINITION_UPDATE = "definitionUpdata",
|
|
58
|
+
KEYBOARD_TYPE = "keyBoardType",
|
|
59
|
+
LOCAL_SCREENSHOT = "localScreenshot",
|
|
60
|
+
SDK_LOCATION = "sdkLocation",
|
|
61
|
+
SDK_SENSOR = "sdkSensor",
|
|
62
|
+
GET_CAMERA_STATE = "cameraState"
|
|
63
|
+
}
|
|
64
|
+
export declare enum SensorType {
|
|
65
|
+
GYROSCOPE = "gyroscope",
|
|
66
|
+
GRAVITY = "gravity",
|
|
67
|
+
ACCELERATION = "acceleration"
|
|
68
|
+
}
|
|
69
|
+
export declare enum MediaOperationType {
|
|
70
|
+
OPEN_AUDIO = "openAudio",
|
|
71
|
+
OPEN_VIDEO = "openVideo",
|
|
72
|
+
OPEN_AUDIO_AND_VIDEO = "openAudioAndVideo"
|
|
73
|
+
}
|
|
74
|
+
export declare enum MediaStreamType {
|
|
75
|
+
VIDEO = "video",
|
|
76
|
+
AUDIO = "audio"
|
|
77
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CustomDefinition } from "./type";
|
|
2
|
+
import { MediaType, MessageKey } from "./types/webrtcType";
|
|
2
3
|
declare class WebRTC {
|
|
3
4
|
private initDomId;
|
|
4
5
|
private initDomWidth;
|
|
@@ -15,8 +16,13 @@ declare class WebRTC {
|
|
|
15
16
|
private isVideoFirstFrame;
|
|
16
17
|
private enableMicrophone;
|
|
17
18
|
private enableCamera;
|
|
19
|
+
private videoDeviceId;
|
|
20
|
+
private audioDeviceId;
|
|
18
21
|
private rotation;
|
|
19
22
|
private errorInfo;
|
|
23
|
+
private isCameraInject;
|
|
24
|
+
private isMicrophoneInject;
|
|
25
|
+
private promiseMap;
|
|
20
26
|
private remoteResolution;
|
|
21
27
|
private roomMessage;
|
|
22
28
|
private options;
|
|
@@ -42,8 +48,12 @@ declare class WebRTC {
|
|
|
42
48
|
};
|
|
43
49
|
private socketParams;
|
|
44
50
|
private callbacks;
|
|
45
|
-
private
|
|
46
|
-
private
|
|
51
|
+
private videoStreams;
|
|
52
|
+
private audioStreams;
|
|
53
|
+
private videoSenders;
|
|
54
|
+
private audioSenders;
|
|
55
|
+
private senderVideoTracks;
|
|
56
|
+
private senderAudioTracks;
|
|
47
57
|
private logTime;
|
|
48
58
|
private isGroupControl;
|
|
49
59
|
private groupRtc;
|
|
@@ -52,11 +62,7 @@ declare class WebRTC {
|
|
|
52
62
|
private stopOperation;
|
|
53
63
|
private videoElement;
|
|
54
64
|
constructor(viewId: string, params: any, callbacks: any, logTime: any);
|
|
55
|
-
private setLogTime;
|
|
56
|
-
private sendEventReport;
|
|
57
|
-
private addReportInfo;
|
|
58
65
|
private decryptAES;
|
|
59
|
-
pauseAudioAndVideoMedia(): void;
|
|
60
66
|
private getMsgTemplate;
|
|
61
67
|
getEquipmentInfo(type: "app" | "attr"): void;
|
|
62
68
|
appUnInstall(pkgNames: Array<string>): void;
|
|
@@ -67,9 +73,20 @@ declare class WebRTC {
|
|
|
67
73
|
hideScreenShot(): void;
|
|
68
74
|
clearScreenShot(): void;
|
|
69
75
|
setViewSize(width: number, height: number, rotateType?: 0 | 1): void;
|
|
70
|
-
private
|
|
76
|
+
private getMediaStream;
|
|
77
|
+
setVideoDeviceId(val: string): Promise<void>;
|
|
78
|
+
setAudioDeviceId(val: string): Promise<void>;
|
|
79
|
+
private captureVideo;
|
|
80
|
+
private captureAudio;
|
|
81
|
+
private stopTracksAndStreams;
|
|
82
|
+
private smoothTrackReplace;
|
|
71
83
|
private startHeartbeat;
|
|
72
|
-
private
|
|
84
|
+
private microphoneInject;
|
|
85
|
+
private cameraInject;
|
|
86
|
+
private startMediaStream;
|
|
87
|
+
private notifyInject;
|
|
88
|
+
private stopMediaStream;
|
|
89
|
+
private setupWebSocket;
|
|
73
90
|
muted(): void;
|
|
74
91
|
unmuted(): void;
|
|
75
92
|
startPlay(): void;
|
|
@@ -83,11 +100,17 @@ declare class WebRTC {
|
|
|
83
100
|
private handleVideoMousemove;
|
|
84
101
|
private handleVideoMouseup;
|
|
85
102
|
start(isGroupControl?: boolean, pads?: any[]): void;
|
|
103
|
+
private setupPeerConnectionEvents;
|
|
104
|
+
private setupDataChannelEvents;
|
|
105
|
+
private setupTouchEvents;
|
|
86
106
|
private sendOffer;
|
|
87
107
|
private receiveOffer;
|
|
108
|
+
getInjectStreamStatus(type: "video" | "camera" | "audio", timeout?: number): Promise<unknown>;
|
|
109
|
+
injectVideoStream(type: MessageKey.START_INJECTION_VIDEO | MessageKey.STOP_INJECTION_VIDEO, options?: any, timeout?: number, forwardOff?: boolean): Promise<unknown>;
|
|
110
|
+
private getCameraState;
|
|
88
111
|
private receiveAnswer;
|
|
112
|
+
private negotiateOffer;
|
|
89
113
|
private sendAnswer;
|
|
90
|
-
private isFirstFrameSuccess;
|
|
91
114
|
private renderedFirstFrame;
|
|
92
115
|
subscribeStream(mediaType: MediaType): Promise<void>;
|
|
93
116
|
executeAdbCommand(command: string): void;
|
|
@@ -105,6 +128,7 @@ declare class WebRTC {
|
|
|
105
128
|
setMicrophone(val: boolean): void;
|
|
106
129
|
setCamera(val: boolean): void;
|
|
107
130
|
private onRoomMessageReceived;
|
|
131
|
+
triggerKeyboardShortcut(metaState: number | string, keyCode: number | string, forwardOff?: boolean): void;
|
|
108
132
|
sendInputClipper(inputStr: string): Promise<void>;
|
|
109
133
|
sendGroupInputClipper(pads: any, strs: any): void;
|
|
110
134
|
sendGroupInputString(pads: any, strs: any): void;
|