@yang__yj/pixelstreaming-core 1.0.0
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/library/dist/lib-pixelstreamingfrontend.esm.js +1 -0
- package/library/dist/lib-pixelstreamingfrontend.js +1 -0
- package/library/types/AFK/AFKController.d.ts +39 -0
- package/library/types/Config/Config.d.ts +217 -0
- package/library/types/Config/SettingBase.d.ts +30 -0
- package/library/types/Config/SettingFlag.d.ts +33 -0
- package/library/types/Config/SettingNumber.d.ts +45 -0
- package/library/types/Config/SettingOption.d.ts +43 -0
- package/library/types/Config/SettingText.d.ts +29 -0
- package/library/types/DataChannel/DataChannelController.d.ts +59 -0
- package/library/types/DataChannel/DataChannelSender.d.ts +21 -0
- package/library/types/DataChannel/InitialSettings.d.ts +44 -0
- package/library/types/DataChannel/LatencyTestResults.d.ts +31 -0
- package/library/types/FreezeFrame/FreezeFrame.d.ts +36 -0
- package/library/types/FreezeFrame/FreezeFrameController.d.ts +37 -0
- package/library/types/Inputs/FakeTouchController.d.ts +61 -0
- package/library/types/Inputs/GamepadController.d.ts +84 -0
- package/library/types/Inputs/GamepadTypes.d.ts +8 -0
- package/library/types/Inputs/HoveringMouseEvents.d.ts +56 -0
- package/library/types/Inputs/IMouseEvents.d.ts +53 -0
- package/library/types/Inputs/ITouchController.d.ts +24 -0
- package/library/types/Inputs/InputClassesFactory.d.ts +54 -0
- package/library/types/Inputs/KeyboardController.d.ts +57 -0
- package/library/types/Inputs/LockedMouseEvents.d.ts +80 -0
- package/library/types/Inputs/MouseButtons.d.ts +22 -0
- package/library/types/Inputs/MouseController.d.ts +75 -0
- package/library/types/Inputs/SpecialKeyCodes.d.ts +14 -0
- package/library/types/Inputs/TouchController.d.ts +53 -0
- package/library/types/Inputs/XRGamepadController.d.ts +15 -0
- package/library/types/Logger/Logger.d.ts +38 -0
- package/library/types/PeerConnectionController/AggregatedStats.d.ts +77 -0
- package/library/types/PeerConnectionController/CandidatePairStats.d.ts +15 -0
- package/library/types/PeerConnectionController/CandidateStat.d.ts +11 -0
- package/library/types/PeerConnectionController/CodecStats.d.ts +14 -0
- package/library/types/PeerConnectionController/DataChannelStats.d.ts +15 -0
- package/library/types/PeerConnectionController/InboundRTPStats.d.ts +141 -0
- package/library/types/PeerConnectionController/InboundTrackStats.d.ts +32 -0
- package/library/types/PeerConnectionController/OutBoundRTPStats.d.ts +23 -0
- package/library/types/PeerConnectionController/PeerConnectionController.d.ts +132 -0
- package/library/types/PeerConnectionController/SessionStats.d.ts +8 -0
- package/library/types/PeerConnectionController/StreamStats.d.ts +9 -0
- package/library/types/PixelStreaming/PixelStreaming.d.ts +234 -0
- package/library/types/UI/OnScreenKeyboard.d.ts +31 -0
- package/library/types/UeInstanceMessage/ResponseController.d.ts +19 -0
- package/library/types/UeInstanceMessage/SendDescriptorController.d.ts +28 -0
- package/library/types/UeInstanceMessage/SendMessageController.d.ts +18 -0
- package/library/types/UeInstanceMessage/StreamMessageController.d.ts +31 -0
- package/library/types/UeInstanceMessage/ToStreamerMessagesController.d.ts +32 -0
- package/library/types/UeInstanceMessage/TwoWayMap.d.ts +32 -0
- package/library/types/Util/CoordinateConverter.d.ts +100 -0
- package/library/types/Util/EventEmitter.d.ts +374 -0
- package/library/types/Util/EventListenerTracker.d.ts +14 -0
- package/library/types/Util/FileUtil.d.ts +32 -0
- package/library/types/Util/WebGLUtils.d.ts +4 -0
- package/library/types/Util/WebXRUtils.d.ts +9 -0
- package/library/types/VideoPlayer/StreamController.d.ts +24 -0
- package/library/types/VideoPlayer/VideoPlayer.d.ts +76 -0
- package/library/types/WebRtcPlayer/WebRtcPlayerController.d.ts +374 -0
- package/library/types/WebSockets/MessageReceive.d.ts +78 -0
- package/library/types/WebSockets/MessageSend.d.ts +98 -0
- package/library/types/WebSockets/SignallingProtocol.d.ts +15 -0
- package/library/types/WebSockets/WebSocketController.d.ts +96 -0
- package/library/types/WebXR/WebXRController.d.ts +26 -0
- package/library/types/pixelstreamingfrontend.d.ts +25 -0
- package/package.json +18 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { FakeTouchController } from './FakeTouchController';
|
|
2
|
+
import { KeyboardController } from './KeyboardController';
|
|
3
|
+
import { MouseController } from './MouseController';
|
|
4
|
+
import { TouchController } from './TouchController';
|
|
5
|
+
import { GamePadController } from './GamepadController';
|
|
6
|
+
import { Config, ControlSchemeType } from '../Config/Config';
|
|
7
|
+
import { CoordinateConverter } from '../Util/CoordinateConverter';
|
|
8
|
+
import { StreamMessageController } from '../UeInstanceMessage/StreamMessageController';
|
|
9
|
+
import { VideoPlayer } from '../VideoPlayer/VideoPlayer';
|
|
10
|
+
/**
|
|
11
|
+
* Class for making and setting up input class types
|
|
12
|
+
*/
|
|
13
|
+
export declare class InputClassesFactory {
|
|
14
|
+
toStreamerMessagesProvider: StreamMessageController;
|
|
15
|
+
videoElementProvider: VideoPlayer;
|
|
16
|
+
coordinateConverter: CoordinateConverter;
|
|
17
|
+
activeKeys: ActiveKeys;
|
|
18
|
+
/**
|
|
19
|
+
* @param toStreamerMessagesProvider - Stream message instance
|
|
20
|
+
* @param videoElementProvider - Video Player instance
|
|
21
|
+
* @param coordinateConverter - A coordinateConverter instance
|
|
22
|
+
*/
|
|
23
|
+
constructor(toStreamerMessagesProvider: StreamMessageController, videoElementProvider: VideoPlayer, coordinateConverter: CoordinateConverter);
|
|
24
|
+
/**
|
|
25
|
+
* Registers browser key events.
|
|
26
|
+
*/
|
|
27
|
+
registerKeyBoard(config: Config): KeyboardController;
|
|
28
|
+
/**
|
|
29
|
+
* register mouse events based on a control type
|
|
30
|
+
* @param controlScheme - if the mouse is either hovering or locked
|
|
31
|
+
*/
|
|
32
|
+
registerMouse(controlScheme: ControlSchemeType): MouseController;
|
|
33
|
+
/**
|
|
34
|
+
* register touch events
|
|
35
|
+
* @param fakeMouseTouch - the faked mouse touch event
|
|
36
|
+
*/
|
|
37
|
+
registerTouch(fakeMouseTouch: boolean, videoElementParentClientRect: DOMRect): FakeTouchController | TouchController;
|
|
38
|
+
/**
|
|
39
|
+
* registers a gamepad
|
|
40
|
+
*/
|
|
41
|
+
registerGamePad(): GamePadController;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* A class that keeps track of current active keys
|
|
45
|
+
*/
|
|
46
|
+
export declare class ActiveKeys {
|
|
47
|
+
activeKeys: Array<number>;
|
|
48
|
+
constructor();
|
|
49
|
+
/**
|
|
50
|
+
* Get the current array of active keys
|
|
51
|
+
* @returns - an array of active keys
|
|
52
|
+
*/
|
|
53
|
+
getActiveKeys(): number[];
|
|
54
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ActiveKeys } from './InputClassesFactory';
|
|
2
|
+
import { StreamMessageController } from '../UeInstanceMessage/StreamMessageController';
|
|
3
|
+
import { Config } from '../Config/Config';
|
|
4
|
+
interface ICodeToKeyCode {
|
|
5
|
+
[key: string]: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Handles the Keyboard Inputs for the document
|
|
9
|
+
*/
|
|
10
|
+
export declare class KeyboardController {
|
|
11
|
+
toStreamerMessagesProvider: StreamMessageController;
|
|
12
|
+
activeKeysProvider: ActiveKeys;
|
|
13
|
+
config: Config;
|
|
14
|
+
private keyboardEventListenerTracker;
|
|
15
|
+
CodeToKeyCode: ICodeToKeyCode;
|
|
16
|
+
/**
|
|
17
|
+
* @param toStreamerMessagesProvider Stream message provider class object
|
|
18
|
+
* @param config The applications configuration. We're interested in the suppress browser keys option
|
|
19
|
+
* @param activeKeysProvider Active keys provider class object
|
|
20
|
+
*/
|
|
21
|
+
constructor(toStreamerMessagesProvider: StreamMessageController, config: Config, activeKeysProvider: ActiveKeys);
|
|
22
|
+
/**
|
|
23
|
+
* Registers document keyboard events with the controller
|
|
24
|
+
*/
|
|
25
|
+
registerKeyBoardEvents(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Unregisters document keyboard events
|
|
28
|
+
*/
|
|
29
|
+
unregisterKeyBoardEvents(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Handles When a key is down
|
|
32
|
+
* @param keyboardEvent - Keyboard event
|
|
33
|
+
*/
|
|
34
|
+
handleOnKeyDown(keyboardEvent: KeyboardEvent): void;
|
|
35
|
+
/**
|
|
36
|
+
* handles when a key is up
|
|
37
|
+
* @param keyboardEvent - Keyboard event
|
|
38
|
+
*/
|
|
39
|
+
handleOnKeyUp(keyboardEvent: KeyboardEvent): void;
|
|
40
|
+
/**
|
|
41
|
+
* Handles when a key is press
|
|
42
|
+
* @param keyboard - Keyboard Event
|
|
43
|
+
*/
|
|
44
|
+
handleOnKeyPress(keyboard: KeyboardEvent): void;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the Keycode of the Key pressed
|
|
47
|
+
* @param keyboardEvent - Key board Event
|
|
48
|
+
* @returns - the key code of the Key
|
|
49
|
+
*/
|
|
50
|
+
getKeycode(keyboardEvent: KeyboardEvent): number;
|
|
51
|
+
/**
|
|
52
|
+
* Browser keys do not have a charCode so we only need to test keyCode.
|
|
53
|
+
* @param keyCode - the browser keycode number
|
|
54
|
+
*/
|
|
55
|
+
isKeyCodeBrowserKey(keyCode: number): boolean;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { MouseController } from './MouseController';
|
|
2
|
+
import { IMouseEvents } from './IMouseEvents';
|
|
3
|
+
import { NormalizedQuantizedUnsignedCoord } from '../Util/CoordinateConverter';
|
|
4
|
+
import { ActiveKeys } from './InputClassesFactory';
|
|
5
|
+
import { VideoPlayer } from '../VideoPlayer/VideoPlayer';
|
|
6
|
+
/**
|
|
7
|
+
* Handle the mouse locked events
|
|
8
|
+
*/
|
|
9
|
+
export declare class LockedMouseEvents implements IMouseEvents {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
coord: NormalizedQuantizedUnsignedCoord;
|
|
13
|
+
videoElementProvider: VideoPlayer;
|
|
14
|
+
mouseController: MouseController;
|
|
15
|
+
activeKeysProvider: ActiveKeys;
|
|
16
|
+
updateMouseMovePositionEvent: (mouseEvent: MouseEvent) => void;
|
|
17
|
+
private mouseEventListenerTracker;
|
|
18
|
+
/**
|
|
19
|
+
* @param videoElementProvider - Video Player instance
|
|
20
|
+
* @param mouseController - Mouse controller instance
|
|
21
|
+
* @param activeKeysProvider - Active keys provider instance
|
|
22
|
+
* @param playerStyleAttributesProvider - Player style attributes instance
|
|
23
|
+
*/
|
|
24
|
+
constructor(videoElementProvider: VideoPlayer, mouseController: MouseController, activeKeysProvider: ActiveKeys);
|
|
25
|
+
/**
|
|
26
|
+
* Unregisters all event handlers
|
|
27
|
+
*/
|
|
28
|
+
unregisterMouseEvents(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Handle when the locked state Changed
|
|
31
|
+
*/
|
|
32
|
+
lockStateChange(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Handle the mouse move event, sends the mouse data to the UE Instance
|
|
35
|
+
* @param mouseEvent - Mouse Event
|
|
36
|
+
*/
|
|
37
|
+
updateMouseMovePosition(mouseEvent: MouseEvent): void;
|
|
38
|
+
/**
|
|
39
|
+
* Handle the mouse Down event, sends the mouse data to the UE Instance
|
|
40
|
+
* @param mouseEvent - Mouse Event
|
|
41
|
+
*/
|
|
42
|
+
handleMouseDown(mouseEvent: MouseEvent): void;
|
|
43
|
+
/**
|
|
44
|
+
* Handle the mouse Up event, sends the mouse data to the UE Instance
|
|
45
|
+
* @param mouseEvent - Mouse Event
|
|
46
|
+
*/
|
|
47
|
+
handleMouseUp(mouseEvent: MouseEvent): void;
|
|
48
|
+
/**
|
|
49
|
+
* Handle the mouse wheel event, sends the mouse wheel data to the UE Instance
|
|
50
|
+
* @param wheelEvent - Mouse Event
|
|
51
|
+
*/
|
|
52
|
+
handleMouseWheel(wheelEvent: WheelEvent): void;
|
|
53
|
+
/**
|
|
54
|
+
* Handle the mouse double click event, sends the mouse data to the UE Instance
|
|
55
|
+
* @param mouseEvent - Mouse Event
|
|
56
|
+
*/
|
|
57
|
+
handleMouseDouble(mouseEvent: MouseEvent): void;
|
|
58
|
+
/**
|
|
59
|
+
* Handle the press mouse buttons event, sends the mouse data to the UE Instance
|
|
60
|
+
* @param mouseEvent - Mouse Event
|
|
61
|
+
*/
|
|
62
|
+
handlePressMouseButtons(mouseEvent: MouseEvent): void;
|
|
63
|
+
/**
|
|
64
|
+
* Handle the release mouse buttons event, sends the mouse data to the UE Instance
|
|
65
|
+
* @param mouseEvent - Mouse Event
|
|
66
|
+
*/
|
|
67
|
+
handleReleaseMouseButtons(mouseEvent: MouseEvent): void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Extra types for Document and WheelEvent
|
|
71
|
+
*/
|
|
72
|
+
declare global {
|
|
73
|
+
interface Document {
|
|
74
|
+
mozPointerLockElement: unknown;
|
|
75
|
+
mozExitPointerLock?(): void;
|
|
76
|
+
}
|
|
77
|
+
interface WheelEvent {
|
|
78
|
+
wheelDelta: number;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mouse Button Data
|
|
3
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button}
|
|
4
|
+
*/
|
|
5
|
+
export declare class MouseButton {
|
|
6
|
+
static mainButton: number;
|
|
7
|
+
static auxiliaryButton: number;
|
|
8
|
+
static secondaryButton: number;
|
|
9
|
+
static fourthButton: number;
|
|
10
|
+
static fifthButton: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Mouse Button Mask Data
|
|
14
|
+
* {@link https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons}
|
|
15
|
+
*/
|
|
16
|
+
export declare class MouseButtonsMask {
|
|
17
|
+
static primaryButton: number;
|
|
18
|
+
static secondaryButton: number;
|
|
19
|
+
static auxiliaryButton: number;
|
|
20
|
+
static fourthButton: number;
|
|
21
|
+
static fifthButton: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { StreamMessageController } from '../UeInstanceMessage/StreamMessageController';
|
|
2
|
+
import { CoordinateConverter } from '../Util/CoordinateConverter';
|
|
3
|
+
import { VideoPlayer } from '../VideoPlayer/VideoPlayer';
|
|
4
|
+
import type { ActiveKeys } from './InputClassesFactory';
|
|
5
|
+
/**
|
|
6
|
+
* Handles the Mouse Inputs for the document
|
|
7
|
+
*/
|
|
8
|
+
export declare class MouseController {
|
|
9
|
+
videoElementProvider: VideoPlayer;
|
|
10
|
+
toStreamerMessagesProvider: StreamMessageController;
|
|
11
|
+
coordinateConverter: CoordinateConverter;
|
|
12
|
+
activeKeysProvider: ActiveKeys;
|
|
13
|
+
private mouseEventListenerTracker;
|
|
14
|
+
/**
|
|
15
|
+
* @param toStreamerMessagesProvider - Stream message instance
|
|
16
|
+
* @param videoElementProvider - Video Player instance
|
|
17
|
+
* @param normalizeAndQuantize - A normalize and quantize instance
|
|
18
|
+
*/
|
|
19
|
+
constructor(toStreamerMessagesProvider: StreamMessageController, videoElementProvider: VideoPlayer, coordinateConverter: CoordinateConverter, activeKeysProvider: ActiveKeys);
|
|
20
|
+
/**
|
|
21
|
+
* Clears all the click events on the current video element parent div
|
|
22
|
+
*/
|
|
23
|
+
unregisterMouseEvents(): void;
|
|
24
|
+
/**
|
|
25
|
+
* Register a locked mouse class
|
|
26
|
+
* @param mouseController - a mouse controller instance
|
|
27
|
+
* @param playerStyleAttributesProvider - a player style attributes instance
|
|
28
|
+
*/
|
|
29
|
+
registerLockedMouseEvents(mouseController: MouseController): void;
|
|
30
|
+
/**
|
|
31
|
+
* Register a hovering mouse class
|
|
32
|
+
* @param mouseController - A mouse controller object
|
|
33
|
+
*/
|
|
34
|
+
registerHoveringMouseEvents(mouseController: MouseController): void;
|
|
35
|
+
/**
|
|
36
|
+
* Set the mouse enter and mouse leave events
|
|
37
|
+
*/
|
|
38
|
+
registerMouseEnterAndLeaveEvents(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Handle when a mouse button is released
|
|
41
|
+
* @param buttons - Mouse Button
|
|
42
|
+
* @param X - Mouse pointer X coordinate
|
|
43
|
+
* @param Y - Mouse pointer Y coordinate
|
|
44
|
+
*/
|
|
45
|
+
releaseMouseButtons(buttons: number, X: number, Y: number): void;
|
|
46
|
+
/**
|
|
47
|
+
* Handle when a mouse button is pressed
|
|
48
|
+
* @param buttons - Mouse Button
|
|
49
|
+
* @param X - Mouse pointer X coordinate
|
|
50
|
+
* @param Y - Mouse pointer Y coordinate
|
|
51
|
+
*/
|
|
52
|
+
pressMouseButtons(buttons: number, X: number, Y: number): void;
|
|
53
|
+
/**
|
|
54
|
+
* Handles mouse enter
|
|
55
|
+
*/
|
|
56
|
+
sendMouseEnter(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Handles mouse Leave
|
|
59
|
+
*/
|
|
60
|
+
sendMouseLeave(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Handles when a mouse button is pressed down
|
|
63
|
+
* @param button - Mouse Button Pressed
|
|
64
|
+
* @param X - Mouse X Coordinate
|
|
65
|
+
* @param Y - Mouse Y Coordinate
|
|
66
|
+
*/
|
|
67
|
+
sendMouseDown(button: number, X: number, Y: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Handles when a mouse button is pressed up
|
|
70
|
+
* @param button - Mouse Button Pressed
|
|
71
|
+
* @param X - Mouse X Coordinate
|
|
72
|
+
* @param Y - Mouse Y Coordinate
|
|
73
|
+
*/
|
|
74
|
+
sendMouseUp(button: number, X: number, Y: number): void;
|
|
75
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers the Special Key codes
|
|
3
|
+
* Must be kept in sync with JavaScriptKeyCodeToFKey C++ array.
|
|
4
|
+
* The index of the entry in the array is the special key code given below.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SpecialKeyCodes {
|
|
7
|
+
static backSpace: number;
|
|
8
|
+
static shift: number;
|
|
9
|
+
static control: number;
|
|
10
|
+
static alt: number;
|
|
11
|
+
static rightShift: number;
|
|
12
|
+
static rightControl: number;
|
|
13
|
+
static rightAlt: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { CoordinateConverter } from '../Util/CoordinateConverter';
|
|
2
|
+
import { StreamMessageController } from '../UeInstanceMessage/StreamMessageController';
|
|
3
|
+
import { VideoPlayer } from '../VideoPlayer/VideoPlayer';
|
|
4
|
+
import { ITouchController } from './ITouchController';
|
|
5
|
+
/**
|
|
6
|
+
* Handles the Touch input Events
|
|
7
|
+
*/
|
|
8
|
+
export declare class TouchController implements ITouchController {
|
|
9
|
+
toStreamerMessagesProvider: StreamMessageController;
|
|
10
|
+
videoElementProvider: VideoPlayer;
|
|
11
|
+
coordinateConverter: CoordinateConverter;
|
|
12
|
+
videoElementParent: HTMLVideoElement;
|
|
13
|
+
fingers: number[];
|
|
14
|
+
fingerIds: Map<any, any>;
|
|
15
|
+
maxByteValue: number;
|
|
16
|
+
private touchEventListenerTracker;
|
|
17
|
+
/**
|
|
18
|
+
* @param toStreamerMessagesProvider - Stream message instance
|
|
19
|
+
* @param videoElementProvider - Video Player instance
|
|
20
|
+
* @param coordinateConverter - A coordinate converter instance
|
|
21
|
+
*/
|
|
22
|
+
constructor(toStreamerMessagesProvider: StreamMessageController, videoElementProvider: VideoPlayer, coordinateConverter: CoordinateConverter);
|
|
23
|
+
/**
|
|
24
|
+
* Unregister all touch events
|
|
25
|
+
*/
|
|
26
|
+
unregisterTouchEvents(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Remember a touch command
|
|
29
|
+
* @param touch - the touch command
|
|
30
|
+
*/
|
|
31
|
+
rememberTouch(touch: Touch): void;
|
|
32
|
+
/**
|
|
33
|
+
* Forgets a touch command
|
|
34
|
+
* @param touch - the touch command
|
|
35
|
+
*/
|
|
36
|
+
forgetTouch(touch: Touch): void;
|
|
37
|
+
/**
|
|
38
|
+
* When a touch event starts
|
|
39
|
+
* @param touchEvent - the touch event being intercepted
|
|
40
|
+
*/
|
|
41
|
+
onTouchStart(touchEvent: TouchEvent): void;
|
|
42
|
+
/**
|
|
43
|
+
* When a touch event ends
|
|
44
|
+
* @param touchEvent - the touch event being intercepted
|
|
45
|
+
*/
|
|
46
|
+
onTouchEnd(touchEvent: TouchEvent): void;
|
|
47
|
+
/**
|
|
48
|
+
* when a moving touch event occurs
|
|
49
|
+
* @param touchEvent - the touch event being intercepted
|
|
50
|
+
*/
|
|
51
|
+
onTouchMove(touchEvent: TouchEvent): void;
|
|
52
|
+
emitTouchData(type: string, touches: TouchList): void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="webxr" />
|
|
2
|
+
import { StreamMessageController } from '../UeInstanceMessage/StreamMessageController';
|
|
3
|
+
import { Controller } from './GamepadTypes';
|
|
4
|
+
/**
|
|
5
|
+
* The class that handles the functionality of xrgamepads and controllers
|
|
6
|
+
*/
|
|
7
|
+
export declare class XRGamepadController {
|
|
8
|
+
controllers: Array<Controller>;
|
|
9
|
+
toStreamerMessagesProvider: StreamMessageController;
|
|
10
|
+
/**
|
|
11
|
+
* @param toStreamerMessagesProvider - Stream message instance
|
|
12
|
+
*/
|
|
13
|
+
constructor(toStreamerMessagesProvider: StreamMessageController);
|
|
14
|
+
updateStatus(source: XRInputSource, frame: XRFrame, refSpace: XRReferenceSpace): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare class Logger {
|
|
2
|
+
static verboseLogLevel: number;
|
|
3
|
+
/**
|
|
4
|
+
* Captures the stack and returns it
|
|
5
|
+
* @returns the current stack
|
|
6
|
+
*/
|
|
7
|
+
static GetStackTrace(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Set the log verbosity level
|
|
10
|
+
*/
|
|
11
|
+
static SetLoggerVerbosity(verboseLogLevel: number): void;
|
|
12
|
+
/**
|
|
13
|
+
* The standard logging output
|
|
14
|
+
* @param stack - the stack trace
|
|
15
|
+
* @param message - the message to be logged
|
|
16
|
+
* @param verbosity - the verbosity level
|
|
17
|
+
*/
|
|
18
|
+
static Log(stack: string, message: string, verbosity?: number): void;
|
|
19
|
+
/**
|
|
20
|
+
* The standard logging output
|
|
21
|
+
* @param stack - the stack trace
|
|
22
|
+
* @param message - the message to be logged
|
|
23
|
+
* @param verbosity - the verbosity level
|
|
24
|
+
*/
|
|
25
|
+
static Info(stack: string, message: string, verbosity?: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* The standard logging output
|
|
28
|
+
* @param stack - the stack trace
|
|
29
|
+
* @param message - the message to be logged
|
|
30
|
+
*/
|
|
31
|
+
static Error(stack: string, message: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* The standard logging output
|
|
34
|
+
* @param stack - the stack trace
|
|
35
|
+
* @param message - the message to be logged
|
|
36
|
+
*/
|
|
37
|
+
static Warning(stack: string, message: string): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { InboundRTPStats, InboundVideoStats, InboundAudioStats } from './InboundRTPStats';
|
|
2
|
+
import { InboundTrackStats } from './InboundTrackStats';
|
|
3
|
+
import { DataChannelStats } from './DataChannelStats';
|
|
4
|
+
import { CandidateStat } from './CandidateStat';
|
|
5
|
+
import { CandidatePairStats } from './CandidatePairStats';
|
|
6
|
+
import { OutBoundRTPStats, OutBoundVideoStats } from './OutBoundRTPStats';
|
|
7
|
+
import { SessionStats } from './SessionStats';
|
|
8
|
+
import { StreamStats } from './StreamStats';
|
|
9
|
+
import { CodecStats } from './CodecStats';
|
|
10
|
+
export declare class AggregatedStats {
|
|
11
|
+
inboundVideoStats: InboundVideoStats;
|
|
12
|
+
inboundAudioStats: InboundAudioStats;
|
|
13
|
+
lastVideoStats: InboundVideoStats;
|
|
14
|
+
lastAudioStats: InboundAudioStats;
|
|
15
|
+
candidatePair: CandidatePairStats;
|
|
16
|
+
DataChannelStats: DataChannelStats;
|
|
17
|
+
localCandidates: Array<CandidateStat>;
|
|
18
|
+
remoteCandidates: Array<CandidateStat>;
|
|
19
|
+
outBoundVideoStats: OutBoundVideoStats;
|
|
20
|
+
sessionStats: SessionStats;
|
|
21
|
+
streamStats: StreamStats;
|
|
22
|
+
codecs: Map<string, string>;
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Gather all the information from the RTC Peer Connection Report
|
|
26
|
+
* @param rtcStatsReport - RTC Stats Report
|
|
27
|
+
*/
|
|
28
|
+
processStats(rtcStatsReport: RTCStatsReport): void;
|
|
29
|
+
/**
|
|
30
|
+
* Process stream stats data from webrtc
|
|
31
|
+
*
|
|
32
|
+
* @param stat - the stats coming in from webrtc
|
|
33
|
+
*/
|
|
34
|
+
handleStream(stat: StreamStats): void;
|
|
35
|
+
/**
|
|
36
|
+
* Process the Ice Candidate Pair Data
|
|
37
|
+
* @param stat - the stats coming in from ice candidates
|
|
38
|
+
*/
|
|
39
|
+
handleCandidatePair(stat: CandidatePairStats): void;
|
|
40
|
+
/**
|
|
41
|
+
* Process the Data Channel Data
|
|
42
|
+
* @param stat - the stats coming in from the data channel
|
|
43
|
+
*/
|
|
44
|
+
handleDataChannel(stat: DataChannelStats): void;
|
|
45
|
+
/**
|
|
46
|
+
* Process the Local Ice Candidate Data
|
|
47
|
+
* @param stat - local stats
|
|
48
|
+
*/
|
|
49
|
+
handleLocalCandidate(stat: CandidateStat): void;
|
|
50
|
+
/**
|
|
51
|
+
* Process the Remote Ice Candidate Data
|
|
52
|
+
* @param stat - ice candidate stats
|
|
53
|
+
*/
|
|
54
|
+
handleRemoteCandidate(stat: CandidateStat): void;
|
|
55
|
+
/**
|
|
56
|
+
* Process the Inbound RTP Audio and Video Data
|
|
57
|
+
* @param stat - inbound rtp stats
|
|
58
|
+
*/
|
|
59
|
+
handleInBoundRTP(stat: InboundRTPStats): void;
|
|
60
|
+
/**
|
|
61
|
+
* Process the outbound RTP Audio and Video Data
|
|
62
|
+
* @param stat - remote outbound stats
|
|
63
|
+
*/
|
|
64
|
+
handleRemoteOutBound(stat: OutBoundRTPStats): void;
|
|
65
|
+
/**
|
|
66
|
+
* Process the Inbound Video Track Data
|
|
67
|
+
* @param stat - video track stats
|
|
68
|
+
*/
|
|
69
|
+
handleTrack(stat: InboundTrackStats): void;
|
|
70
|
+
handleCodec(stat: CodecStats): void;
|
|
71
|
+
handleSessionStatistics(videoStartTime: number, inputController: boolean | null, videoEncoderAvgQP: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* Check if a value coming in from our stats is actually a number
|
|
74
|
+
* @param value - the number to be checked
|
|
75
|
+
*/
|
|
76
|
+
isNumber(value: unknown): boolean;
|
|
77
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ICE Candidate Pair Stats collected from the RTC Stats Report
|
|
3
|
+
*/
|
|
4
|
+
export declare class CandidatePairStats {
|
|
5
|
+
bytesReceived: number;
|
|
6
|
+
bytesSent: number;
|
|
7
|
+
localCandidateId: string;
|
|
8
|
+
remoteCandidateId: string;
|
|
9
|
+
nominated: boolean;
|
|
10
|
+
readable: boolean;
|
|
11
|
+
writable: boolean;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
state: string;
|
|
14
|
+
currentRoundTripTime: number;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codec Stats collected from the RTC Stats Report
|
|
3
|
+
*/
|
|
4
|
+
export declare class CodecStats {
|
|
5
|
+
clockRate: number;
|
|
6
|
+
id: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
payloadType: number;
|
|
9
|
+
sdpFmtpLine: string;
|
|
10
|
+
timestamp: number;
|
|
11
|
+
transportId: string;
|
|
12
|
+
type: string;
|
|
13
|
+
channels: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data Channel Stats collected from the RTC Stats Report
|
|
3
|
+
*/
|
|
4
|
+
export declare class DataChannelStats {
|
|
5
|
+
bytesReceived: number;
|
|
6
|
+
bytesSent: number;
|
|
7
|
+
dataChannelIdentifier: number;
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
messagesReceived: number;
|
|
11
|
+
messagesSent: number;
|
|
12
|
+
protocol: string;
|
|
13
|
+
state: string;
|
|
14
|
+
timestamp: number;
|
|
15
|
+
}
|