@epicgames-ps/lib-pixelstreamingfrontend-ue5.5 0.3.0 → 0.3.2
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/commonjs/AFK/AFKController.js +109 -109
- package/dist/commonjs/Config/Config.js +559 -559
- package/dist/commonjs/Config/SettingBase.js +98 -98
- package/dist/commonjs/Config/SettingFlag.js +49 -49
- package/dist/commonjs/Config/SettingNumber.js +83 -83
- package/dist/commonjs/Config/SettingOption.js +84 -84
- package/dist/commonjs/Config/SettingText.js +42 -42
- package/dist/commonjs/DataChannel/DataChannelController.js +106 -106
- package/dist/commonjs/DataChannel/DataChannelLatencyTestController.js +94 -94
- package/dist/commonjs/DataChannel/DataChannelLatencyTestResults.js +18 -18
- package/dist/commonjs/DataChannel/DataChannelSender.js +43 -43
- package/dist/commonjs/DataChannel/InitialSettings.js +41 -41
- package/dist/commonjs/DataChannel/LatencyTestResults.js +60 -60
- package/dist/commonjs/FreezeFrame/FreezeFrame.js +93 -93
- package/dist/commonjs/FreezeFrame/FreezeFrameController.js +95 -95
- package/dist/commonjs/Inputs/GamepadController.js +188 -188
- package/dist/commonjs/Inputs/GamepadTypes.js +21 -21
- package/dist/commonjs/Inputs/IInputController.js +2 -2
- package/dist/commonjs/Inputs/InputClassesFactory.js +96 -96
- package/dist/commonjs/Inputs/KeyCodes.js +112 -112
- package/dist/commonjs/Inputs/KeyboardController.js +137 -137
- package/dist/commonjs/Inputs/MouseButtons.js +28 -28
- package/dist/commonjs/Inputs/MouseController.js +97 -97
- package/dist/commonjs/Inputs/MouseControllerHovering.js +93 -93
- package/dist/commonjs/Inputs/MouseControllerLocked.js +153 -153
- package/dist/commonjs/Inputs/SpecialKeyCodes.js +19 -19
- package/dist/commonjs/Inputs/TouchController.js +123 -123
- package/dist/commonjs/Inputs/TouchController.js.map +1 -1
- package/dist/commonjs/Inputs/TouchControllerFake.js +91 -91
- package/dist/commonjs/Inputs/XRGamepadController.js +124 -124
- package/dist/commonjs/PeerConnectionController/AggregatedStats.js +252 -252
- package/dist/commonjs/PeerConnectionController/CandidatePairStats.js +10 -10
- package/dist/commonjs/PeerConnectionController/CandidateStat.js +10 -10
- package/dist/commonjs/PeerConnectionController/CodecStats.js +10 -10
- package/dist/commonjs/PeerConnectionController/DataChannelStats.js +10 -10
- package/dist/commonjs/PeerConnectionController/InboundRTPStats.js +22 -22
- package/dist/commonjs/PeerConnectionController/InboundTrackStats.js +10 -10
- package/dist/commonjs/PeerConnectionController/OutBoundRTPStats.js +16 -16
- package/dist/commonjs/PeerConnectionController/PeerConnectionController.js +584 -584
- package/dist/commonjs/PeerConnectionController/SessionStats.js +10 -10
- package/dist/commonjs/PeerConnectionController/StreamStats.js +10 -10
- package/dist/commonjs/PixelStreaming/PixelStreaming.js +607 -607
- package/dist/commonjs/UI/OnScreenKeyboard.js +82 -82
- package/dist/commonjs/UeInstanceMessage/ResponseController.js +38 -38
- package/dist/commonjs/UeInstanceMessage/SendMessageController.js +120 -120
- package/dist/commonjs/UeInstanceMessage/StreamMessageController.js +210 -210
- package/dist/commonjs/UeInstanceMessage/ToStreamerMessagesController.js +49 -49
- package/dist/commonjs/Util/EventEmitter.js +386 -386
- package/dist/commonjs/Util/FileUtil.js +108 -108
- package/dist/commonjs/Util/IURLSearchParams.js +25 -25
- package/dist/commonjs/Util/InputCoordTranslator.js +49 -49
- package/dist/commonjs/Util/RTCUtils.js +40 -40
- package/dist/commonjs/VideoPlayer/StreamController.js +67 -67
- package/dist/commonjs/VideoPlayer/VideoPlayer.js +177 -177
- package/dist/commonjs/WebRtcPlayer/WebRtcPlayerController.js +1221 -1221
- package/dist/commonjs/WebXR/WebXRController.js +335 -335
- package/dist/commonjs/pixelstreamingfrontend.js +70 -70
- package/dist/esm/AFK/AFKController.js +105 -105
- package/dist/esm/Config/Config.js +551 -551
- package/dist/esm/Config/SettingBase.js +94 -94
- package/dist/esm/Config/SettingFlag.js +45 -45
- package/dist/esm/Config/SettingNumber.js +79 -79
- package/dist/esm/Config/SettingOption.js +80 -80
- package/dist/esm/Config/SettingText.js +38 -38
- package/dist/esm/DataChannel/DataChannelController.js +102 -102
- package/dist/esm/DataChannel/DataChannelLatencyTestController.js +90 -90
- package/dist/esm/DataChannel/DataChannelLatencyTestResults.js +14 -14
- package/dist/esm/DataChannel/DataChannelSender.js +39 -39
- package/dist/esm/DataChannel/InitialSettings.js +34 -34
- package/dist/esm/DataChannel/LatencyTestResults.js +56 -56
- package/dist/esm/FreezeFrame/FreezeFrame.js +89 -89
- package/dist/esm/FreezeFrame/FreezeFrameController.js +91 -91
- package/dist/esm/Inputs/GamepadController.js +184 -184
- package/dist/esm/Inputs/GamepadTypes.js +17 -17
- package/dist/esm/Inputs/IInputController.js +1 -1
- package/dist/esm/Inputs/InputClassesFactory.js +91 -91
- package/dist/esm/Inputs/KeyCodes.js +109 -109
- package/dist/esm/Inputs/KeyboardController.js +133 -133
- package/dist/esm/Inputs/MouseButtons.js +23 -23
- package/dist/esm/Inputs/MouseController.js +93 -93
- package/dist/esm/Inputs/MouseControllerHovering.js +89 -89
- package/dist/esm/Inputs/MouseControllerLocked.js +149 -149
- package/dist/esm/Inputs/SpecialKeyCodes.js +15 -15
- package/dist/esm/Inputs/TouchController.js +119 -119
- package/dist/esm/Inputs/TouchController.js.map +1 -1
- package/dist/esm/Inputs/TouchControllerFake.js +87 -87
- package/dist/esm/Inputs/XRGamepadController.js +120 -120
- package/dist/esm/PeerConnectionController/AggregatedStats.js +248 -248
- package/dist/esm/PeerConnectionController/CandidatePairStats.js +6 -6
- package/dist/esm/PeerConnectionController/CandidateStat.js +6 -6
- package/dist/esm/PeerConnectionController/CodecStats.js +6 -6
- package/dist/esm/PeerConnectionController/DataChannelStats.js +6 -6
- package/dist/esm/PeerConnectionController/InboundRTPStats.js +16 -16
- package/dist/esm/PeerConnectionController/InboundTrackStats.js +6 -6
- package/dist/esm/PeerConnectionController/OutBoundRTPStats.js +11 -11
- package/dist/esm/PeerConnectionController/PeerConnectionController.js +580 -580
- package/dist/esm/PeerConnectionController/SessionStats.js +6 -6
- package/dist/esm/PeerConnectionController/StreamStats.js +6 -6
- package/dist/esm/PixelStreaming/PixelStreaming.js +603 -603
- package/dist/esm/UI/OnScreenKeyboard.js +78 -78
- package/dist/esm/UeInstanceMessage/ResponseController.js +34 -34
- package/dist/esm/UeInstanceMessage/SendMessageController.js +116 -116
- package/dist/esm/UeInstanceMessage/StreamMessageController.js +205 -205
- package/dist/esm/UeInstanceMessage/ToStreamerMessagesController.js +45 -45
- package/dist/esm/Util/EventEmitter.js +345 -345
- package/dist/esm/Util/FileUtil.js +103 -103
- package/dist/esm/Util/IURLSearchParams.js +21 -21
- package/dist/esm/Util/InputCoordTranslator.js +45 -45
- package/dist/esm/Util/RTCUtils.js +36 -36
- package/dist/esm/VideoPlayer/StreamController.js +63 -63
- package/dist/esm/VideoPlayer/VideoPlayer.js +173 -173
- package/dist/esm/WebRtcPlayer/WebRtcPlayerController.js +1217 -1217
- package/dist/esm/WebXR/WebXRController.js +331 -331
- package/dist/esm/pixelstreamingfrontend.js +24 -24
- package/dist/types/AFK/AFKController.d.ts +38 -38
- package/dist/types/Config/Config.d.ts +220 -220
- package/dist/types/Config/SettingBase.d.ts +43 -43
- package/dist/types/Config/SettingFlag.d.ts +24 -24
- package/dist/types/Config/SettingNumber.d.ts +41 -41
- package/dist/types/Config/SettingOption.d.ts +41 -41
- package/dist/types/Config/SettingText.d.ts +21 -21
- package/dist/types/DataChannel/DataChannelController.d.ts +59 -59
- package/dist/types/DataChannel/DataChannelLatencyTestController.d.ts +25 -25
- package/dist/types/DataChannel/DataChannelLatencyTestResults.d.ts +46 -46
- package/dist/types/DataChannel/DataChannelSender.d.ts +21 -21
- package/dist/types/DataChannel/InitialSettings.d.ts +44 -44
- package/dist/types/DataChannel/LatencyTestResults.d.ts +31 -31
- package/dist/types/FreezeFrame/FreezeFrame.d.ts +36 -36
- package/dist/types/FreezeFrame/FreezeFrameController.d.ts +37 -37
- package/dist/types/Inputs/GamepadController.d.ts +61 -61
- package/dist/types/Inputs/GamepadTypes.d.ts +15 -15
- package/dist/types/Inputs/IInputController.d.ts +16 -16
- package/dist/types/Inputs/InputClassesFactory.d.ts +53 -53
- package/dist/types/Inputs/KeyCodes.d.ts +5 -5
- package/dist/types/Inputs/KeyboardController.d.ts +34 -34
- package/dist/types/Inputs/MouseButtons.d.ts +22 -22
- package/dist/types/Inputs/MouseController.d.ts +40 -40
- package/dist/types/Inputs/MouseControllerHovering.d.ts +26 -26
- package/dist/types/Inputs/MouseControllerLocked.d.ts +31 -31
- package/dist/types/Inputs/SpecialKeyCodes.d.ts +14 -14
- package/dist/types/Inputs/TouchController.d.ts +28 -28
- package/dist/types/Inputs/TouchControllerFake.d.ts +29 -29
- package/dist/types/Inputs/XRGamepadController.d.ts +15 -15
- package/dist/types/PeerConnectionController/AggregatedStats.d.ts +82 -82
- package/dist/types/PeerConnectionController/CandidatePairStats.d.ts +22 -22
- package/dist/types/PeerConnectionController/CandidateStat.d.ts +13 -13
- package/dist/types/PeerConnectionController/CodecStats.d.ts +14 -14
- package/dist/types/PeerConnectionController/DataChannelStats.d.ts +15 -15
- package/dist/types/PeerConnectionController/InboundRTPStats.d.ts +141 -141
- package/dist/types/PeerConnectionController/InboundTrackStats.d.ts +32 -32
- package/dist/types/PeerConnectionController/OutBoundRTPStats.d.ts +23 -23
- package/dist/types/PeerConnectionController/PeerConnectionController.d.ts +143 -143
- package/dist/types/PeerConnectionController/SessionStats.d.ts +8 -8
- package/dist/types/PeerConnectionController/StreamStats.d.ts +9 -9
- package/dist/types/PixelStreaming/PixelStreaming.d.ts +271 -271
- package/dist/types/UI/OnScreenKeyboard.d.ts +30 -30
- package/dist/types/UeInstanceMessage/ResponseController.d.ts +19 -19
- package/dist/types/UeInstanceMessage/SendMessageController.d.ts +18 -18
- package/dist/types/UeInstanceMessage/StreamMessageController.d.ts +29 -29
- package/dist/types/UeInstanceMessage/ToStreamerMessagesController.d.ts +32 -32
- package/dist/types/Util/EventEmitter.d.ts +429 -429
- package/dist/types/Util/FileUtil.d.ts +32 -32
- package/dist/types/Util/IURLSearchParams.d.ts +9 -9
- package/dist/types/Util/InputCoordTranslator.d.ts +29 -29
- package/dist/types/Util/RTCUtils.d.ts +8 -8
- package/dist/types/VideoPlayer/StreamController.d.ts +22 -22
- package/dist/types/VideoPlayer/VideoPlayer.d.ts +78 -78
- package/dist/types/WebRtcPlayer/WebRtcPlayerController.d.ts +379 -379
- package/dist/types/WebXR/WebXRController.d.ts +42 -42
- package/dist/types/pixelstreamingfrontend.d.ts +23 -23
- package/package.json +45 -45
- package/src/Inputs/TouchController.ts +3 -3
|
@@ -1,379 +1,379 @@
|
|
|
1
|
-
import { SignallingProtocol, ITransport, Messages } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5';
|
|
2
|
-
import { StreamController } from '../VideoPlayer/StreamController';
|
|
3
|
-
import { FreezeFrameController } from '../FreezeFrame/FreezeFrameController';
|
|
4
|
-
import { AFKController } from '../AFK/AFKController';
|
|
5
|
-
import { DataChannelController } from '../DataChannel/DataChannelController';
|
|
6
|
-
import { PeerConnectionController } from '../PeerConnectionController/PeerConnectionController';
|
|
7
|
-
import { AggregatedStats } from '../PeerConnectionController/AggregatedStats';
|
|
8
|
-
import { Config } from '../Config/Config';
|
|
9
|
-
import { FileTemplate } from '../Util/FileUtil';
|
|
10
|
-
import { InputClassesFactory } from '../Inputs/InputClassesFactory';
|
|
11
|
-
import { VideoPlayer } from '../VideoPlayer/VideoPlayer';
|
|
12
|
-
import { StreamMessageController, MessageDirection } from '../UeInstanceMessage/StreamMessageController';
|
|
13
|
-
import { ResponseController } from '../UeInstanceMessage/ResponseController';
|
|
14
|
-
import { SendMessageController } from '../UeInstanceMessage/SendMessageController';
|
|
15
|
-
import { ToStreamerMessagesController } from '../UeInstanceMessage/ToStreamerMessagesController';
|
|
16
|
-
import { DataChannelSender } from '../DataChannel/DataChannelSender';
|
|
17
|
-
import { InputCoordTranslator, UntranslatedCoordUnsigned } from '../Util/InputCoordTranslator';
|
|
18
|
-
import { PixelStreaming } from '../PixelStreaming/PixelStreaming';
|
|
19
|
-
import { DataChannelLatencyTestRequest } from '../DataChannel/DataChannelLatencyTestResults';
|
|
20
|
-
import { IInputController } from '../Inputs/IInputController';
|
|
21
|
-
import { GamepadController } from '../Inputs/GamepadController';
|
|
22
|
-
/**
|
|
23
|
-
* Entry point for the WebRTC Player
|
|
24
|
-
*/
|
|
25
|
-
export declare class WebRtcPlayerController {
|
|
26
|
-
config: Config;
|
|
27
|
-
responseController: ResponseController;
|
|
28
|
-
sdpConstraints: RTCOfferOptions;
|
|
29
|
-
transport: ITransport;
|
|
30
|
-
protocol: SignallingProtocol;
|
|
31
|
-
sendrecvDataChannelController: DataChannelController;
|
|
32
|
-
recvDataChannelController: DataChannelController;
|
|
33
|
-
dataChannelSender: DataChannelSender;
|
|
34
|
-
datachannelOptions: RTCDataChannelInit;
|
|
35
|
-
videoPlayer: VideoPlayer;
|
|
36
|
-
streamController: StreamController;
|
|
37
|
-
peerConnectionController: PeerConnectionController;
|
|
38
|
-
inputClassesFactory: InputClassesFactory;
|
|
39
|
-
freezeFrameController: FreezeFrameController;
|
|
40
|
-
shouldShowPlayOverlay: boolean;
|
|
41
|
-
afkController: AFKController;
|
|
42
|
-
latencyStartTime: number;
|
|
43
|
-
pixelStreaming: PixelStreaming;
|
|
44
|
-
streamMessageController: StreamMessageController;
|
|
45
|
-
sendMessageController: SendMessageController;
|
|
46
|
-
toStreamerMessagesController: ToStreamerMessagesController;
|
|
47
|
-
keyboardController: IInputController;
|
|
48
|
-
mouseController: IInputController;
|
|
49
|
-
touchController: IInputController;
|
|
50
|
-
gamePadController: GamepadController;
|
|
51
|
-
coordinateConverter: InputCoordTranslator;
|
|
52
|
-
isUsingSFU: boolean;
|
|
53
|
-
isQualityController: boolean;
|
|
54
|
-
statsTimerHandle: number;
|
|
55
|
-
file: FileTemplate;
|
|
56
|
-
preferredCodec: string;
|
|
57
|
-
peerConfig: RTCConfiguration;
|
|
58
|
-
videoAvgQp: number;
|
|
59
|
-
locallyClosed: boolean;
|
|
60
|
-
enableAutoReconnect: boolean;
|
|
61
|
-
forceReconnect: boolean;
|
|
62
|
-
reconnectAttempt: number;
|
|
63
|
-
isReconnecting: boolean;
|
|
64
|
-
disconnectMessage: string;
|
|
65
|
-
subscribedStream: string;
|
|
66
|
-
signallingUrlBuilder: () => string;
|
|
67
|
-
autoJoinTimer: ReturnType<typeof setTimeout>;
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* @param config - the frontend config object
|
|
71
|
-
* @param pixelStreaming - the PixelStreaming object
|
|
72
|
-
*/
|
|
73
|
-
constructor(config: Config, pixelStreaming: PixelStreaming);
|
|
74
|
-
/**
|
|
75
|
-
* Make a request to UnquantizedAndDenormalizeUnsigned coordinates
|
|
76
|
-
* @param x x axis coordinate
|
|
77
|
-
* @param y y axis coordinate
|
|
78
|
-
*/
|
|
79
|
-
requestUnquantizedAndDenormalizeUnsigned(x: number, y: number): UntranslatedCoordUnsigned;
|
|
80
|
-
/**
|
|
81
|
-
* Handles when a message is received
|
|
82
|
-
* @param event - Message Event
|
|
83
|
-
*/
|
|
84
|
-
handleOnMessage(event: MessageEvent): void;
|
|
85
|
-
/**
|
|
86
|
-
* Register message all handlers
|
|
87
|
-
*/
|
|
88
|
-
registerMessageHandlers(): void;
|
|
89
|
-
/**
|
|
90
|
-
* Activate the logic associated with a command from UE
|
|
91
|
-
* @param message
|
|
92
|
-
*/
|
|
93
|
-
onCommand(message: ArrayBuffer): void;
|
|
94
|
-
/**
|
|
95
|
-
* Handles a protocol message received from the streamer
|
|
96
|
-
* @param message the message data from the streamer
|
|
97
|
-
*/
|
|
98
|
-
onProtocolMessage(message: ArrayBuffer): void;
|
|
99
|
-
/**
|
|
100
|
-
* Handles an input control message when it is received from the streamer
|
|
101
|
-
* @param message The input control message
|
|
102
|
-
*/
|
|
103
|
-
onInputControlOwnership(message: ArrayBuffer): void;
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* @param message
|
|
107
|
-
*/
|
|
108
|
-
onGamepadResponse(message: ArrayBuffer): void;
|
|
109
|
-
onAfkTriggered(): void;
|
|
110
|
-
/**
|
|
111
|
-
* Set whether we should timeout when afk.
|
|
112
|
-
* @param afkEnabled If true we timeout when idle for some given amount of time.
|
|
113
|
-
*/
|
|
114
|
-
setAfkEnabled(afkEnabled: boolean): void;
|
|
115
|
-
/**
|
|
116
|
-
* Attempt a reconnection to the signalling server. Manual trigger
|
|
117
|
-
*/
|
|
118
|
-
tryReconnect(message: string): void;
|
|
119
|
-
/**
|
|
120
|
-
* Does the actual reconnect work. Used by the auto reconnect feature to skip the manual flag.
|
|
121
|
-
*/
|
|
122
|
-
doReconnect(message: string): void;
|
|
123
|
-
/**
|
|
124
|
-
* Loads a freeze frame if it is required otherwise shows the play overlay
|
|
125
|
-
*/
|
|
126
|
-
loadFreezeFrameOrShowPlayOverlay(): void;
|
|
127
|
-
/**
|
|
128
|
-
* Process the freeze frame and load it
|
|
129
|
-
* @param message The freeze frame data in bytes
|
|
130
|
-
*/
|
|
131
|
-
onFreezeFrameMessage(message: ArrayBuffer): void;
|
|
132
|
-
/**
|
|
133
|
-
* Enable the video after hiding a freeze frame
|
|
134
|
-
*/
|
|
135
|
-
invalidateFreezeFrameAndEnableVideo(): void;
|
|
136
|
-
/**
|
|
137
|
-
* Prep datachannel data for processing file extension
|
|
138
|
-
* @param data the file extension data
|
|
139
|
-
*/
|
|
140
|
-
onFileExtension(data: ArrayBuffer): void;
|
|
141
|
-
/**
|
|
142
|
-
* Prep datachannel data for processing the file mime type
|
|
143
|
-
* @param data the file mime type data
|
|
144
|
-
*/
|
|
145
|
-
onFileMimeType(data: ArrayBuffer): void;
|
|
146
|
-
/**
|
|
147
|
-
* Prep datachannel data for processing the file contents
|
|
148
|
-
* @param data the file contents data
|
|
149
|
-
*/
|
|
150
|
-
onFileContents(data: ArrayBuffer): void;
|
|
151
|
-
/**
|
|
152
|
-
* Plays the stream audio and video source and sets up other pieces while the stream starts
|
|
153
|
-
*/
|
|
154
|
-
playStream(): void;
|
|
155
|
-
/**
|
|
156
|
-
* Plays the video stream
|
|
157
|
-
*/
|
|
158
|
-
private playVideo;
|
|
159
|
-
/**
|
|
160
|
-
* Enable the video to play automatically if enableAutoplay is true
|
|
161
|
-
*/
|
|
162
|
-
autoPlayVideoOrSetUpPlayOverlay(): void;
|
|
163
|
-
/**
|
|
164
|
-
* Connect to the Signaling server
|
|
165
|
-
*/
|
|
166
|
-
connectToSignallingServer(): void;
|
|
167
|
-
/**
|
|
168
|
-
* This will start the handshake to the signalling server
|
|
169
|
-
* @param peerConfig - RTC Configuration Options from the Signaling server
|
|
170
|
-
* @remark RTC Peer Connection on Ice Candidate event have it handled by handle Send Ice Candidate
|
|
171
|
-
*/
|
|
172
|
-
startSession(peerConfig: RTCConfiguration): void;
|
|
173
|
-
/**
|
|
174
|
-
* Checks the peer connection options for a turn server and returns true or false
|
|
175
|
-
*/
|
|
176
|
-
checkTurnServerAvailability(options: RTCConfiguration): boolean;
|
|
177
|
-
/**
|
|
178
|
-
* Handles when a Config Message is received contains the Peer Connection Options required (STUN and TURN Server Info)
|
|
179
|
-
* @param messageConfig - Config Message received from the signaling server
|
|
180
|
-
*/
|
|
181
|
-
handleOnConfigMessage(messageConfig: Messages.config): void;
|
|
182
|
-
/**
|
|
183
|
-
* Handles when the signalling server gives us the list of streamer ids.
|
|
184
|
-
*/
|
|
185
|
-
handleStreamerListMessage(messageStreamerList: Messages.streamerList): void;
|
|
186
|
-
handleStreamerIDChangedMessage(streamerIDChangedMessage: Messages.streamerIdChanged): void;
|
|
187
|
-
/**
|
|
188
|
-
* Handle the RTC Answer from the signaling server
|
|
189
|
-
* @param Answer - Answer SDP from the peer.
|
|
190
|
-
*/
|
|
191
|
-
handleWebRtcAnswer(Answer: Messages.answer): void;
|
|
192
|
-
/**
|
|
193
|
-
* Handle the RTC offer from a WebRTC peer (received through the signalling server).
|
|
194
|
-
* @param Offer - Offer SDP from the peer.
|
|
195
|
-
*/
|
|
196
|
-
handleWebRtcOffer(Offer: Messages.offer): void;
|
|
197
|
-
/**
|
|
198
|
-
* Handle when the SFU provides the peer with its data channels
|
|
199
|
-
* @param DataChannels - The message from the SFU containing the data channels ids
|
|
200
|
-
*/
|
|
201
|
-
handleWebRtcSFUPeerDatachannels(DataChannels: Messages.peerDataChannels): void;
|
|
202
|
-
handlePostWebrtcNegotiation(): void;
|
|
203
|
-
/**
|
|
204
|
-
* When an ice Candidate is received from the Signaling server add it to the Peer Connection Client
|
|
205
|
-
* @param iceCandidate - Ice Candidate from Server
|
|
206
|
-
*/
|
|
207
|
-
handleIceCandidate(iceCandidate: RTCIceCandidateInit): void;
|
|
208
|
-
/**
|
|
209
|
-
* Send the ice Candidate to the signaling server via websocket
|
|
210
|
-
* @param iceEvent - RTC Peer ConnectionIceEvent) {
|
|
211
|
-
*/
|
|
212
|
-
handleSendIceCandidate(iceEvent: RTCPeerConnectionIceEvent): void;
|
|
213
|
-
/**
|
|
214
|
-
* Send the ice Candidate to the signaling server via websocket
|
|
215
|
-
* @param iceEvent - RTC Peer ConnectionIceEvent) {
|
|
216
|
-
*/
|
|
217
|
-
handleDataChannel(datachannelEvent: RTCDataChannelEvent): void;
|
|
218
|
-
/**
|
|
219
|
-
* Send the RTC Offer Session to the Signaling server via websocket
|
|
220
|
-
* @param offer - RTC Session Description
|
|
221
|
-
*/
|
|
222
|
-
handleSendWebRTCOffer(offer: RTCSessionDescriptionInit): void;
|
|
223
|
-
/**
|
|
224
|
-
* Send the RTC Offer Session to the Signaling server via websocket
|
|
225
|
-
* @param answer - RTC Session Description
|
|
226
|
-
*/
|
|
227
|
-
handleSendWebRTCAnswer(answer: RTCSessionDescriptionInit): void;
|
|
228
|
-
/**
|
|
229
|
-
* Set the freeze frame overlay to the player div
|
|
230
|
-
*/
|
|
231
|
-
setUpMouseAndFreezeFrame(): void;
|
|
232
|
-
/**
|
|
233
|
-
* Close the Connection to the signaling server
|
|
234
|
-
*/
|
|
235
|
-
closeSignalingServer(message: string, allowReconnect: boolean): void;
|
|
236
|
-
/**
|
|
237
|
-
* Close the peer connection
|
|
238
|
-
*/
|
|
239
|
-
closePeerConnection(): void;
|
|
240
|
-
/**
|
|
241
|
-
* Close all connections
|
|
242
|
-
*/
|
|
243
|
-
close(): void;
|
|
244
|
-
/**
|
|
245
|
-
* Fires a Video Stats Event in the RTC Peer Connection
|
|
246
|
-
*/
|
|
247
|
-
getStats(): void;
|
|
248
|
-
/**
|
|
249
|
-
* Send a Latency Test Request to the UE Instance
|
|
250
|
-
*/
|
|
251
|
-
sendLatencyTest(): void;
|
|
252
|
-
/**
|
|
253
|
-
* Send a Data Channel Latency Test Request to the UE Instance
|
|
254
|
-
*/
|
|
255
|
-
sendDataChannelLatencyTest(descriptor: DataChannelLatencyTestRequest): void;
|
|
256
|
-
/**
|
|
257
|
-
* Send the MinQP encoder setting to the UE Instance.
|
|
258
|
-
* @param minQP - The lower bound for QP when encoding
|
|
259
|
-
* valid values are (1-51) where:
|
|
260
|
-
* 1 = Best quality but highest bitrate.
|
|
261
|
-
* 51 = Worst quality but lowest bitrate.
|
|
262
|
-
* By default the minQP is 1 meaning the encoder is free
|
|
263
|
-
* to aim for the best quality it can on the given network link.
|
|
264
|
-
*/
|
|
265
|
-
sendEncoderMinQP(minQP: number): void;
|
|
266
|
-
/**
|
|
267
|
-
* Send the MaxQP encoder setting to the UE Instance.
|
|
268
|
-
* @param maxQP - The upper bound for QP when encoding
|
|
269
|
-
* valid values are (1-51) where:
|
|
270
|
-
* 1 = Best quality but highest bitrate.
|
|
271
|
-
* 51 = Worst quality but lowest bitrate.
|
|
272
|
-
* By default the maxQP is 51 meaning the encoder is free
|
|
273
|
-
* to drop quality as low as needed on the given network link.
|
|
274
|
-
*/
|
|
275
|
-
sendEncoderMaxQP(maxQP: number): void;
|
|
276
|
-
/**
|
|
277
|
-
* Send the { WebRTC.MinBitrate: SomeNumber }} command to UE to set
|
|
278
|
-
* the minimum bitrate that we allow WebRTC to use
|
|
279
|
-
* (note setting this too high in poor networks can be problematic).
|
|
280
|
-
* @param minBitrate - The minimum bitrate we would like WebRTC to not fall below.
|
|
281
|
-
*/
|
|
282
|
-
sendWebRTCMinBitrate(minBitrate: number): void;
|
|
283
|
-
/**
|
|
284
|
-
* Send the { WebRTC.MaxBitrate: SomeNumber }} command to UE to set
|
|
285
|
-
* the minimum bitrate that we allow WebRTC to use
|
|
286
|
-
* (note setting this too low could result in blocky video).
|
|
287
|
-
* @param minBitrate - The minimum bitrate we would like WebRTC to not fall below.
|
|
288
|
-
*/
|
|
289
|
-
sendWebRTCMaxBitrate(maxBitrate: number): void;
|
|
290
|
-
/**
|
|
291
|
-
* Send the { WebRTC.Fps: SomeNumber }} UE 5.0+
|
|
292
|
-
* and { WebRTC.MaxFps } UE 4.27 command to set
|
|
293
|
-
* the maximum fps we would like WebRTC to stream at.
|
|
294
|
-
* @param fps - The maximum stream fps.
|
|
295
|
-
*/
|
|
296
|
-
sendWebRTCFps(fps: number): void;
|
|
297
|
-
/**
|
|
298
|
-
* Sends the UI Descriptor `stat fps` to the UE Instance
|
|
299
|
-
*/
|
|
300
|
-
sendShowFps(): void;
|
|
301
|
-
/**
|
|
302
|
-
* Send an Iframe request to the streamer
|
|
303
|
-
*/
|
|
304
|
-
sendIframeRequest(): void;
|
|
305
|
-
/**
|
|
306
|
-
* Send a UIInteraction message
|
|
307
|
-
*/
|
|
308
|
-
emitUIInteraction(descriptor: object | string): void;
|
|
309
|
-
/**
|
|
310
|
-
* Send a Command message
|
|
311
|
-
*/
|
|
312
|
-
emitCommand(descriptor: object): void;
|
|
313
|
-
/**
|
|
314
|
-
* Send a console command message
|
|
315
|
-
*/
|
|
316
|
-
emitConsoleCommand(command: string): void;
|
|
317
|
-
/**
|
|
318
|
-
* Sends a request to the UE Instance to have ownership of Quality
|
|
319
|
-
*/
|
|
320
|
-
sendRequestQualityControlOwnership(): void;
|
|
321
|
-
/**
|
|
322
|
-
* Handles when a Latency Test Result are received from the UE Instance
|
|
323
|
-
* @param message - Latency Test Timings
|
|
324
|
-
*/
|
|
325
|
-
handleLatencyTestResult(message: ArrayBuffer): void;
|
|
326
|
-
/**
|
|
327
|
-
* Handles when a Data Channel Latency Test Response is received from the UE Instance
|
|
328
|
-
* @param message - Data Channel Latency Test Response
|
|
329
|
-
*/
|
|
330
|
-
handleDataChannelLatencyTestResponse(message: ArrayBuffer): void;
|
|
331
|
-
/**
|
|
332
|
-
* Handles when the Encoder and Web RTC Settings are received from the UE Instance
|
|
333
|
-
* @param message - Initial Encoder and Web RTC Settings
|
|
334
|
-
*/
|
|
335
|
-
handleInitialSettings(message: ArrayBuffer): void;
|
|
336
|
-
/**
|
|
337
|
-
* Handles when the Quantization Parameter are received from the UE Instance
|
|
338
|
-
* @param message - Encoders Quantization Parameter
|
|
339
|
-
*/
|
|
340
|
-
handleVideoEncoderAvgQP(message: ArrayBuffer): void;
|
|
341
|
-
/**
|
|
342
|
-
* Handles when the video element has been loaded with a srcObject
|
|
343
|
-
*/
|
|
344
|
-
handleVideoInitialized(): void;
|
|
345
|
-
/**
|
|
346
|
-
* Flag set if the user has Quality Ownership
|
|
347
|
-
* @param message - Does the current client have Quality Ownership
|
|
348
|
-
*/
|
|
349
|
-
onQualityControlOwnership(message: ArrayBuffer): void;
|
|
350
|
-
/**
|
|
351
|
-
* Handles when the Aggregated stats are Collected
|
|
352
|
-
* @param stats - Aggregated Stats
|
|
353
|
-
*/
|
|
354
|
-
handleVideoStats(stats: AggregatedStats): void;
|
|
355
|
-
/**
|
|
356
|
-
* To Resize the Video Player element
|
|
357
|
-
*/
|
|
358
|
-
resizePlayerStyle(): void;
|
|
359
|
-
setPreferredCodec(codec: string): void;
|
|
360
|
-
setVideoEncoderAvgQP(avgQP: number): void;
|
|
361
|
-
/**
|
|
362
|
-
* enables/disables keyboard event listeners
|
|
363
|
-
*/
|
|
364
|
-
setKeyboardInputEnabled(isEnabled: boolean): void;
|
|
365
|
-
/**
|
|
366
|
-
* enables/disables mouse event listeners
|
|
367
|
-
*/
|
|
368
|
-
setMouseInputEnabled(isEnabled: boolean): void;
|
|
369
|
-
/**
|
|
370
|
-
* enables/disables touch event listeners
|
|
371
|
-
*/
|
|
372
|
-
setTouchInputEnabled(isEnabled: boolean): void;
|
|
373
|
-
/**
|
|
374
|
-
* enables/disables game pad event listeners
|
|
375
|
-
*/
|
|
376
|
-
setGamePadInputEnabled(isEnabled: boolean): void;
|
|
377
|
-
registerDataChannelEventEmitters(dataChannel: DataChannelController): void;
|
|
378
|
-
registerMessageHandler(name: string, direction: MessageDirection, handler?: (data: ArrayBuffer | Array<number | string>) => void): void;
|
|
379
|
-
}
|
|
1
|
+
import { SignallingProtocol, ITransport, Messages } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5';
|
|
2
|
+
import { StreamController } from '../VideoPlayer/StreamController';
|
|
3
|
+
import { FreezeFrameController } from '../FreezeFrame/FreezeFrameController';
|
|
4
|
+
import { AFKController } from '../AFK/AFKController';
|
|
5
|
+
import { DataChannelController } from '../DataChannel/DataChannelController';
|
|
6
|
+
import { PeerConnectionController } from '../PeerConnectionController/PeerConnectionController';
|
|
7
|
+
import { AggregatedStats } from '../PeerConnectionController/AggregatedStats';
|
|
8
|
+
import { Config } from '../Config/Config';
|
|
9
|
+
import { FileTemplate } from '../Util/FileUtil';
|
|
10
|
+
import { InputClassesFactory } from '../Inputs/InputClassesFactory';
|
|
11
|
+
import { VideoPlayer } from '../VideoPlayer/VideoPlayer';
|
|
12
|
+
import { StreamMessageController, MessageDirection } from '../UeInstanceMessage/StreamMessageController';
|
|
13
|
+
import { ResponseController } from '../UeInstanceMessage/ResponseController';
|
|
14
|
+
import { SendMessageController } from '../UeInstanceMessage/SendMessageController';
|
|
15
|
+
import { ToStreamerMessagesController } from '../UeInstanceMessage/ToStreamerMessagesController';
|
|
16
|
+
import { DataChannelSender } from '../DataChannel/DataChannelSender';
|
|
17
|
+
import { InputCoordTranslator, UntranslatedCoordUnsigned } from '../Util/InputCoordTranslator';
|
|
18
|
+
import { PixelStreaming } from '../PixelStreaming/PixelStreaming';
|
|
19
|
+
import { DataChannelLatencyTestRequest } from '../DataChannel/DataChannelLatencyTestResults';
|
|
20
|
+
import { IInputController } from '../Inputs/IInputController';
|
|
21
|
+
import { GamepadController } from '../Inputs/GamepadController';
|
|
22
|
+
/**
|
|
23
|
+
* Entry point for the WebRTC Player
|
|
24
|
+
*/
|
|
25
|
+
export declare class WebRtcPlayerController {
|
|
26
|
+
config: Config;
|
|
27
|
+
responseController: ResponseController;
|
|
28
|
+
sdpConstraints: RTCOfferOptions;
|
|
29
|
+
transport: ITransport;
|
|
30
|
+
protocol: SignallingProtocol;
|
|
31
|
+
sendrecvDataChannelController: DataChannelController;
|
|
32
|
+
recvDataChannelController: DataChannelController;
|
|
33
|
+
dataChannelSender: DataChannelSender;
|
|
34
|
+
datachannelOptions: RTCDataChannelInit;
|
|
35
|
+
videoPlayer: VideoPlayer;
|
|
36
|
+
streamController: StreamController;
|
|
37
|
+
peerConnectionController: PeerConnectionController;
|
|
38
|
+
inputClassesFactory: InputClassesFactory;
|
|
39
|
+
freezeFrameController: FreezeFrameController;
|
|
40
|
+
shouldShowPlayOverlay: boolean;
|
|
41
|
+
afkController: AFKController;
|
|
42
|
+
latencyStartTime: number;
|
|
43
|
+
pixelStreaming: PixelStreaming;
|
|
44
|
+
streamMessageController: StreamMessageController;
|
|
45
|
+
sendMessageController: SendMessageController;
|
|
46
|
+
toStreamerMessagesController: ToStreamerMessagesController;
|
|
47
|
+
keyboardController: IInputController;
|
|
48
|
+
mouseController: IInputController;
|
|
49
|
+
touchController: IInputController;
|
|
50
|
+
gamePadController: GamepadController;
|
|
51
|
+
coordinateConverter: InputCoordTranslator;
|
|
52
|
+
isUsingSFU: boolean;
|
|
53
|
+
isQualityController: boolean;
|
|
54
|
+
statsTimerHandle: number;
|
|
55
|
+
file: FileTemplate;
|
|
56
|
+
preferredCodec: string;
|
|
57
|
+
peerConfig: RTCConfiguration;
|
|
58
|
+
videoAvgQp: number;
|
|
59
|
+
locallyClosed: boolean;
|
|
60
|
+
enableAutoReconnect: boolean;
|
|
61
|
+
forceReconnect: boolean;
|
|
62
|
+
reconnectAttempt: number;
|
|
63
|
+
isReconnecting: boolean;
|
|
64
|
+
disconnectMessage: string;
|
|
65
|
+
subscribedStream: string;
|
|
66
|
+
signallingUrlBuilder: () => string;
|
|
67
|
+
autoJoinTimer: ReturnType<typeof setTimeout>;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @param config - the frontend config object
|
|
71
|
+
* @param pixelStreaming - the PixelStreaming object
|
|
72
|
+
*/
|
|
73
|
+
constructor(config: Config, pixelStreaming: PixelStreaming);
|
|
74
|
+
/**
|
|
75
|
+
* Make a request to UnquantizedAndDenormalizeUnsigned coordinates
|
|
76
|
+
* @param x x axis coordinate
|
|
77
|
+
* @param y y axis coordinate
|
|
78
|
+
*/
|
|
79
|
+
requestUnquantizedAndDenormalizeUnsigned(x: number, y: number): UntranslatedCoordUnsigned;
|
|
80
|
+
/**
|
|
81
|
+
* Handles when a message is received
|
|
82
|
+
* @param event - Message Event
|
|
83
|
+
*/
|
|
84
|
+
handleOnMessage(event: MessageEvent): void;
|
|
85
|
+
/**
|
|
86
|
+
* Register message all handlers
|
|
87
|
+
*/
|
|
88
|
+
registerMessageHandlers(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Activate the logic associated with a command from UE
|
|
91
|
+
* @param message
|
|
92
|
+
*/
|
|
93
|
+
onCommand(message: ArrayBuffer): void;
|
|
94
|
+
/**
|
|
95
|
+
* Handles a protocol message received from the streamer
|
|
96
|
+
* @param message the message data from the streamer
|
|
97
|
+
*/
|
|
98
|
+
onProtocolMessage(message: ArrayBuffer): void;
|
|
99
|
+
/**
|
|
100
|
+
* Handles an input control message when it is received from the streamer
|
|
101
|
+
* @param message The input control message
|
|
102
|
+
*/
|
|
103
|
+
onInputControlOwnership(message: ArrayBuffer): void;
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @param message
|
|
107
|
+
*/
|
|
108
|
+
onGamepadResponse(message: ArrayBuffer): void;
|
|
109
|
+
onAfkTriggered(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Set whether we should timeout when afk.
|
|
112
|
+
* @param afkEnabled If true we timeout when idle for some given amount of time.
|
|
113
|
+
*/
|
|
114
|
+
setAfkEnabled(afkEnabled: boolean): void;
|
|
115
|
+
/**
|
|
116
|
+
* Attempt a reconnection to the signalling server. Manual trigger
|
|
117
|
+
*/
|
|
118
|
+
tryReconnect(message: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Does the actual reconnect work. Used by the auto reconnect feature to skip the manual flag.
|
|
121
|
+
*/
|
|
122
|
+
doReconnect(message: string): void;
|
|
123
|
+
/**
|
|
124
|
+
* Loads a freeze frame if it is required otherwise shows the play overlay
|
|
125
|
+
*/
|
|
126
|
+
loadFreezeFrameOrShowPlayOverlay(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Process the freeze frame and load it
|
|
129
|
+
* @param message The freeze frame data in bytes
|
|
130
|
+
*/
|
|
131
|
+
onFreezeFrameMessage(message: ArrayBuffer): void;
|
|
132
|
+
/**
|
|
133
|
+
* Enable the video after hiding a freeze frame
|
|
134
|
+
*/
|
|
135
|
+
invalidateFreezeFrameAndEnableVideo(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Prep datachannel data for processing file extension
|
|
138
|
+
* @param data the file extension data
|
|
139
|
+
*/
|
|
140
|
+
onFileExtension(data: ArrayBuffer): void;
|
|
141
|
+
/**
|
|
142
|
+
* Prep datachannel data for processing the file mime type
|
|
143
|
+
* @param data the file mime type data
|
|
144
|
+
*/
|
|
145
|
+
onFileMimeType(data: ArrayBuffer): void;
|
|
146
|
+
/**
|
|
147
|
+
* Prep datachannel data for processing the file contents
|
|
148
|
+
* @param data the file contents data
|
|
149
|
+
*/
|
|
150
|
+
onFileContents(data: ArrayBuffer): void;
|
|
151
|
+
/**
|
|
152
|
+
* Plays the stream audio and video source and sets up other pieces while the stream starts
|
|
153
|
+
*/
|
|
154
|
+
playStream(): void;
|
|
155
|
+
/**
|
|
156
|
+
* Plays the video stream
|
|
157
|
+
*/
|
|
158
|
+
private playVideo;
|
|
159
|
+
/**
|
|
160
|
+
* Enable the video to play automatically if enableAutoplay is true
|
|
161
|
+
*/
|
|
162
|
+
autoPlayVideoOrSetUpPlayOverlay(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Connect to the Signaling server
|
|
165
|
+
*/
|
|
166
|
+
connectToSignallingServer(): void;
|
|
167
|
+
/**
|
|
168
|
+
* This will start the handshake to the signalling server
|
|
169
|
+
* @param peerConfig - RTC Configuration Options from the Signaling server
|
|
170
|
+
* @remark RTC Peer Connection on Ice Candidate event have it handled by handle Send Ice Candidate
|
|
171
|
+
*/
|
|
172
|
+
startSession(peerConfig: RTCConfiguration): void;
|
|
173
|
+
/**
|
|
174
|
+
* Checks the peer connection options for a turn server and returns true or false
|
|
175
|
+
*/
|
|
176
|
+
checkTurnServerAvailability(options: RTCConfiguration): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Handles when a Config Message is received contains the Peer Connection Options required (STUN and TURN Server Info)
|
|
179
|
+
* @param messageConfig - Config Message received from the signaling server
|
|
180
|
+
*/
|
|
181
|
+
handleOnConfigMessage(messageConfig: Messages.config): void;
|
|
182
|
+
/**
|
|
183
|
+
* Handles when the signalling server gives us the list of streamer ids.
|
|
184
|
+
*/
|
|
185
|
+
handleStreamerListMessage(messageStreamerList: Messages.streamerList): void;
|
|
186
|
+
handleStreamerIDChangedMessage(streamerIDChangedMessage: Messages.streamerIdChanged): void;
|
|
187
|
+
/**
|
|
188
|
+
* Handle the RTC Answer from the signaling server
|
|
189
|
+
* @param Answer - Answer SDP from the peer.
|
|
190
|
+
*/
|
|
191
|
+
handleWebRtcAnswer(Answer: Messages.answer): void;
|
|
192
|
+
/**
|
|
193
|
+
* Handle the RTC offer from a WebRTC peer (received through the signalling server).
|
|
194
|
+
* @param Offer - Offer SDP from the peer.
|
|
195
|
+
*/
|
|
196
|
+
handleWebRtcOffer(Offer: Messages.offer): void;
|
|
197
|
+
/**
|
|
198
|
+
* Handle when the SFU provides the peer with its data channels
|
|
199
|
+
* @param DataChannels - The message from the SFU containing the data channels ids
|
|
200
|
+
*/
|
|
201
|
+
handleWebRtcSFUPeerDatachannels(DataChannels: Messages.peerDataChannels): void;
|
|
202
|
+
handlePostWebrtcNegotiation(): void;
|
|
203
|
+
/**
|
|
204
|
+
* When an ice Candidate is received from the Signaling server add it to the Peer Connection Client
|
|
205
|
+
* @param iceCandidate - Ice Candidate from Server
|
|
206
|
+
*/
|
|
207
|
+
handleIceCandidate(iceCandidate: RTCIceCandidateInit): void;
|
|
208
|
+
/**
|
|
209
|
+
* Send the ice Candidate to the signaling server via websocket
|
|
210
|
+
* @param iceEvent - RTC Peer ConnectionIceEvent) {
|
|
211
|
+
*/
|
|
212
|
+
handleSendIceCandidate(iceEvent: RTCPeerConnectionIceEvent): void;
|
|
213
|
+
/**
|
|
214
|
+
* Send the ice Candidate to the signaling server via websocket
|
|
215
|
+
* @param iceEvent - RTC Peer ConnectionIceEvent) {
|
|
216
|
+
*/
|
|
217
|
+
handleDataChannel(datachannelEvent: RTCDataChannelEvent): void;
|
|
218
|
+
/**
|
|
219
|
+
* Send the RTC Offer Session to the Signaling server via websocket
|
|
220
|
+
* @param offer - RTC Session Description
|
|
221
|
+
*/
|
|
222
|
+
handleSendWebRTCOffer(offer: RTCSessionDescriptionInit): void;
|
|
223
|
+
/**
|
|
224
|
+
* Send the RTC Offer Session to the Signaling server via websocket
|
|
225
|
+
* @param answer - RTC Session Description
|
|
226
|
+
*/
|
|
227
|
+
handleSendWebRTCAnswer(answer: RTCSessionDescriptionInit): void;
|
|
228
|
+
/**
|
|
229
|
+
* Set the freeze frame overlay to the player div
|
|
230
|
+
*/
|
|
231
|
+
setUpMouseAndFreezeFrame(): void;
|
|
232
|
+
/**
|
|
233
|
+
* Close the Connection to the signaling server
|
|
234
|
+
*/
|
|
235
|
+
closeSignalingServer(message: string, allowReconnect: boolean): void;
|
|
236
|
+
/**
|
|
237
|
+
* Close the peer connection
|
|
238
|
+
*/
|
|
239
|
+
closePeerConnection(): void;
|
|
240
|
+
/**
|
|
241
|
+
* Close all connections
|
|
242
|
+
*/
|
|
243
|
+
close(): void;
|
|
244
|
+
/**
|
|
245
|
+
* Fires a Video Stats Event in the RTC Peer Connection
|
|
246
|
+
*/
|
|
247
|
+
getStats(): void;
|
|
248
|
+
/**
|
|
249
|
+
* Send a Latency Test Request to the UE Instance
|
|
250
|
+
*/
|
|
251
|
+
sendLatencyTest(): void;
|
|
252
|
+
/**
|
|
253
|
+
* Send a Data Channel Latency Test Request to the UE Instance
|
|
254
|
+
*/
|
|
255
|
+
sendDataChannelLatencyTest(descriptor: DataChannelLatencyTestRequest): void;
|
|
256
|
+
/**
|
|
257
|
+
* Send the MinQP encoder setting to the UE Instance.
|
|
258
|
+
* @param minQP - The lower bound for QP when encoding
|
|
259
|
+
* valid values are (1-51) where:
|
|
260
|
+
* 1 = Best quality but highest bitrate.
|
|
261
|
+
* 51 = Worst quality but lowest bitrate.
|
|
262
|
+
* By default the minQP is 1 meaning the encoder is free
|
|
263
|
+
* to aim for the best quality it can on the given network link.
|
|
264
|
+
*/
|
|
265
|
+
sendEncoderMinQP(minQP: number): void;
|
|
266
|
+
/**
|
|
267
|
+
* Send the MaxQP encoder setting to the UE Instance.
|
|
268
|
+
* @param maxQP - The upper bound for QP when encoding
|
|
269
|
+
* valid values are (1-51) where:
|
|
270
|
+
* 1 = Best quality but highest bitrate.
|
|
271
|
+
* 51 = Worst quality but lowest bitrate.
|
|
272
|
+
* By default the maxQP is 51 meaning the encoder is free
|
|
273
|
+
* to drop quality as low as needed on the given network link.
|
|
274
|
+
*/
|
|
275
|
+
sendEncoderMaxQP(maxQP: number): void;
|
|
276
|
+
/**
|
|
277
|
+
* Send the { WebRTC.MinBitrate: SomeNumber }} command to UE to set
|
|
278
|
+
* the minimum bitrate that we allow WebRTC to use
|
|
279
|
+
* (note setting this too high in poor networks can be problematic).
|
|
280
|
+
* @param minBitrate - The minimum bitrate we would like WebRTC to not fall below.
|
|
281
|
+
*/
|
|
282
|
+
sendWebRTCMinBitrate(minBitrate: number): void;
|
|
283
|
+
/**
|
|
284
|
+
* Send the { WebRTC.MaxBitrate: SomeNumber }} command to UE to set
|
|
285
|
+
* the minimum bitrate that we allow WebRTC to use
|
|
286
|
+
* (note setting this too low could result in blocky video).
|
|
287
|
+
* @param minBitrate - The minimum bitrate we would like WebRTC to not fall below.
|
|
288
|
+
*/
|
|
289
|
+
sendWebRTCMaxBitrate(maxBitrate: number): void;
|
|
290
|
+
/**
|
|
291
|
+
* Send the { WebRTC.Fps: SomeNumber }} UE 5.0+
|
|
292
|
+
* and { WebRTC.MaxFps } UE 4.27 command to set
|
|
293
|
+
* the maximum fps we would like WebRTC to stream at.
|
|
294
|
+
* @param fps - The maximum stream fps.
|
|
295
|
+
*/
|
|
296
|
+
sendWebRTCFps(fps: number): void;
|
|
297
|
+
/**
|
|
298
|
+
* Sends the UI Descriptor `stat fps` to the UE Instance
|
|
299
|
+
*/
|
|
300
|
+
sendShowFps(): void;
|
|
301
|
+
/**
|
|
302
|
+
* Send an Iframe request to the streamer
|
|
303
|
+
*/
|
|
304
|
+
sendIframeRequest(): void;
|
|
305
|
+
/**
|
|
306
|
+
* Send a UIInteraction message
|
|
307
|
+
*/
|
|
308
|
+
emitUIInteraction(descriptor: object | string): void;
|
|
309
|
+
/**
|
|
310
|
+
* Send a Command message
|
|
311
|
+
*/
|
|
312
|
+
emitCommand(descriptor: object): void;
|
|
313
|
+
/**
|
|
314
|
+
* Send a console command message
|
|
315
|
+
*/
|
|
316
|
+
emitConsoleCommand(command: string): void;
|
|
317
|
+
/**
|
|
318
|
+
* Sends a request to the UE Instance to have ownership of Quality
|
|
319
|
+
*/
|
|
320
|
+
sendRequestQualityControlOwnership(): void;
|
|
321
|
+
/**
|
|
322
|
+
* Handles when a Latency Test Result are received from the UE Instance
|
|
323
|
+
* @param message - Latency Test Timings
|
|
324
|
+
*/
|
|
325
|
+
handleLatencyTestResult(message: ArrayBuffer): void;
|
|
326
|
+
/**
|
|
327
|
+
* Handles when a Data Channel Latency Test Response is received from the UE Instance
|
|
328
|
+
* @param message - Data Channel Latency Test Response
|
|
329
|
+
*/
|
|
330
|
+
handleDataChannelLatencyTestResponse(message: ArrayBuffer): void;
|
|
331
|
+
/**
|
|
332
|
+
* Handles when the Encoder and Web RTC Settings are received from the UE Instance
|
|
333
|
+
* @param message - Initial Encoder and Web RTC Settings
|
|
334
|
+
*/
|
|
335
|
+
handleInitialSettings(message: ArrayBuffer): void;
|
|
336
|
+
/**
|
|
337
|
+
* Handles when the Quantization Parameter are received from the UE Instance
|
|
338
|
+
* @param message - Encoders Quantization Parameter
|
|
339
|
+
*/
|
|
340
|
+
handleVideoEncoderAvgQP(message: ArrayBuffer): void;
|
|
341
|
+
/**
|
|
342
|
+
* Handles when the video element has been loaded with a srcObject
|
|
343
|
+
*/
|
|
344
|
+
handleVideoInitialized(): void;
|
|
345
|
+
/**
|
|
346
|
+
* Flag set if the user has Quality Ownership
|
|
347
|
+
* @param message - Does the current client have Quality Ownership
|
|
348
|
+
*/
|
|
349
|
+
onQualityControlOwnership(message: ArrayBuffer): void;
|
|
350
|
+
/**
|
|
351
|
+
* Handles when the Aggregated stats are Collected
|
|
352
|
+
* @param stats - Aggregated Stats
|
|
353
|
+
*/
|
|
354
|
+
handleVideoStats(stats: AggregatedStats): void;
|
|
355
|
+
/**
|
|
356
|
+
* To Resize the Video Player element
|
|
357
|
+
*/
|
|
358
|
+
resizePlayerStyle(): void;
|
|
359
|
+
setPreferredCodec(codec: string): void;
|
|
360
|
+
setVideoEncoderAvgQP(avgQP: number): void;
|
|
361
|
+
/**
|
|
362
|
+
* enables/disables keyboard event listeners
|
|
363
|
+
*/
|
|
364
|
+
setKeyboardInputEnabled(isEnabled: boolean): void;
|
|
365
|
+
/**
|
|
366
|
+
* enables/disables mouse event listeners
|
|
367
|
+
*/
|
|
368
|
+
setMouseInputEnabled(isEnabled: boolean): void;
|
|
369
|
+
/**
|
|
370
|
+
* enables/disables touch event listeners
|
|
371
|
+
*/
|
|
372
|
+
setTouchInputEnabled(isEnabled: boolean): void;
|
|
373
|
+
/**
|
|
374
|
+
* enables/disables game pad event listeners
|
|
375
|
+
*/
|
|
376
|
+
setGamePadInputEnabled(isEnabled: boolean): void;
|
|
377
|
+
registerDataChannelEventEmitters(dataChannel: DataChannelController): void;
|
|
378
|
+
registerMessageHandler(name: string, direction: MessageDirection, handler?: (data: ArrayBuffer | Array<number | string>) => void): void;
|
|
379
|
+
}
|