@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,96 @@
|
|
|
1
|
+
import * as MessageReceive from './MessageReceive';
|
|
2
|
+
import { SignallingProtocol } from './SignallingProtocol';
|
|
3
|
+
declare global {
|
|
4
|
+
interface WebSocket {
|
|
5
|
+
onmessagebinary?(event?: MessageEvent): void;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The controller for the WebSocket and all associated methods
|
|
10
|
+
*/
|
|
11
|
+
export declare class WebSocketController {
|
|
12
|
+
WS_OPEN_STATE: number;
|
|
13
|
+
webSocket: WebSocket;
|
|
14
|
+
onOpen: EventTarget;
|
|
15
|
+
onClose: EventTarget;
|
|
16
|
+
signallingProtocol: SignallingProtocol;
|
|
17
|
+
constructor();
|
|
18
|
+
/**
|
|
19
|
+
* Connect to the signaling server
|
|
20
|
+
* @param connectionURL - The Address of the signaling server
|
|
21
|
+
* @returns - If there is a connection
|
|
22
|
+
*/
|
|
23
|
+
connect(connectionURL: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Handles what happens when a message is received in binary form
|
|
26
|
+
* @param event - Message Received
|
|
27
|
+
*/
|
|
28
|
+
handleOnMessageBinary(event: MessageEvent): void;
|
|
29
|
+
/**
|
|
30
|
+
* Handles what happens when a message is received
|
|
31
|
+
* @param event - Message Received
|
|
32
|
+
*/
|
|
33
|
+
handleOnMessage(event: MessageEvent): void;
|
|
34
|
+
/**
|
|
35
|
+
* Handles when the Websocket is opened
|
|
36
|
+
* @param event - Not Used
|
|
37
|
+
*/
|
|
38
|
+
handleOnOpen(event: Event): void;
|
|
39
|
+
/**
|
|
40
|
+
* Handles when there is an error on the websocket
|
|
41
|
+
* @param event - Error Payload
|
|
42
|
+
*/
|
|
43
|
+
handleOnError(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Handles when the Websocket is closed
|
|
46
|
+
* @param event - Close Event
|
|
47
|
+
*/
|
|
48
|
+
handleOnClose(event: CloseEvent): void;
|
|
49
|
+
requestStreamerList(): void;
|
|
50
|
+
sendSubscribe(streamerid: string): void;
|
|
51
|
+
sendUnsubscribe(): void;
|
|
52
|
+
sendWebRtcOffer(offer: RTCSessionDescriptionInit): void;
|
|
53
|
+
sendWebRtcAnswer(answer: RTCSessionDescriptionInit): void;
|
|
54
|
+
sendWebRtcDatachannelRequest(): void;
|
|
55
|
+
sendSFURecvDataChannelReady(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Sends an RTC Ice Candidate to the Server
|
|
58
|
+
* @param candidate - RTC Ice Candidate
|
|
59
|
+
*/
|
|
60
|
+
sendIceCandidate(candidate: RTCIceCandidate): void;
|
|
61
|
+
/**
|
|
62
|
+
* Closes the Websocket connection
|
|
63
|
+
*/
|
|
64
|
+
close(): void;
|
|
65
|
+
/** Event used for Displaying websocket closed messages */
|
|
66
|
+
onWebSocketOncloseOverlayMessage(event: CloseEvent): void;
|
|
67
|
+
/**
|
|
68
|
+
* The Message Contains the payload of the peer connection options used for the RTC Peer hand shake
|
|
69
|
+
* @param messageConfig - Config Message received from he signaling server
|
|
70
|
+
*/
|
|
71
|
+
onConfig(messageConfig: MessageReceive.MessageConfig): void;
|
|
72
|
+
/**
|
|
73
|
+
* The Message Contains the payload of the peer connection options used for the RTC Peer hand shake
|
|
74
|
+
* @param messageConfig - Config Message received from he signaling server
|
|
75
|
+
*/
|
|
76
|
+
onStreamerList(messageStreamerList: MessageReceive.MessageStreamerList): void;
|
|
77
|
+
/**
|
|
78
|
+
* @param iceCandidate - Ice Candidate sent from the Signaling server server's RTC hand shake
|
|
79
|
+
*/
|
|
80
|
+
onIceCandidate(iceCandidate: RTCIceCandidateInit): void;
|
|
81
|
+
/**
|
|
82
|
+
* Event is fired when the websocket receives the answer for the RTC peer Connection
|
|
83
|
+
* @param messageAnswer - The RTC Answer payload from the signaling server
|
|
84
|
+
*/
|
|
85
|
+
onWebRtcAnswer(messageAnswer: MessageReceive.MessageAnswer): void;
|
|
86
|
+
/**
|
|
87
|
+
* Event is fired when the websocket receives the offer for the RTC peer Connection
|
|
88
|
+
* @param messageOffer - The sdp offer
|
|
89
|
+
*/
|
|
90
|
+
onWebRtcOffer(messageOffer: MessageReceive.MessageOffer): void;
|
|
91
|
+
/**
|
|
92
|
+
* Event is fired when the websocket receives the data channels for the RTC peer Connection from the SFU
|
|
93
|
+
* @param messageDataChannels - The data channels details
|
|
94
|
+
*/
|
|
95
|
+
onWebRtcPeerDataChannels(messageDataChannels: MessageReceive.MessagePeerDataChannels): void;
|
|
96
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="webxr" />
|
|
2
|
+
import { WebRtcPlayerController } from '../WebRtcPlayer/WebRtcPlayerController';
|
|
3
|
+
export declare class WebXRController {
|
|
4
|
+
private xrSession;
|
|
5
|
+
private xrRefSpace;
|
|
6
|
+
private gl;
|
|
7
|
+
private positionLocation;
|
|
8
|
+
private texcoordLocation;
|
|
9
|
+
private resolutionLocation;
|
|
10
|
+
private offsetLocation;
|
|
11
|
+
private positionBuffer;
|
|
12
|
+
private texcoordBuffer;
|
|
13
|
+
private webRtcController;
|
|
14
|
+
private xrGamepadController;
|
|
15
|
+
private xrControllers;
|
|
16
|
+
onSessionStarted: EventTarget;
|
|
17
|
+
onSessionEnded: EventTarget;
|
|
18
|
+
onFrame: EventTarget;
|
|
19
|
+
constructor(webRtcPlayerController: WebRtcPlayerController);
|
|
20
|
+
xrClicked(): void;
|
|
21
|
+
onXrSessionEnded(): void;
|
|
22
|
+
onXrSessionStarted(session: XRSession): void;
|
|
23
|
+
onXrFrame(time: DOMHighResTimeStamp, frame: XRFrame): void;
|
|
24
|
+
private render;
|
|
25
|
+
static isSessionSupported(mode: XRSessionMode): Promise<boolean>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { WebRtcPlayerController } from './WebRtcPlayer/WebRtcPlayerController';
|
|
2
|
+
export { WebXRController } from './WebXR/WebXRController';
|
|
3
|
+
export { Config, ControlSchemeType, Flags, NumericParameters, TextParameters, OptionParameters, FlagsIds, NumericParametersIds, TextParametersIds, OptionParametersIds, AllSettings } from './Config/Config';
|
|
4
|
+
export { SettingBase } from './Config/SettingBase';
|
|
5
|
+
export { SettingFlag } from './Config/SettingFlag';
|
|
6
|
+
export { SettingNumber } from './Config/SettingNumber';
|
|
7
|
+
export { SettingOption } from './Config/SettingOption';
|
|
8
|
+
export { SettingText } from './Config/SettingText';
|
|
9
|
+
export { PixelStreaming } from './PixelStreaming/PixelStreaming';
|
|
10
|
+
export { AFKController as AfkLogic } from './AFK/AFKController';
|
|
11
|
+
export { LatencyTestResults } from './DataChannel/LatencyTestResults';
|
|
12
|
+
export { EncoderSettings, InitialSettings, WebRTCSettings } from './DataChannel/InitialSettings';
|
|
13
|
+
export { AggregatedStats } from './PeerConnectionController/AggregatedStats';
|
|
14
|
+
export { Logger } from './Logger/Logger';
|
|
15
|
+
export { UnquantizedDenormalizedUnsignedCoord as UnquantizedAndDenormalizeUnsigned } from './Util/CoordinateConverter';
|
|
16
|
+
export { MessageSend } from './WebSockets/MessageSend';
|
|
17
|
+
export { MessageRecv, MessageStreamerList } from './WebSockets/MessageReceive';
|
|
18
|
+
export { WebSocketController } from './WebSockets/WebSocketController';
|
|
19
|
+
export { SignallingProtocol } from './WebSockets/SignallingProtocol';
|
|
20
|
+
export { CandidatePairStats } from './PeerConnectionController/CandidatePairStats';
|
|
21
|
+
export { CandidateStat } from './PeerConnectionController/CandidateStat';
|
|
22
|
+
export { DataChannelStats } from './PeerConnectionController/DataChannelStats';
|
|
23
|
+
export { InboundAudioStats, InboundVideoStats } from './PeerConnectionController/InboundRTPStats';
|
|
24
|
+
export { OutBoundVideoStats } from './PeerConnectionController/OutBoundRTPStats';
|
|
25
|
+
export * from './Util/EventEmitter';
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yang__yj/pixelstreaming-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "library/dist/lib-pixelstreamingfrontend.js",
|
|
5
|
+
"module": "library/dist/lib-pixelstreamingfrontend.esm.js",
|
|
6
|
+
"types": "library/types/pixelstreamingfrontend.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"library/dist",
|
|
9
|
+
"library/types"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepublishOnly": "echo using existing build"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"license": "ISC"
|
|
18
|
+
}
|