@arcware-cloud/pixelstreaming-websdk 1.3.20 → 1.3.21
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/README.md +4 -0
- package/index.cjs.js +32 -100
- package/index.esm.js +85 -151
- package/index.umd.js +32 -100
- package/package.json +1 -1
- package/types/lib/ArcwareConfig.d.ts +1 -1
- package/types/lib/ArcwareInit.d.ts +11 -7
- package/types/lib/ArcwarePixelStreaming.d.ts +6 -5
- package/types/lib/domain/ArcwareSettingsSchema.d.ts +1 -5
- package/types/lib/domain/ConnectionIdentifier.d.ts +0 -27
package/README.md
CHANGED
|
@@ -80,6 +80,10 @@ For more detailed examples and advanced usage, please refer to our documentation
|
|
|
80
80
|
|
|
81
81
|
# Changelog
|
|
82
82
|
|
|
83
|
+
### 1.3.20
|
|
84
|
+
|
|
85
|
+
- polished types a bit and aligned with documentation
|
|
86
|
+
|
|
83
87
|
### 1.3.19
|
|
84
88
|
|
|
85
89
|
- added new configuration parameters to optionally hide AfkOverlay and to hide love letters box
|
package/index.cjs.js
CHANGED
|
@@ -23452,7 +23452,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23452
23452
|
if (!config.initialSettings.ss)
|
|
23453
23453
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23454
23454
|
super(config);
|
|
23455
|
-
this.VERSION = "1.3.
|
|
23455
|
+
this.VERSION = "1.3.21";
|
|
23456
23456
|
this.whiteLabellingChanged = new EventHandler_1.EventHandler();
|
|
23457
23457
|
this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
|
|
23458
23458
|
if (config.envName) {
|
|
@@ -23469,11 +23469,16 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23469
23469
|
if (this.useUrlParams) {
|
|
23470
23470
|
// Get the query string from URL
|
|
23471
23471
|
const qs = new URLSearchParams(window.location.search);
|
|
23472
|
-
if (qs.has("wl")
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23472
|
+
if (qs.has("wl")) {
|
|
23473
|
+
if (qs.get("wl") !== "") {
|
|
23474
|
+
// Retrieve image loading from there
|
|
23475
|
+
const wlParsed = this.useUrlParams ? (0, whiteLabelling_1.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
|
|
23476
|
+
if (wlParsed) {
|
|
23477
|
+
this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
|
|
23478
|
+
}
|
|
23479
|
+
}
|
|
23480
|
+
else {
|
|
23481
|
+
this.settings.fetchRemoteWhiteLabelling = true;
|
|
23477
23482
|
}
|
|
23478
23483
|
}
|
|
23479
23484
|
this.settings.infoButton = qs.has("i") || qs.has("info");
|
|
@@ -23482,8 +23487,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23482
23487
|
getWhiteLabelling(ShareId) {
|
|
23483
23488
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23484
23489
|
const qs = new URLSearchParams(window.location.search);
|
|
23485
|
-
|
|
23486
|
-
if (!(qs.has("wl") && qs.get("wl") === "")) {
|
|
23490
|
+
if (qs.get("wl") !== "") {
|
|
23487
23491
|
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, {
|
|
23488
23492
|
next: this.settings.whiteLabelling,
|
|
23489
23493
|
changed: false
|
|
@@ -23605,8 +23609,9 @@ let globalConfig = null;
|
|
|
23605
23609
|
let globalApplication = null;
|
|
23606
23610
|
let previousShareId = null;
|
|
23607
23611
|
let previousProjectId = null;
|
|
23608
|
-
function ArcwareInit(
|
|
23612
|
+
function ArcwareInit(ids, configuration, forceRefresh = false) {
|
|
23609
23613
|
var _a;
|
|
23614
|
+
const { shareId, projectId } = ids;
|
|
23610
23615
|
if (shareId && !shareId.startsWith("share-"))
|
|
23611
23616
|
throw new Error(`Unexpected shareId-format: '${shareId}'.`);
|
|
23612
23617
|
if (shareId && previousShareId !== shareId) {
|
|
@@ -23637,9 +23642,12 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23637
23642
|
}
|
|
23638
23643
|
const Config = new ArcwareConfig_1.ArcwareConfig({
|
|
23639
23644
|
useUrlParams: (configuration === null || configuration === void 0 ? void 0 : configuration.useUrlParams) === true,
|
|
23640
|
-
initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false,
|
|
23645
|
+
initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false, AutoPlayVideo: true, HoveringMouse: true, ForceMonoAudio: false, FakeMouseWithTouches: false, StartVideoMuted: true, SuppressBrowserKeys: true, UseMic: true, KeyboardInput: true, MouseInput: true, TouchInput: true, GamepadInput: true, XRControllerInput: true }, configuration === null || configuration === void 0 ? void 0 : configuration.initialSettings),
|
|
23641
23646
|
settings: Object.assign({ shareId,
|
|
23642
|
-
projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false,
|
|
23647
|
+
projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: {
|
|
23648
|
+
landscape: 0,
|
|
23649
|
+
portrait: 0
|
|
23650
|
+
}, whiteLabelling: {
|
|
23643
23651
|
splashScreenUrl: undefined,
|
|
23644
23652
|
loadingIconFadeMs: undefined,
|
|
23645
23653
|
loadingIconUrl: undefined,
|
|
@@ -23673,7 +23681,7 @@ exports.ArcwareInit = ArcwareInit;
|
|
|
23673
23681
|
|
|
23674
23682
|
|
|
23675
23683
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23676
|
-
exports.ArcwarePixelStreaming = void 0;
|
|
23684
|
+
exports.ArcwarePixelStreaming = exports.WebsocketState = void 0;
|
|
23677
23685
|
const tslib_1 = __webpack_require__(655);
|
|
23678
23686
|
const shared_pixelstreaming_websdk_1 = __webpack_require__(7910);
|
|
23679
23687
|
const lib_pixelstreamingfrontend_ue5_5_1 = __webpack_require__(693);
|
|
@@ -23684,9 +23692,19 @@ const debounce_1 = __webpack_require__(9580);
|
|
|
23684
23692
|
const LoveLetters_1 = __webpack_require__(4572);
|
|
23685
23693
|
const ArcwareLogoLoader_1 = __webpack_require__(6469);
|
|
23686
23694
|
const MicrophoneOverlay_1 = __webpack_require__(3613);
|
|
23687
|
-
const ConnectionIdentifier_1 = __webpack_require__(5999);
|
|
23688
23695
|
const DiagnosticsCollector_1 = __webpack_require__(8429);
|
|
23689
23696
|
const common_1 = __webpack_require__(2483);
|
|
23697
|
+
var WebsocketState;
|
|
23698
|
+
(function (WebsocketState) {
|
|
23699
|
+
// Socket has been created. The connection is not yet open.
|
|
23700
|
+
WebsocketState[WebsocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
23701
|
+
// The connection is open and ready to communicate.
|
|
23702
|
+
WebsocketState[WebsocketState["OPEN"] = 1] = "OPEN";
|
|
23703
|
+
// The connection is in the process of closing.
|
|
23704
|
+
WebsocketState[WebsocketState["CLOSING"] = 2] = "CLOSING";
|
|
23705
|
+
// The connection is closed or couldn't be opened.
|
|
23706
|
+
WebsocketState[WebsocketState["CLOSED"] = 3] = "CLOSED";
|
|
23707
|
+
})(WebsocketState = exports.WebsocketState || (exports.WebsocketState = {}));
|
|
23690
23708
|
class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStreaming {
|
|
23691
23709
|
resetInitGuardsAndHooks() {
|
|
23692
23710
|
this.videoInitializedSent = false;
|
|
@@ -23758,14 +23776,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23758
23776
|
const ws = (_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.webSocket;
|
|
23759
23777
|
return !!ws && ws.readyState === WebSocket.OPEN;
|
|
23760
23778
|
}
|
|
23761
|
-
/** Returns a list of WebSocketStates of all PixelStreaming Instances generated. */
|
|
23762
|
-
get WebsocketStates() {
|
|
23763
|
-
return ConnectionIdentifier_1.ConnectionIdentifier.Instance.GetWebSocketStates();
|
|
23764
|
-
}
|
|
23765
|
-
/** Counts all active PixelStreaming Instances generated. (CONNECTING & CONNECTED) */
|
|
23766
|
-
get ActiveInstances() {
|
|
23767
|
-
return ConnectionIdentifier_1.ConnectionIdentifier.Instance.ActiveInstances;
|
|
23768
|
-
}
|
|
23769
23779
|
/** Returns this PixelStreaming Instances websocket state. */
|
|
23770
23780
|
get websocketState() {
|
|
23771
23781
|
var _a, _b, _c;
|
|
@@ -23898,7 +23908,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23898
23908
|
this.sessionIdHandler.add(this.config.settings.sessionIdHandler);
|
|
23899
23909
|
if (this.config.settings.loveLetterHandler)
|
|
23900
23910
|
this.loveLetterHandler.add(this.config.settings.loveLetterHandler);
|
|
23901
|
-
ConnectionIdentifier_1.ConnectionIdentifier.Instance.register(this);
|
|
23902
23911
|
this.removeXRIconIfDisabled();
|
|
23903
23912
|
this.handleMouseLock();
|
|
23904
23913
|
}
|
|
@@ -24020,8 +24029,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24020
24029
|
Object.entries(streamInfo.streamInfo.webSdkSettings.conf).forEach(([key, value]) => {
|
|
24021
24030
|
const k = key;
|
|
24022
24031
|
this.config.settings[k] = value;
|
|
24023
|
-
if (key === "connectionIdentifierLoggingDisabled" && value === true)
|
|
24024
|
-
ConnectionIdentifier_1.ConnectionIdentifier.Instance.disable();
|
|
24025
24032
|
});
|
|
24026
24033
|
}
|
|
24027
24034
|
}
|
|
@@ -24689,14 +24696,12 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
|
|
|
24689
24696
|
connectionStrengthIcon: zod_1.z.boolean().optional(),
|
|
24690
24697
|
/** ShareId, used for sharing your project.
|
|
24691
24698
|
* Using ArcwareInit will set this required property for you. */
|
|
24692
|
-
shareId: zod_1.z.string().startsWith("share-")
|
|
24699
|
+
shareId: zod_1.z.string().startsWith("share-"),
|
|
24693
24700
|
/** Id of your project, only required if your shareId refers to multiple projects.
|
|
24694
24701
|
* Using ArcwareInit will set this required property for you. */
|
|
24695
24702
|
projectId: zod_1.z.string().optional(),
|
|
24696
24703
|
/** Enable/Disable LoveLetter logging to the console. */
|
|
24697
24704
|
loveLetterLogging: zod_1.z.boolean().optional(),
|
|
24698
|
-
/** Enable/Disable Connection Identifier logging to the console. */
|
|
24699
|
-
connectionIdentifierLoggingDisabled: zod_1.z.boolean().optional(),
|
|
24700
24705
|
/** Width with which instance should be started */
|
|
24701
24706
|
startWidth: zod_1.z.number().optional(),
|
|
24702
24707
|
/** Height with which instance should be started */
|
|
@@ -24715,79 +24720,6 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
|
|
|
24715
24720
|
});
|
|
24716
24721
|
|
|
24717
24722
|
|
|
24718
|
-
/***/ }),
|
|
24719
|
-
|
|
24720
|
-
/***/ 5999:
|
|
24721
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
24722
|
-
|
|
24723
|
-
|
|
24724
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24725
|
-
exports.ConnectionIdentifier = exports.WebsocketState = void 0;
|
|
24726
|
-
var WebsocketState;
|
|
24727
|
-
(function (WebsocketState) {
|
|
24728
|
-
// Socket has been created. The connection is not yet open.
|
|
24729
|
-
WebsocketState[WebsocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
24730
|
-
// The connection is open and ready to communicate.
|
|
24731
|
-
WebsocketState[WebsocketState["OPEN"] = 1] = "OPEN";
|
|
24732
|
-
// The connection is in the process of closing.
|
|
24733
|
-
WebsocketState[WebsocketState["CLOSING"] = 2] = "CLOSING";
|
|
24734
|
-
// The connection is closed or couldn't be opened.
|
|
24735
|
-
WebsocketState[WebsocketState["CLOSED"] = 3] = "CLOSED";
|
|
24736
|
-
})(WebsocketState = exports.WebsocketState || (exports.WebsocketState = {}));
|
|
24737
|
-
class ConnectionIdentifier {
|
|
24738
|
-
static get Instance() {
|
|
24739
|
-
if (!this.instance) {
|
|
24740
|
-
this.instance = new ConnectionIdentifier();
|
|
24741
|
-
}
|
|
24742
|
-
return this.instance;
|
|
24743
|
-
}
|
|
24744
|
-
get WebsocketStates() {
|
|
24745
|
-
return this.aps.map((ps) => ps.websocketState);
|
|
24746
|
-
}
|
|
24747
|
-
constructor() {
|
|
24748
|
-
this.aps = [];
|
|
24749
|
-
this.enabled = true;
|
|
24750
|
-
}
|
|
24751
|
-
register(ps) {
|
|
24752
|
-
var _a;
|
|
24753
|
-
if (!this.aps.includes(ps)) {
|
|
24754
|
-
this.aps.push(ps);
|
|
24755
|
-
if ((_a = ps.config.settings) === null || _a === void 0 ? void 0 : _a.connectionIdentifierLoggingDisabled)
|
|
24756
|
-
this.disable();
|
|
24757
|
-
}
|
|
24758
|
-
if (!this.interval)
|
|
24759
|
-
this.interval = setInterval(this.connectionWatcher.bind(this), 10 * 1000);
|
|
24760
|
-
}
|
|
24761
|
-
GetWebSocketStates() {
|
|
24762
|
-
return this.aps.map((ps) => ps.websocketState);
|
|
24763
|
-
}
|
|
24764
|
-
ActiveInstances() {
|
|
24765
|
-
return this.GetWebSocketStates().filter((state) => state <= WebsocketState.OPEN).length;
|
|
24766
|
-
}
|
|
24767
|
-
disable() {
|
|
24768
|
-
this.enabled = false;
|
|
24769
|
-
}
|
|
24770
|
-
/**
|
|
24771
|
-
* The purpose of this method is to periodically tell the developer the amount of connected instances.
|
|
24772
|
-
* This way the developer can figure out, when they messed up the implementation and there's shadow instances still running.
|
|
24773
|
-
* Or when they accidentally set up multiple connections!
|
|
24774
|
-
* Things like that can happen, for example if the React.useEffect was not setup perfectly!
|
|
24775
|
-
*/
|
|
24776
|
-
connectionWatcher() {
|
|
24777
|
-
if (!this.enabled)
|
|
24778
|
-
return;
|
|
24779
|
-
const activeStates = this.GetWebSocketStates().filter((state) => state <= WebsocketState.OPEN);
|
|
24780
|
-
if (activeStates.length === 1) {
|
|
24781
|
-
//console.log(`PixelStreaming Instance is connected.`);
|
|
24782
|
-
}
|
|
24783
|
-
else if (activeStates.length !== 0) {
|
|
24784
|
-
console.warn(`${activeStates.length} PixelStreaming Instances are connected!`);
|
|
24785
|
-
}
|
|
24786
|
-
}
|
|
24787
|
-
}
|
|
24788
|
-
exports.ConnectionIdentifier = ConnectionIdentifier;
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
24723
|
/***/ }),
|
|
24792
24724
|
|
|
24793
24725
|
/***/ 3379:
|
package/index.esm.js
CHANGED
|
@@ -23464,7 +23464,7 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23464
23464
|
if (!config.initialSettings.ss)
|
|
23465
23465
|
config.initialSettings.ss = DefaultUrl;
|
|
23466
23466
|
super(config);
|
|
23467
|
-
this.VERSION = "1.3.
|
|
23467
|
+
this.VERSION = "1.3.21";
|
|
23468
23468
|
this.whiteLabellingChanged = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler();
|
|
23469
23469
|
this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
|
|
23470
23470
|
if (config.envName) {
|
|
@@ -23481,11 +23481,16 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23481
23481
|
if (this.useUrlParams) {
|
|
23482
23482
|
// Get the query string from URL
|
|
23483
23483
|
const qs = new URLSearchParams(window.location.search);
|
|
23484
|
-
if (qs.has("wl")
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23484
|
+
if (qs.has("wl")) {
|
|
23485
|
+
if (qs.get("wl") !== "") {
|
|
23486
|
+
// Retrieve image loading from there
|
|
23487
|
+
const wlParsed = this.useUrlParams ? (0,_features_whiteLabelling__WEBPACK_IMPORTED_MODULE_2__.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
|
|
23488
|
+
if (wlParsed) {
|
|
23489
|
+
this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
|
|
23490
|
+
}
|
|
23491
|
+
}
|
|
23492
|
+
else {
|
|
23493
|
+
this.settings.fetchRemoteWhiteLabelling = true;
|
|
23489
23494
|
}
|
|
23490
23495
|
}
|
|
23491
23496
|
this.settings.infoButton = qs.has("i") || qs.has("info");
|
|
@@ -23494,8 +23499,7 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23494
23499
|
getWhiteLabelling(ShareId) {
|
|
23495
23500
|
return (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__awaiter)(this, void 0, void 0, function* () {
|
|
23496
23501
|
const qs = new URLSearchParams(window.location.search);
|
|
23497
|
-
|
|
23498
|
-
if (!(qs.has("wl") && qs.get("wl") === "")) {
|
|
23502
|
+
if (qs.get("wl") !== "") {
|
|
23499
23503
|
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_7__.EventHandler.Emit(this.whiteLabellingChanged, {
|
|
23500
23504
|
next: this.settings.whiteLabelling,
|
|
23501
23505
|
changed: false
|
|
@@ -23620,8 +23624,9 @@ let globalConfig = null;
|
|
|
23620
23624
|
let globalApplication = null;
|
|
23621
23625
|
let previousShareId = null;
|
|
23622
23626
|
let previousProjectId = null;
|
|
23623
|
-
function ArcwareInit(
|
|
23627
|
+
function ArcwareInit(ids, configuration, forceRefresh = false) {
|
|
23624
23628
|
var _a;
|
|
23629
|
+
const { shareId, projectId } = ids;
|
|
23625
23630
|
if (shareId && !shareId.startsWith("share-"))
|
|
23626
23631
|
throw new Error(`Unexpected shareId-format: '${shareId}'.`);
|
|
23627
23632
|
if (shareId && previousShareId !== shareId) {
|
|
@@ -23652,9 +23657,12 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23652
23657
|
}
|
|
23653
23658
|
const Config = new _ArcwareConfig__WEBPACK_IMPORTED_MODULE_0__.ArcwareConfig({
|
|
23654
23659
|
useUrlParams: (configuration === null || configuration === void 0 ? void 0 : configuration.useUrlParams) === true,
|
|
23655
|
-
initialSettings: Object.assign({ ss: _ArcwareConfig__WEBPACK_IMPORTED_MODULE_0__.DefaultUrl, AutoConnect: false,
|
|
23660
|
+
initialSettings: Object.assign({ ss: _ArcwareConfig__WEBPACK_IMPORTED_MODULE_0__.DefaultUrl, AutoConnect: false, AutoPlayVideo: true, HoveringMouse: true, ForceMonoAudio: false, FakeMouseWithTouches: false, StartVideoMuted: true, SuppressBrowserKeys: true, UseMic: true, KeyboardInput: true, MouseInput: true, TouchInput: true, GamepadInput: true, XRControllerInput: true }, configuration === null || configuration === void 0 ? void 0 : configuration.initialSettings),
|
|
23656
23661
|
settings: Object.assign({ shareId,
|
|
23657
|
-
projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false,
|
|
23662
|
+
projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: {
|
|
23663
|
+
landscape: 0,
|
|
23664
|
+
portrait: 0
|
|
23665
|
+
}, whiteLabelling: {
|
|
23658
23666
|
splashScreenUrl: undefined,
|
|
23659
23667
|
loadingIconFadeMs: undefined,
|
|
23660
23668
|
loadingIconUrl: undefined,
|
|
@@ -23687,23 +23695,23 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23687
23695
|
|
|
23688
23696
|
__webpack_require__.r(__webpack_exports__);
|
|
23689
23697
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23690
|
-
/* harmony export */ "ArcwarePixelStreaming": () => (/* binding */ ArcwarePixelStreaming)
|
|
23698
|
+
/* harmony export */ "ArcwarePixelStreaming": () => (/* binding */ ArcwarePixelStreaming),
|
|
23699
|
+
/* harmony export */ "WebsocketState": () => (/* binding */ WebsocketState)
|
|
23691
23700
|
/* harmony export */ });
|
|
23692
|
-
/* harmony import */ var
|
|
23701
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(655);
|
|
23693
23702
|
/* harmony import */ var _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7910);
|
|
23694
|
-
/* harmony import */ var
|
|
23695
|
-
/* harmony import */ var
|
|
23696
|
-
/* harmony import */ var
|
|
23697
|
-
/* harmony import */ var
|
|
23698
|
-
/* harmony import */ var
|
|
23703
|
+
/* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(516);
|
|
23704
|
+
/* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(7800);
|
|
23705
|
+
/* harmony import */ var _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7463);
|
|
23706
|
+
/* harmony import */ var _ApplyUrlHack__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4790);
|
|
23707
|
+
/* harmony import */ var _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3379);
|
|
23699
23708
|
/* harmony import */ var _domain_Stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9764);
|
|
23700
|
-
/* harmony import */ var
|
|
23701
|
-
/* harmony import */ var
|
|
23702
|
-
/* harmony import */ var
|
|
23703
|
-
/* harmony import */ var
|
|
23704
|
-
/* harmony import */ var
|
|
23705
|
-
/* harmony import */ var
|
|
23706
|
-
/* harmony import */ var _features_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2483);
|
|
23709
|
+
/* harmony import */ var _domain_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9580);
|
|
23710
|
+
/* harmony import */ var _ui_LoveLetters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4572);
|
|
23711
|
+
/* harmony import */ var _ui_ArcwareLogoLoader__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(6469);
|
|
23712
|
+
/* harmony import */ var _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3613);
|
|
23713
|
+
/* harmony import */ var _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8429);
|
|
23714
|
+
/* harmony import */ var _features_common__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2483);
|
|
23707
23715
|
|
|
23708
23716
|
|
|
23709
23717
|
|
|
@@ -23716,8 +23724,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23716
23724
|
|
|
23717
23725
|
|
|
23718
23726
|
|
|
23719
|
-
|
|
23720
|
-
|
|
23727
|
+
var WebsocketState;
|
|
23728
|
+
(function (WebsocketState) {
|
|
23729
|
+
// Socket has been created. The connection is not yet open.
|
|
23730
|
+
WebsocketState[WebsocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
23731
|
+
// The connection is open and ready to communicate.
|
|
23732
|
+
WebsocketState[WebsocketState["OPEN"] = 1] = "OPEN";
|
|
23733
|
+
// The connection is in the process of closing.
|
|
23734
|
+
WebsocketState[WebsocketState["CLOSING"] = 2] = "CLOSING";
|
|
23735
|
+
// The connection is closed or couldn't be opened.
|
|
23736
|
+
WebsocketState[WebsocketState["CLOSED"] = 3] = "CLOSED";
|
|
23737
|
+
})(WebsocketState || (WebsocketState = {}));
|
|
23738
|
+
class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_3__.PixelStreaming {
|
|
23721
23739
|
resetInitGuardsAndHooks() {
|
|
23722
23740
|
this.videoInitializedSent = false;
|
|
23723
23741
|
this._postInitSideEffectsDone = false;
|
|
@@ -23777,7 +23795,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23777
23795
|
const ws = current.webSocket;
|
|
23778
23796
|
if (ws && !this._onWsClose) {
|
|
23779
23797
|
this._onWsClose = (evt) => {
|
|
23780
|
-
|
|
23798
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler.Emit(this.websocketOnCloseHandler, evt);
|
|
23781
23799
|
};
|
|
23782
23800
|
ws.addEventListener("close", this._onWsClose);
|
|
23783
23801
|
}
|
|
@@ -23788,14 +23806,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23788
23806
|
const ws = (_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.webSocket;
|
|
23789
23807
|
return !!ws && ws.readyState === WebSocket.OPEN;
|
|
23790
23808
|
}
|
|
23791
|
-
/** Returns a list of WebSocketStates of all PixelStreaming Instances generated. */
|
|
23792
|
-
get WebsocketStates() {
|
|
23793
|
-
return _domain_ConnectionIdentifier__WEBPACK_IMPORTED_MODULE_2__.ConnectionIdentifier.Instance.GetWebSocketStates();
|
|
23794
|
-
}
|
|
23795
|
-
/** Counts all active PixelStreaming Instances generated. (CONNECTING & CONNECTED) */
|
|
23796
|
-
get ActiveInstances() {
|
|
23797
|
-
return _domain_ConnectionIdentifier__WEBPACK_IMPORTED_MODULE_2__.ConnectionIdentifier.Instance.ActiveInstances;
|
|
23798
|
-
}
|
|
23799
23809
|
/** Returns this PixelStreaming Instances websocket state. */
|
|
23800
23810
|
get websocketState() {
|
|
23801
23811
|
var _a, _b, _c;
|
|
@@ -23805,7 +23815,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23805
23815
|
constructor(config, overrides) {
|
|
23806
23816
|
var _a, _b;
|
|
23807
23817
|
/** As soon as upstream is fixed, we got to adjust the url building process. */
|
|
23808
|
-
(0,
|
|
23818
|
+
(0,_ApplyUrlHack__WEBPACK_IMPORTED_MODULE_5__.ApplyUrlHack)();
|
|
23809
23819
|
super(config, overrides);
|
|
23810
23820
|
this.loveLettersQueue = [];
|
|
23811
23821
|
this.isProcessingQueue = false;
|
|
@@ -23816,14 +23826,14 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23816
23826
|
this._rVFCsupported = "requestVideoFrameCallback" in HTMLVideoElement.prototype;
|
|
23817
23827
|
this._postInitSideEffectsDone = false;
|
|
23818
23828
|
// Externalized
|
|
23819
|
-
this.queueHandler = new
|
|
23820
|
-
this.errorHandler = new
|
|
23821
|
-
this.loveLetterHandler = new
|
|
23822
|
-
this.sessionIdHandler = new
|
|
23829
|
+
this.queueHandler = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler();
|
|
23830
|
+
this.errorHandler = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler();
|
|
23831
|
+
this.loveLetterHandler = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler();
|
|
23832
|
+
this.sessionIdHandler = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler();
|
|
23823
23833
|
/** VideoInitialized (native Epic event) */
|
|
23824
|
-
this.videoInitializedHandler = new
|
|
23834
|
+
this.videoInitializedHandler = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler();
|
|
23825
23835
|
// Internal
|
|
23826
|
-
this.websocketOnCloseHandler = new
|
|
23836
|
+
this.websocketOnCloseHandler = new _domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler();
|
|
23827
23837
|
/** Theoretically this call should be used to implement the signalling url, but this would not work at all, if config is setup for "AutoConnect=true"
|
|
23828
23838
|
* Instead we use ApplyUrlHack();
|
|
23829
23839
|
*/
|
|
@@ -23856,7 +23866,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23856
23866
|
});
|
|
23857
23867
|
// Kick off WL fetch once (if we have a shareId); on success it will emit and re-apply
|
|
23858
23868
|
if (this.config.settings.fetchRemoteWhiteLabelling) {
|
|
23859
|
-
(() => (0,
|
|
23869
|
+
(() => (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__awaiter)(this, void 0, void 0, function* () {
|
|
23860
23870
|
try {
|
|
23861
23871
|
const sid = this.config.settings.shareId;
|
|
23862
23872
|
if (sid) {
|
|
@@ -23876,8 +23886,8 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23876
23886
|
}))();
|
|
23877
23887
|
}
|
|
23878
23888
|
this.loveLettersList = [];
|
|
23879
|
-
this.microphoneOverlay = new
|
|
23880
|
-
this.diagnosticsCollector = new
|
|
23889
|
+
this.microphoneOverlay = new _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_7__.MicrophoneOverlay(this);
|
|
23890
|
+
this.diagnosticsCollector = new _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_2__.DiagnosticsCollector({
|
|
23881
23891
|
enableBandwidthProbe: false
|
|
23882
23892
|
});
|
|
23883
23893
|
// after super(...) and once webRtcController is available
|
|
@@ -23898,7 +23908,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23898
23908
|
this.addMessageHandler("version", _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZVersion, this.onVersion);
|
|
23899
23909
|
this.addMessageHandler("render", _arcware_cloud_shared_pixelstreaming_websdk__WEBPACK_IMPORTED_MODULE_0__.Messages.ZRender, this.onRender);
|
|
23900
23910
|
// Create a debounced version of the handleResolutionChange function
|
|
23901
|
-
const debouncedResolutionChange = (0,
|
|
23911
|
+
const debouncedResolutionChange = (0,_domain_debounce__WEBPACK_IMPORTED_MODULE_8__["default"])(() => {
|
|
23902
23912
|
this.handleResolutionChange();
|
|
23903
23913
|
}, 0);
|
|
23904
23914
|
// Register event listeners.
|
|
@@ -23928,7 +23938,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23928
23938
|
this.sessionIdHandler.add(this.config.settings.sessionIdHandler);
|
|
23929
23939
|
if (this.config.settings.loveLetterHandler)
|
|
23930
23940
|
this.loveLetterHandler.add(this.config.settings.loveLetterHandler);
|
|
23931
|
-
_domain_ConnectionIdentifier__WEBPACK_IMPORTED_MODULE_2__.ConnectionIdentifier.Instance.register(this);
|
|
23932
23941
|
this.removeXRIconIfDisabled();
|
|
23933
23942
|
this.handleMouseLock();
|
|
23934
23943
|
}
|
|
@@ -23944,13 +23953,13 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23944
23953
|
/** On version requested, the version of the WebSDK would be returned. */
|
|
23945
23954
|
onVersion(_msg) {
|
|
23946
23955
|
var _a, _b;
|
|
23947
|
-
return (0,
|
|
23956
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__awaiter)(this, void 0, void 0, function* () {
|
|
23948
23957
|
let diagnostics;
|
|
23949
23958
|
try {
|
|
23950
23959
|
diagnostics = yield this.diagnosticsCollector.collect();
|
|
23951
23960
|
}
|
|
23952
23961
|
catch (e) {
|
|
23953
|
-
(_a =
|
|
23962
|
+
(_a = _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Warning) === null || _a === void 0 ? void 0 : _a.call(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger, `Diagnostics collection failed: ${(_b = e === null || e === void 0 ? void 0 : e.message) !== null && _b !== void 0 ? _b : e}`);
|
|
23954
23963
|
}
|
|
23955
23964
|
finally {
|
|
23956
23965
|
const payload = {
|
|
@@ -23974,7 +23983,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
23974
23983
|
}
|
|
23975
23984
|
waitForFirstFrameWithTimeout(ms = 2000) {
|
|
23976
23985
|
var _a, _b, _c;
|
|
23977
|
-
return (0,
|
|
23986
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__awaiter)(this, void 0, void 0, function* () {
|
|
23978
23987
|
const video = (_c = (_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.videoPlayer) === null || _b === void 0 ? void 0 : _b.getVideoElement) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
23979
23988
|
if (this.isVideoRenderingNow(video))
|
|
23980
23989
|
return true;
|
|
@@ -24012,7 +24021,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24012
24021
|
});
|
|
24013
24022
|
}
|
|
24014
24023
|
onRender(_msg) {
|
|
24015
|
-
return (0,
|
|
24024
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__awaiter)(this, void 0, void 0, function* () {
|
|
24016
24025
|
const isRendering = yield this.waitForFirstFrameWithTimeout();
|
|
24017
24026
|
const payload = {
|
|
24018
24027
|
type: "render",
|
|
@@ -24032,13 +24041,13 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24032
24041
|
/** Handle incoming configurations. */
|
|
24033
24042
|
onStreamInfo(streamInfo) {
|
|
24034
24043
|
var _a, _b, _c, _d;
|
|
24035
|
-
|
|
24044
|
+
_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Info(`StreamInfo received.`);
|
|
24036
24045
|
this.streamInfo = streamInfo;
|
|
24037
24046
|
if (!((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.settings) === null || _b === void 0 ? void 0 : _b["do-not-eval-streamInfo"])) {
|
|
24038
24047
|
const { afk } = streamInfo.streamInfo;
|
|
24039
24048
|
if (afk) {
|
|
24040
|
-
this.config.setFlagEnabled(
|
|
24041
|
-
this.config.setNumericSetting(
|
|
24049
|
+
this.config.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__.Flags.AFKDetection, afk.enabled);
|
|
24050
|
+
this.config.setNumericSetting(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__.NumericParameters.AFKTimeoutSecs, afk.warn + afk.error);
|
|
24042
24051
|
// Hack
|
|
24043
24052
|
const { afkController } = this.webRtcController;
|
|
24044
24053
|
afkController.countDown = afk.action;
|
|
@@ -24050,8 +24059,6 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24050
24059
|
Object.entries(streamInfo.streamInfo.webSdkSettings.conf).forEach(([key, value]) => {
|
|
24051
24060
|
const k = key;
|
|
24052
24061
|
this.config.settings[k] = value;
|
|
24053
|
-
if (key === "connectionIdentifierLoggingDisabled" && value === true)
|
|
24054
|
-
_domain_ConnectionIdentifier__WEBPACK_IMPORTED_MODULE_2__.ConnectionIdentifier.Instance.disable();
|
|
24055
24062
|
});
|
|
24056
24063
|
}
|
|
24057
24064
|
}
|
|
@@ -24060,12 +24067,12 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24060
24067
|
this.injectCustomUI();
|
|
24061
24068
|
}
|
|
24062
24069
|
onQueue(message) {
|
|
24063
|
-
|
|
24064
|
-
|
|
24070
|
+
_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Info(`QueueInfo received.`);
|
|
24071
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler.Emit(this.queueHandler, message);
|
|
24065
24072
|
}
|
|
24066
24073
|
onError(error) {
|
|
24067
24074
|
var _a, _b;
|
|
24068
|
-
|
|
24075
|
+
_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Error(error.type);
|
|
24069
24076
|
console.log(error);
|
|
24070
24077
|
const retryable = this.isRetryableClose(error);
|
|
24071
24078
|
if (!retryable) {
|
|
@@ -24081,18 +24088,18 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24081
24088
|
// Leave your existing auto-retry behavior for transient errors
|
|
24082
24089
|
this.startTransportWatcher(); // (in case it was stopped)
|
|
24083
24090
|
}
|
|
24084
|
-
|
|
24091
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler.Emit(this.errorHandler, error);
|
|
24085
24092
|
}
|
|
24086
24093
|
onLoveLetter(loveLetter) {
|
|
24087
24094
|
if (this.config.settings.loveLetterLogging)
|
|
24088
24095
|
console.info(loveLetter.reason);
|
|
24089
|
-
|
|
24096
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler.Emit(this.loveLetterHandler, loveLetter);
|
|
24090
24097
|
this.pushLetter(loveLetter.reason);
|
|
24091
24098
|
}
|
|
24092
24099
|
onSessionId(message) {
|
|
24093
|
-
|
|
24100
|
+
_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Info(message.sessionId);
|
|
24094
24101
|
this.session.set(message.sessionId);
|
|
24095
|
-
|
|
24102
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler.Emit(this.sessionIdHandler, message.sessionId);
|
|
24096
24103
|
}
|
|
24097
24104
|
sendVideoInitializedOnce() {
|
|
24098
24105
|
if (this.videoInitializedSent)
|
|
@@ -24102,7 +24109,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24102
24109
|
this.cancelFirstRenderedFrameHook();
|
|
24103
24110
|
this.send({ type: "onVideoInitialized" });
|
|
24104
24111
|
if (this.videoInitializedHandler) {
|
|
24105
|
-
|
|
24112
|
+
_domain_EventHandler__WEBPACK_IMPORTED_MODULE_4__.EventHandler.Emit(this.videoInitializedHandler, undefined);
|
|
24106
24113
|
}
|
|
24107
24114
|
}
|
|
24108
24115
|
runPostInitSideEffectsOnce() {
|
|
@@ -24218,7 +24225,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24218
24225
|
else {
|
|
24219
24226
|
const parsedError = parsed;
|
|
24220
24227
|
const error = new Error(`Unexpected message content. Event:'${type}', ZodError: ${parsedError.error.message}`);
|
|
24221
|
-
|
|
24228
|
+
_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Error(error.message);
|
|
24222
24229
|
}
|
|
24223
24230
|
if (type === "error") {
|
|
24224
24231
|
// this.disconnect();
|
|
@@ -24242,7 +24249,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24242
24249
|
if (schema) {
|
|
24243
24250
|
const result = schema.safeParse(msg);
|
|
24244
24251
|
if (!result.success) {
|
|
24245
|
-
(_b =
|
|
24252
|
+
(_b = _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger.Error) === null || _b === void 0 ? void 0 : _b.call(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_9__.Logger, `Send validation failed for ${msg.type}: ${result.error}`);
|
|
24246
24253
|
return;
|
|
24247
24254
|
}
|
|
24248
24255
|
this._dispatchOrBuffer(result.data);
|
|
@@ -24381,7 +24388,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24381
24388
|
}
|
|
24382
24389
|
initLoveLettersContainer() {
|
|
24383
24390
|
var _a;
|
|
24384
|
-
const logoLoader = new
|
|
24391
|
+
const logoLoader = new _ui_ArcwareLogoLoader__WEBPACK_IMPORTED_MODULE_11__.ArcwareLogoLoader();
|
|
24385
24392
|
this.logoLoader = logoLoader;
|
|
24386
24393
|
if (!this.loveLettersContainer) {
|
|
24387
24394
|
const loveLettersContainer = document.createElement("div");
|
|
@@ -24419,7 +24426,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24419
24426
|
if (letter !== undefined) {
|
|
24420
24427
|
const formattedLoveLetter = letter === null || letter === void 0 ? void 0 : letter.replace(/LL: |\.$/g, "");
|
|
24421
24428
|
(_a = this === null || this === void 0 ? void 0 : this.loveLettersList) === null || _a === void 0 ? void 0 : _a.push(formattedLoveLetter);
|
|
24422
|
-
const loveLettersBox = new
|
|
24429
|
+
const loveLettersBox = new _ui_LoveLetters__WEBPACK_IMPORTED_MODULE_12__.LoveLetters();
|
|
24423
24430
|
loveLettersBox === null || loveLettersBox === void 0 ? void 0 : loveLettersBox.addLetter(formattedLoveLetter, (_b = this === null || this === void 0 ? void 0 : this.loveLettersList) === null || _b === void 0 ? void 0 : _b.length);
|
|
24424
24431
|
setTimeout(() => {
|
|
24425
24432
|
this.processLoveLetterQueue();
|
|
@@ -24462,7 +24469,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24462
24469
|
}
|
|
24463
24470
|
toggleMic(enable, isDefault) {
|
|
24464
24471
|
var _a, _b;
|
|
24465
|
-
(_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.setFlagEnabled(
|
|
24472
|
+
(_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__.Flags.UseMic, enable);
|
|
24466
24473
|
if (!isDefault) {
|
|
24467
24474
|
(_b = this === null || this === void 0 ? void 0 : this.microphoneOverlay) === null || _b === void 0 ? void 0 : _b.toggleMessage(enable);
|
|
24468
24475
|
setTimeout(() => { var _a; return (_a = this === null || this === void 0 ? void 0 : this.microphoneOverlay) === null || _a === void 0 ? void 0 : _a.toggleVisibility(true); }, 200);
|
|
@@ -24491,7 +24498,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24491
24498
|
removeXRIconIfDisabled() {
|
|
24492
24499
|
var _a, _b, _c, _d, _e;
|
|
24493
24500
|
if (!((_b = (_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.initialSettings) === null || _b === void 0 ? void 0 : _b.XRControllerInput)) {
|
|
24494
|
-
(_c = this === null || this === void 0 ? void 0 : this.config) === null || _c === void 0 ? void 0 : _c.setFlagEnabled(
|
|
24501
|
+
(_c = this === null || this === void 0 ? void 0 : this.config) === null || _c === void 0 ? void 0 : _c.setFlagEnabled(_epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_10__.Flags.XRControllerInput, false);
|
|
24495
24502
|
if (this.videoElementParent) {
|
|
24496
24503
|
if ((_d = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _d === void 0 ? void 0 : _d.parentElement) {
|
|
24497
24504
|
const xrBtn = (_e = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _e === void 0 ? void 0 : _e.parentElement.querySelector("#xrBtn");
|
|
@@ -24501,7 +24508,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24501
24508
|
}
|
|
24502
24509
|
}
|
|
24503
24510
|
injectCustomUI() {
|
|
24504
|
-
(0,
|
|
24511
|
+
(0,_features_common__WEBPACK_IMPORTED_MODULE_13__.waitForElement)("#stream-ui").then((el) => {
|
|
24505
24512
|
var _a;
|
|
24506
24513
|
const videoElementParent = (_a = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
24507
24514
|
if (videoElementParent) {
|
|
@@ -24722,14 +24729,12 @@ const ArcwareSettingsSchema = zod__WEBPACK_IMPORTED_MODULE_2__.z.object({
|
|
|
24722
24729
|
connectionStrengthIcon: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
|
|
24723
24730
|
/** ShareId, used for sharing your project.
|
|
24724
24731
|
* Using ArcwareInit will set this required property for you. */
|
|
24725
|
-
shareId: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().startsWith("share-")
|
|
24732
|
+
shareId: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().startsWith("share-"),
|
|
24726
24733
|
/** Id of your project, only required if your shareId refers to multiple projects.
|
|
24727
24734
|
* Using ArcwareInit will set this required property for you. */
|
|
24728
24735
|
projectId: zod__WEBPACK_IMPORTED_MODULE_2__.z.string().optional(),
|
|
24729
24736
|
/** Enable/Disable LoveLetter logging to the console. */
|
|
24730
24737
|
loveLetterLogging: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
|
|
24731
|
-
/** Enable/Disable Connection Identifier logging to the console. */
|
|
24732
|
-
connectionIdentifierLoggingDisabled: zod__WEBPACK_IMPORTED_MODULE_2__.z.boolean().optional(),
|
|
24733
24738
|
/** Width with which instance should be started */
|
|
24734
24739
|
startWidth: zod__WEBPACK_IMPORTED_MODULE_2__.z.number().optional(),
|
|
24735
24740
|
/** Height with which instance should be started */
|
|
@@ -24747,80 +24752,6 @@ const ArcwareSettingsSchema = zod__WEBPACK_IMPORTED_MODULE_2__.z.object({
|
|
|
24747
24752
|
});
|
|
24748
24753
|
|
|
24749
24754
|
|
|
24750
|
-
/***/ }),
|
|
24751
|
-
|
|
24752
|
-
/***/ 5999:
|
|
24753
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
24754
|
-
|
|
24755
|
-
__webpack_require__.r(__webpack_exports__);
|
|
24756
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24757
|
-
/* harmony export */ "ConnectionIdentifier": () => (/* binding */ ConnectionIdentifier),
|
|
24758
|
-
/* harmony export */ "WebsocketState": () => (/* binding */ WebsocketState)
|
|
24759
|
-
/* harmony export */ });
|
|
24760
|
-
var WebsocketState;
|
|
24761
|
-
(function (WebsocketState) {
|
|
24762
|
-
// Socket has been created. The connection is not yet open.
|
|
24763
|
-
WebsocketState[WebsocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
24764
|
-
// The connection is open and ready to communicate.
|
|
24765
|
-
WebsocketState[WebsocketState["OPEN"] = 1] = "OPEN";
|
|
24766
|
-
// The connection is in the process of closing.
|
|
24767
|
-
WebsocketState[WebsocketState["CLOSING"] = 2] = "CLOSING";
|
|
24768
|
-
// The connection is closed or couldn't be opened.
|
|
24769
|
-
WebsocketState[WebsocketState["CLOSED"] = 3] = "CLOSED";
|
|
24770
|
-
})(WebsocketState || (WebsocketState = {}));
|
|
24771
|
-
class ConnectionIdentifier {
|
|
24772
|
-
static get Instance() {
|
|
24773
|
-
if (!this.instance) {
|
|
24774
|
-
this.instance = new ConnectionIdentifier();
|
|
24775
|
-
}
|
|
24776
|
-
return this.instance;
|
|
24777
|
-
}
|
|
24778
|
-
get WebsocketStates() {
|
|
24779
|
-
return this.aps.map((ps) => ps.websocketState);
|
|
24780
|
-
}
|
|
24781
|
-
constructor() {
|
|
24782
|
-
this.aps = [];
|
|
24783
|
-
this.enabled = true;
|
|
24784
|
-
}
|
|
24785
|
-
register(ps) {
|
|
24786
|
-
var _a;
|
|
24787
|
-
if (!this.aps.includes(ps)) {
|
|
24788
|
-
this.aps.push(ps);
|
|
24789
|
-
if ((_a = ps.config.settings) === null || _a === void 0 ? void 0 : _a.connectionIdentifierLoggingDisabled)
|
|
24790
|
-
this.disable();
|
|
24791
|
-
}
|
|
24792
|
-
if (!this.interval)
|
|
24793
|
-
this.interval = setInterval(this.connectionWatcher.bind(this), 10 * 1000);
|
|
24794
|
-
}
|
|
24795
|
-
GetWebSocketStates() {
|
|
24796
|
-
return this.aps.map((ps) => ps.websocketState);
|
|
24797
|
-
}
|
|
24798
|
-
ActiveInstances() {
|
|
24799
|
-
return this.GetWebSocketStates().filter((state) => state <= WebsocketState.OPEN).length;
|
|
24800
|
-
}
|
|
24801
|
-
disable() {
|
|
24802
|
-
this.enabled = false;
|
|
24803
|
-
}
|
|
24804
|
-
/**
|
|
24805
|
-
* The purpose of this method is to periodically tell the developer the amount of connected instances.
|
|
24806
|
-
* This way the developer can figure out, when they messed up the implementation and there's shadow instances still running.
|
|
24807
|
-
* Or when they accidentally set up multiple connections!
|
|
24808
|
-
* Things like that can happen, for example if the React.useEffect was not setup perfectly!
|
|
24809
|
-
*/
|
|
24810
|
-
connectionWatcher() {
|
|
24811
|
-
if (!this.enabled)
|
|
24812
|
-
return;
|
|
24813
|
-
const activeStates = this.GetWebSocketStates().filter((state) => state <= WebsocketState.OPEN);
|
|
24814
|
-
if (activeStates.length === 1) {
|
|
24815
|
-
//console.log(`PixelStreaming Instance is connected.`);
|
|
24816
|
-
}
|
|
24817
|
-
else if (activeStates.length !== 0) {
|
|
24818
|
-
console.warn(`${activeStates.length} PixelStreaming Instances are connected!`);
|
|
24819
|
-
}
|
|
24820
|
-
}
|
|
24821
|
-
}
|
|
24822
|
-
|
|
24823
|
-
|
|
24824
24755
|
/***/ }),
|
|
24825
24756
|
|
|
24826
24757
|
/***/ 3379:
|
|
@@ -25760,7 +25691,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25760
25691
|
/* harmony export */ "ArcwareInit": () => (/* reexport safe */ _ArcwareInit__WEBPACK_IMPORTED_MODULE_3__.ArcwareInit),
|
|
25761
25692
|
/* harmony export */ "ArcwarePixelStreaming": () => (/* reexport safe */ _ArcwarePixelStreaming__WEBPACK_IMPORTED_MODULE_2__.ArcwarePixelStreaming),
|
|
25762
25693
|
/* harmony export */ "ArcwareStyles": () => (/* reexport safe */ _styles_ArcwarePixelStreamingApplicationStyles__WEBPACK_IMPORTED_MODULE_4__.ArcwareStyles),
|
|
25763
|
-
/* harmony export */ "DefaultUrl": () => (/* reexport safe */ _ArcwareConfig__WEBPACK_IMPORTED_MODULE_1__.DefaultUrl)
|
|
25694
|
+
/* harmony export */ "DefaultUrl": () => (/* reexport safe */ _ArcwareConfig__WEBPACK_IMPORTED_MODULE_1__.DefaultUrl),
|
|
25695
|
+
/* harmony export */ "WebsocketState": () => (/* reexport safe */ _ArcwarePixelStreaming__WEBPACK_IMPORTED_MODULE_2__.WebsocketState)
|
|
25764
25696
|
/* harmony export */ });
|
|
25765
25697
|
/* harmony import */ var _ArcwareApplication__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9783);
|
|
25766
25698
|
/* harmony import */ var _ArcwareConfig__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3995);
|
|
@@ -32335,6 +32267,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32335
32267
|
/* harmony export */ "WebSocketTransport": () => (/* reexport safe */ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_0__.WebSocketTransport),
|
|
32336
32268
|
/* harmony export */ "WebSocketTransportNJS": () => (/* reexport safe */ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_0__.WebSocketTransportNJS),
|
|
32337
32269
|
/* harmony export */ "WebXRController": () => (/* reexport safe */ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_0__.WebXRController),
|
|
32270
|
+
/* harmony export */ "WebsocketState": () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_2__.WebsocketState),
|
|
32338
32271
|
/* harmony export */ "XrFrameEvent": () => (/* reexport safe */ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_0__.XrFrameEvent),
|
|
32339
32272
|
/* harmony export */ "XrSessionEndedEvent": () => (/* reexport safe */ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_0__.XrSessionEndedEvent),
|
|
32340
32273
|
/* harmony export */ "XrSessionStartedEvent": () => (/* reexport safe */ _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBPACK_IMPORTED_MODULE_0__.XrSessionStartedEvent),
|
|
@@ -32462,6 +32395,7 @@ var __webpack_exports__WebRtcTCPRelayDetectedEvent = __webpack_exports__.WebRtcT
|
|
|
32462
32395
|
var __webpack_exports__WebSocketTransport = __webpack_exports__.WebSocketTransport;
|
|
32463
32396
|
var __webpack_exports__WebSocketTransportNJS = __webpack_exports__.WebSocketTransportNJS;
|
|
32464
32397
|
var __webpack_exports__WebXRController = __webpack_exports__.WebXRController;
|
|
32398
|
+
var __webpack_exports__WebsocketState = __webpack_exports__.WebsocketState;
|
|
32465
32399
|
var __webpack_exports__XrFrameEvent = __webpack_exports__.XrFrameEvent;
|
|
32466
32400
|
var __webpack_exports__XrSessionEndedEvent = __webpack_exports__.XrSessionEndedEvent;
|
|
32467
32401
|
var __webpack_exports__XrSessionStartedEvent = __webpack_exports__.XrSessionStartedEvent;
|
|
@@ -32470,4 +32404,4 @@ var __webpack_exports__isNumericId = __webpack_exports__.isNumericId;
|
|
|
32470
32404
|
var __webpack_exports__isOptionId = __webpack_exports__.isOptionId;
|
|
32471
32405
|
var __webpack_exports__isTextId = __webpack_exports__.isTextId;
|
|
32472
32406
|
var __webpack_exports__overrideLogger = __webpack_exports__.overrideLogger;
|
|
32473
|
-
export { __webpack_exports__AFKOverlay as AFKOverlay, __webpack_exports__ActionOverlay as ActionOverlay, __webpack_exports__AfkLogic as AfkLogic, __webpack_exports__AfkTimedOutEvent as AfkTimedOutEvent, __webpack_exports__AfkWarningActivateEvent as AfkWarningActivateEvent, __webpack_exports__AfkWarningDeactivateEvent as AfkWarningDeactivateEvent, __webpack_exports__AfkWarningUpdateEvent as AfkWarningUpdateEvent, __webpack_exports__AggregatedStats as AggregatedStats, __webpack_exports__Application as Application, __webpack_exports__ArcwareApplication as ArcwareApplication, __webpack_exports__ArcwareConfig as ArcwareConfig, __webpack_exports__ArcwareInit as ArcwareInit, __webpack_exports__ArcwarePixelStreaming as ArcwarePixelStreaming, __webpack_exports__ArcwareStyles as ArcwareStyles, __webpack_exports__CandidatePairStats as CandidatePairStats, __webpack_exports__CandidateStat as CandidateStat, __webpack_exports__Config as Config, __webpack_exports__ConfigUI as ConfigUI, __webpack_exports__ConnectOverlay as ConnectOverlay, __webpack_exports__ControlSchemeType as ControlSchemeType, __webpack_exports__DataChannelCloseEvent as DataChannelCloseEvent, __webpack_exports__DataChannelErrorEvent as DataChannelErrorEvent, __webpack_exports__DataChannelLatencyTestRecord as DataChannelLatencyTestRecord, __webpack_exports__DataChannelLatencyTestResponseEvent as DataChannelLatencyTestResponseEvent, __webpack_exports__DataChannelLatencyTestResultEvent as DataChannelLatencyTestResultEvent, __webpack_exports__DataChannelOpenEvent as DataChannelOpenEvent, __webpack_exports__DataChannelStats as DataChannelStats, __webpack_exports__DefaultUrl as DefaultUrl, __webpack_exports__DisconnectOverlay as DisconnectOverlay, __webpack_exports__EncoderSettings as EncoderSettings, __webpack_exports__ErrorOverlay as ErrorOverlay, __webpack_exports__EventEmitter as EventEmitter, __webpack_exports__Flags as Flags, __webpack_exports__FrameTimingInfo as FrameTimingInfo, __webpack_exports__HideFreezeFrameEvent as HideFreezeFrameEvent, __webpack_exports__InboundAudioStats as InboundAudioStats, __webpack_exports__InboundVideoStats as InboundVideoStats, __webpack_exports__InfoOverlay as InfoOverlay, __webpack_exports__InitialSettings as InitialSettings, __webpack_exports__InitialSettingsEvent as InitialSettingsEvent, __webpack_exports__InputCoordTranslator as InputCoordTranslator, __webpack_exports__KeepaliveMonitor as KeepaliveMonitor, __webpack_exports__LatencyCalculatedEvent as LatencyCalculatedEvent, __webpack_exports__LatencyCalculator as LatencyCalculator, __webpack_exports__LatencyInfo as LatencyInfo, __webpack_exports__LatencyTestResultEvent as LatencyTestResultEvent, __webpack_exports__LatencyTestResults as LatencyTestResults, __webpack_exports__LoadFreezeFrameEvent as LoadFreezeFrameEvent, __webpack_exports__LogLevel as LogLevel, __webpack_exports__Logger as Logger, __webpack_exports__MessageDirection as MessageDirection, __webpack_exports__MessageHelpers as MessageHelpers, __webpack_exports__MessageRegistry as MessageRegistry, __webpack_exports__Messages as Messages, __webpack_exports__NumericParameters as NumericParameters, __webpack_exports__OptionParameters as OptionParameters, __webpack_exports__OutboundRTPStats as OutboundRTPStats, __webpack_exports__OverlayBase as OverlayBase, __webpack_exports__PixelStreaming as PixelStreaming, __webpack_exports__PixelStreamingApplicationStyle as PixelStreamingApplicationStyle, __webpack_exports__PixelStreamingEventEmitter as PixelStreamingEventEmitter, __webpack_exports__PixelStreamingSettings as PixelStreamingSettings, __webpack_exports__PlayOverlay as PlayOverlay, __webpack_exports__PlayStreamErrorEvent as PlayStreamErrorEvent, __webpack_exports__PlayStreamEvent as PlayStreamEvent, __webpack_exports__PlayStreamRejectedEvent as PlayStreamRejectedEvent, __webpack_exports__PlayerCountEvent as PlayerCountEvent, __webpack_exports__RemoteOutboundRTPStats as RemoteOutboundRTPStats, __webpack_exports__SDPUtils as SDPUtils, __webpack_exports__SettingBase as SettingBase, __webpack_exports__SettingFlag as SettingFlag, __webpack_exports__SettingNumber as SettingNumber, __webpack_exports__SettingOption as SettingOption, __webpack_exports__SettingText as SettingText, __webpack_exports__SettingUIBase as SettingUIBase, __webpack_exports__SettingUIFlag as SettingUIFlag, __webpack_exports__SettingUINumber as SettingUINumber, __webpack_exports__SettingUIOption as SettingUIOption, __webpack_exports__SettingUIText as SettingUIText, __webpack_exports__SettingsChangedEvent as SettingsChangedEvent, __webpack_exports__ShowOnScreenKeyboardEvent as ShowOnScreenKeyboardEvent, __webpack_exports__SignallingProtocol as SignallingProtocol, __webpack_exports__StatsReceivedEvent as StatsReceivedEvent, __webpack_exports__StreamLoadingEvent as StreamLoadingEvent, __webpack_exports__StreamPreConnectEvent as StreamPreConnectEvent, __webpack_exports__StreamPreDisconnectEvent as StreamPreDisconnectEvent, __webpack_exports__StreamReconnectEvent as StreamReconnectEvent, __webpack_exports__StreamerIDChangedMessageEvent as StreamerIDChangedMessageEvent, __webpack_exports__StreamerListMessageEvent as StreamerListMessageEvent, __webpack_exports__SubscribeFailedEvent as SubscribeFailedEvent, __webpack_exports__TextOverlay as TextOverlay, __webpack_exports__TextParameters as TextParameters, __webpack_exports__UIElementCreationMode as UIElementCreationMode, __webpack_exports__VideoEncoderAvgQPEvent as VideoEncoderAvgQPEvent, __webpack_exports__VideoInitializedEvent as VideoInitializedEvent, __webpack_exports__WebRTCSettings as WebRTCSettings, __webpack_exports__WebRtcAutoConnectEvent as WebRtcAutoConnectEvent, __webpack_exports__WebRtcConnectedEvent as WebRtcConnectedEvent, __webpack_exports__WebRtcConnectingEvent as WebRtcConnectingEvent, __webpack_exports__WebRtcDisconnectedEvent as WebRtcDisconnectedEvent, __webpack_exports__WebRtcFailedEvent as WebRtcFailedEvent, __webpack_exports__WebRtcPlayerController as WebRtcPlayerController, __webpack_exports__WebRtcSdpAnswerEvent as WebRtcSdpAnswerEvent, __webpack_exports__WebRtcSdpEvent as WebRtcSdpEvent, __webpack_exports__WebRtcSdpOfferEvent as WebRtcSdpOfferEvent, __webpack_exports__WebRtcTCPRelayDetectedEvent as WebRtcTCPRelayDetectedEvent, __webpack_exports__WebSocketTransport as WebSocketTransport, __webpack_exports__WebSocketTransportNJS as WebSocketTransportNJS, __webpack_exports__WebXRController as WebXRController, __webpack_exports__XrFrameEvent as XrFrameEvent, __webpack_exports__XrSessionEndedEvent as XrSessionEndedEvent, __webpack_exports__XrSessionStartedEvent as XrSessionStartedEvent, __webpack_exports__isFlagId as isFlagId, __webpack_exports__isNumericId as isNumericId, __webpack_exports__isOptionId as isOptionId, __webpack_exports__isTextId as isTextId, __webpack_exports__overrideLogger as overrideLogger };
|
|
32407
|
+
export { __webpack_exports__AFKOverlay as AFKOverlay, __webpack_exports__ActionOverlay as ActionOverlay, __webpack_exports__AfkLogic as AfkLogic, __webpack_exports__AfkTimedOutEvent as AfkTimedOutEvent, __webpack_exports__AfkWarningActivateEvent as AfkWarningActivateEvent, __webpack_exports__AfkWarningDeactivateEvent as AfkWarningDeactivateEvent, __webpack_exports__AfkWarningUpdateEvent as AfkWarningUpdateEvent, __webpack_exports__AggregatedStats as AggregatedStats, __webpack_exports__Application as Application, __webpack_exports__ArcwareApplication as ArcwareApplication, __webpack_exports__ArcwareConfig as ArcwareConfig, __webpack_exports__ArcwareInit as ArcwareInit, __webpack_exports__ArcwarePixelStreaming as ArcwarePixelStreaming, __webpack_exports__ArcwareStyles as ArcwareStyles, __webpack_exports__CandidatePairStats as CandidatePairStats, __webpack_exports__CandidateStat as CandidateStat, __webpack_exports__Config as Config, __webpack_exports__ConfigUI as ConfigUI, __webpack_exports__ConnectOverlay as ConnectOverlay, __webpack_exports__ControlSchemeType as ControlSchemeType, __webpack_exports__DataChannelCloseEvent as DataChannelCloseEvent, __webpack_exports__DataChannelErrorEvent as DataChannelErrorEvent, __webpack_exports__DataChannelLatencyTestRecord as DataChannelLatencyTestRecord, __webpack_exports__DataChannelLatencyTestResponseEvent as DataChannelLatencyTestResponseEvent, __webpack_exports__DataChannelLatencyTestResultEvent as DataChannelLatencyTestResultEvent, __webpack_exports__DataChannelOpenEvent as DataChannelOpenEvent, __webpack_exports__DataChannelStats as DataChannelStats, __webpack_exports__DefaultUrl as DefaultUrl, __webpack_exports__DisconnectOverlay as DisconnectOverlay, __webpack_exports__EncoderSettings as EncoderSettings, __webpack_exports__ErrorOverlay as ErrorOverlay, __webpack_exports__EventEmitter as EventEmitter, __webpack_exports__Flags as Flags, __webpack_exports__FrameTimingInfo as FrameTimingInfo, __webpack_exports__HideFreezeFrameEvent as HideFreezeFrameEvent, __webpack_exports__InboundAudioStats as InboundAudioStats, __webpack_exports__InboundVideoStats as InboundVideoStats, __webpack_exports__InfoOverlay as InfoOverlay, __webpack_exports__InitialSettings as InitialSettings, __webpack_exports__InitialSettingsEvent as InitialSettingsEvent, __webpack_exports__InputCoordTranslator as InputCoordTranslator, __webpack_exports__KeepaliveMonitor as KeepaliveMonitor, __webpack_exports__LatencyCalculatedEvent as LatencyCalculatedEvent, __webpack_exports__LatencyCalculator as LatencyCalculator, __webpack_exports__LatencyInfo as LatencyInfo, __webpack_exports__LatencyTestResultEvent as LatencyTestResultEvent, __webpack_exports__LatencyTestResults as LatencyTestResults, __webpack_exports__LoadFreezeFrameEvent as LoadFreezeFrameEvent, __webpack_exports__LogLevel as LogLevel, __webpack_exports__Logger as Logger, __webpack_exports__MessageDirection as MessageDirection, __webpack_exports__MessageHelpers as MessageHelpers, __webpack_exports__MessageRegistry as MessageRegistry, __webpack_exports__Messages as Messages, __webpack_exports__NumericParameters as NumericParameters, __webpack_exports__OptionParameters as OptionParameters, __webpack_exports__OutboundRTPStats as OutboundRTPStats, __webpack_exports__OverlayBase as OverlayBase, __webpack_exports__PixelStreaming as PixelStreaming, __webpack_exports__PixelStreamingApplicationStyle as PixelStreamingApplicationStyle, __webpack_exports__PixelStreamingEventEmitter as PixelStreamingEventEmitter, __webpack_exports__PixelStreamingSettings as PixelStreamingSettings, __webpack_exports__PlayOverlay as PlayOverlay, __webpack_exports__PlayStreamErrorEvent as PlayStreamErrorEvent, __webpack_exports__PlayStreamEvent as PlayStreamEvent, __webpack_exports__PlayStreamRejectedEvent as PlayStreamRejectedEvent, __webpack_exports__PlayerCountEvent as PlayerCountEvent, __webpack_exports__RemoteOutboundRTPStats as RemoteOutboundRTPStats, __webpack_exports__SDPUtils as SDPUtils, __webpack_exports__SettingBase as SettingBase, __webpack_exports__SettingFlag as SettingFlag, __webpack_exports__SettingNumber as SettingNumber, __webpack_exports__SettingOption as SettingOption, __webpack_exports__SettingText as SettingText, __webpack_exports__SettingUIBase as SettingUIBase, __webpack_exports__SettingUIFlag as SettingUIFlag, __webpack_exports__SettingUINumber as SettingUINumber, __webpack_exports__SettingUIOption as SettingUIOption, __webpack_exports__SettingUIText as SettingUIText, __webpack_exports__SettingsChangedEvent as SettingsChangedEvent, __webpack_exports__ShowOnScreenKeyboardEvent as ShowOnScreenKeyboardEvent, __webpack_exports__SignallingProtocol as SignallingProtocol, __webpack_exports__StatsReceivedEvent as StatsReceivedEvent, __webpack_exports__StreamLoadingEvent as StreamLoadingEvent, __webpack_exports__StreamPreConnectEvent as StreamPreConnectEvent, __webpack_exports__StreamPreDisconnectEvent as StreamPreDisconnectEvent, __webpack_exports__StreamReconnectEvent as StreamReconnectEvent, __webpack_exports__StreamerIDChangedMessageEvent as StreamerIDChangedMessageEvent, __webpack_exports__StreamerListMessageEvent as StreamerListMessageEvent, __webpack_exports__SubscribeFailedEvent as SubscribeFailedEvent, __webpack_exports__TextOverlay as TextOverlay, __webpack_exports__TextParameters as TextParameters, __webpack_exports__UIElementCreationMode as UIElementCreationMode, __webpack_exports__VideoEncoderAvgQPEvent as VideoEncoderAvgQPEvent, __webpack_exports__VideoInitializedEvent as VideoInitializedEvent, __webpack_exports__WebRTCSettings as WebRTCSettings, __webpack_exports__WebRtcAutoConnectEvent as WebRtcAutoConnectEvent, __webpack_exports__WebRtcConnectedEvent as WebRtcConnectedEvent, __webpack_exports__WebRtcConnectingEvent as WebRtcConnectingEvent, __webpack_exports__WebRtcDisconnectedEvent as WebRtcDisconnectedEvent, __webpack_exports__WebRtcFailedEvent as WebRtcFailedEvent, __webpack_exports__WebRtcPlayerController as WebRtcPlayerController, __webpack_exports__WebRtcSdpAnswerEvent as WebRtcSdpAnswerEvent, __webpack_exports__WebRtcSdpEvent as WebRtcSdpEvent, __webpack_exports__WebRtcSdpOfferEvent as WebRtcSdpOfferEvent, __webpack_exports__WebRtcTCPRelayDetectedEvent as WebRtcTCPRelayDetectedEvent, __webpack_exports__WebSocketTransport as WebSocketTransport, __webpack_exports__WebSocketTransportNJS as WebSocketTransportNJS, __webpack_exports__WebXRController as WebXRController, __webpack_exports__WebsocketState as WebsocketState, __webpack_exports__XrFrameEvent as XrFrameEvent, __webpack_exports__XrSessionEndedEvent as XrSessionEndedEvent, __webpack_exports__XrSessionStartedEvent as XrSessionStartedEvent, __webpack_exports__isFlagId as isFlagId, __webpack_exports__isNumericId as isNumericId, __webpack_exports__isOptionId as isOptionId, __webpack_exports__isTextId as isTextId, __webpack_exports__overrideLogger as overrideLogger };
|
package/index.umd.js
CHANGED
|
@@ -23462,7 +23462,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23462
23462
|
if (!config.initialSettings.ss)
|
|
23463
23463
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23464
23464
|
super(config);
|
|
23465
|
-
this.VERSION = "1.3.
|
|
23465
|
+
this.VERSION = "1.3.21";
|
|
23466
23466
|
this.whiteLabellingChanged = new EventHandler_1.EventHandler();
|
|
23467
23467
|
this.signallingWlURL = "https://signalling-client.arcware.cloud/whiteLabel/";
|
|
23468
23468
|
if (config.envName) {
|
|
@@ -23479,11 +23479,16 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23479
23479
|
if (this.useUrlParams) {
|
|
23480
23480
|
// Get the query string from URL
|
|
23481
23481
|
const qs = new URLSearchParams(window.location.search);
|
|
23482
|
-
if (qs.has("wl")
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23482
|
+
if (qs.has("wl")) {
|
|
23483
|
+
if (qs.get("wl") !== "") {
|
|
23484
|
+
// Retrieve image loading from there
|
|
23485
|
+
const wlParsed = this.useUrlParams ? (0, whiteLabelling_1.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
|
|
23486
|
+
if (wlParsed) {
|
|
23487
|
+
this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
|
|
23488
|
+
}
|
|
23489
|
+
}
|
|
23490
|
+
else {
|
|
23491
|
+
this.settings.fetchRemoteWhiteLabelling = true;
|
|
23487
23492
|
}
|
|
23488
23493
|
}
|
|
23489
23494
|
this.settings.infoButton = qs.has("i") || qs.has("info");
|
|
@@ -23492,8 +23497,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23492
23497
|
getWhiteLabelling(ShareId) {
|
|
23493
23498
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
23494
23499
|
const qs = new URLSearchParams(window.location.search);
|
|
23495
|
-
|
|
23496
|
-
if (!(qs.has("wl") && qs.get("wl") === "")) {
|
|
23500
|
+
if (qs.get("wl") !== "") {
|
|
23497
23501
|
EventHandler_1.EventHandler.Emit(this.whiteLabellingChanged, {
|
|
23498
23502
|
next: this.settings.whiteLabelling,
|
|
23499
23503
|
changed: false
|
|
@@ -23615,8 +23619,9 @@ let globalConfig = null;
|
|
|
23615
23619
|
let globalApplication = null;
|
|
23616
23620
|
let previousShareId = null;
|
|
23617
23621
|
let previousProjectId = null;
|
|
23618
|
-
function ArcwareInit(
|
|
23622
|
+
function ArcwareInit(ids, configuration, forceRefresh = false) {
|
|
23619
23623
|
var _a;
|
|
23624
|
+
const { shareId, projectId } = ids;
|
|
23620
23625
|
if (shareId && !shareId.startsWith("share-"))
|
|
23621
23626
|
throw new Error(`Unexpected shareId-format: '${shareId}'.`);
|
|
23622
23627
|
if (shareId && previousShareId !== shareId) {
|
|
@@ -23647,9 +23652,12 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
|
|
|
23647
23652
|
}
|
|
23648
23653
|
const Config = new ArcwareConfig_1.ArcwareConfig({
|
|
23649
23654
|
useUrlParams: (configuration === null || configuration === void 0 ? void 0 : configuration.useUrlParams) === true,
|
|
23650
|
-
initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false,
|
|
23655
|
+
initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false, AutoPlayVideo: true, HoveringMouse: true, ForceMonoAudio: false, FakeMouseWithTouches: false, StartVideoMuted: true, SuppressBrowserKeys: true, UseMic: true, KeyboardInput: true, MouseInput: true, TouchInput: true, GamepadInput: true, XRControllerInput: true }, configuration === null || configuration === void 0 ? void 0 : configuration.initialSettings),
|
|
23651
23656
|
settings: Object.assign({ shareId,
|
|
23652
|
-
projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false,
|
|
23657
|
+
projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: {
|
|
23658
|
+
landscape: 0,
|
|
23659
|
+
portrait: 0
|
|
23660
|
+
}, whiteLabelling: {
|
|
23653
23661
|
splashScreenUrl: undefined,
|
|
23654
23662
|
loadingIconFadeMs: undefined,
|
|
23655
23663
|
loadingIconUrl: undefined,
|
|
@@ -23683,7 +23691,7 @@ exports.ArcwareInit = ArcwareInit;
|
|
|
23683
23691
|
|
|
23684
23692
|
|
|
23685
23693
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
23686
|
-
exports.ArcwarePixelStreaming = void 0;
|
|
23694
|
+
exports.ArcwarePixelStreaming = exports.WebsocketState = void 0;
|
|
23687
23695
|
const tslib_1 = __webpack_require__(655);
|
|
23688
23696
|
const shared_pixelstreaming_websdk_1 = __webpack_require__(7910);
|
|
23689
23697
|
const lib_pixelstreamingfrontend_ue5_5_1 = __webpack_require__(693);
|
|
@@ -23694,9 +23702,19 @@ const debounce_1 = __webpack_require__(9580);
|
|
|
23694
23702
|
const LoveLetters_1 = __webpack_require__(4572);
|
|
23695
23703
|
const ArcwareLogoLoader_1 = __webpack_require__(6469);
|
|
23696
23704
|
const MicrophoneOverlay_1 = __webpack_require__(3613);
|
|
23697
|
-
const ConnectionIdentifier_1 = __webpack_require__(5999);
|
|
23698
23705
|
const DiagnosticsCollector_1 = __webpack_require__(8429);
|
|
23699
23706
|
const common_1 = __webpack_require__(2483);
|
|
23707
|
+
var WebsocketState;
|
|
23708
|
+
(function (WebsocketState) {
|
|
23709
|
+
// Socket has been created. The connection is not yet open.
|
|
23710
|
+
WebsocketState[WebsocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
23711
|
+
// The connection is open and ready to communicate.
|
|
23712
|
+
WebsocketState[WebsocketState["OPEN"] = 1] = "OPEN";
|
|
23713
|
+
// The connection is in the process of closing.
|
|
23714
|
+
WebsocketState[WebsocketState["CLOSING"] = 2] = "CLOSING";
|
|
23715
|
+
// The connection is closed or couldn't be opened.
|
|
23716
|
+
WebsocketState[WebsocketState["CLOSED"] = 3] = "CLOSED";
|
|
23717
|
+
})(WebsocketState = exports.WebsocketState || (exports.WebsocketState = {}));
|
|
23700
23718
|
class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStreaming {
|
|
23701
23719
|
resetInitGuardsAndHooks() {
|
|
23702
23720
|
this.videoInitializedSent = false;
|
|
@@ -23768,14 +23786,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23768
23786
|
const ws = (_b = (_a = this.webRtcController) === null || _a === void 0 ? void 0 : _a.transport) === null || _b === void 0 ? void 0 : _b.webSocket;
|
|
23769
23787
|
return !!ws && ws.readyState === WebSocket.OPEN;
|
|
23770
23788
|
}
|
|
23771
|
-
/** Returns a list of WebSocketStates of all PixelStreaming Instances generated. */
|
|
23772
|
-
get WebsocketStates() {
|
|
23773
|
-
return ConnectionIdentifier_1.ConnectionIdentifier.Instance.GetWebSocketStates();
|
|
23774
|
-
}
|
|
23775
|
-
/** Counts all active PixelStreaming Instances generated. (CONNECTING & CONNECTED) */
|
|
23776
|
-
get ActiveInstances() {
|
|
23777
|
-
return ConnectionIdentifier_1.ConnectionIdentifier.Instance.ActiveInstances;
|
|
23778
|
-
}
|
|
23779
23789
|
/** Returns this PixelStreaming Instances websocket state. */
|
|
23780
23790
|
get websocketState() {
|
|
23781
23791
|
var _a, _b, _c;
|
|
@@ -23908,7 +23918,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
23908
23918
|
this.sessionIdHandler.add(this.config.settings.sessionIdHandler);
|
|
23909
23919
|
if (this.config.settings.loveLetterHandler)
|
|
23910
23920
|
this.loveLetterHandler.add(this.config.settings.loveLetterHandler);
|
|
23911
|
-
ConnectionIdentifier_1.ConnectionIdentifier.Instance.register(this);
|
|
23912
23921
|
this.removeXRIconIfDisabled();
|
|
23913
23922
|
this.handleMouseLock();
|
|
23914
23923
|
}
|
|
@@ -24030,8 +24039,6 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24030
24039
|
Object.entries(streamInfo.streamInfo.webSdkSettings.conf).forEach(([key, value]) => {
|
|
24031
24040
|
const k = key;
|
|
24032
24041
|
this.config.settings[k] = value;
|
|
24033
|
-
if (key === "connectionIdentifierLoggingDisabled" && value === true)
|
|
24034
|
-
ConnectionIdentifier_1.ConnectionIdentifier.Instance.disable();
|
|
24035
24042
|
});
|
|
24036
24043
|
}
|
|
24037
24044
|
}
|
|
@@ -24699,14 +24706,12 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
|
|
|
24699
24706
|
connectionStrengthIcon: zod_1.z.boolean().optional(),
|
|
24700
24707
|
/** ShareId, used for sharing your project.
|
|
24701
24708
|
* Using ArcwareInit will set this required property for you. */
|
|
24702
|
-
shareId: zod_1.z.string().startsWith("share-")
|
|
24709
|
+
shareId: zod_1.z.string().startsWith("share-"),
|
|
24703
24710
|
/** Id of your project, only required if your shareId refers to multiple projects.
|
|
24704
24711
|
* Using ArcwareInit will set this required property for you. */
|
|
24705
24712
|
projectId: zod_1.z.string().optional(),
|
|
24706
24713
|
/** Enable/Disable LoveLetter logging to the console. */
|
|
24707
24714
|
loveLetterLogging: zod_1.z.boolean().optional(),
|
|
24708
|
-
/** Enable/Disable Connection Identifier logging to the console. */
|
|
24709
|
-
connectionIdentifierLoggingDisabled: zod_1.z.boolean().optional(),
|
|
24710
24715
|
/** Width with which instance should be started */
|
|
24711
24716
|
startWidth: zod_1.z.number().optional(),
|
|
24712
24717
|
/** Height with which instance should be started */
|
|
@@ -24725,79 +24730,6 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
|
|
|
24725
24730
|
});
|
|
24726
24731
|
|
|
24727
24732
|
|
|
24728
|
-
/***/ }),
|
|
24729
|
-
|
|
24730
|
-
/***/ 5999:
|
|
24731
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
24735
|
-
exports.ConnectionIdentifier = exports.WebsocketState = void 0;
|
|
24736
|
-
var WebsocketState;
|
|
24737
|
-
(function (WebsocketState) {
|
|
24738
|
-
// Socket has been created. The connection is not yet open.
|
|
24739
|
-
WebsocketState[WebsocketState["CONNECTING"] = 0] = "CONNECTING";
|
|
24740
|
-
// The connection is open and ready to communicate.
|
|
24741
|
-
WebsocketState[WebsocketState["OPEN"] = 1] = "OPEN";
|
|
24742
|
-
// The connection is in the process of closing.
|
|
24743
|
-
WebsocketState[WebsocketState["CLOSING"] = 2] = "CLOSING";
|
|
24744
|
-
// The connection is closed or couldn't be opened.
|
|
24745
|
-
WebsocketState[WebsocketState["CLOSED"] = 3] = "CLOSED";
|
|
24746
|
-
})(WebsocketState = exports.WebsocketState || (exports.WebsocketState = {}));
|
|
24747
|
-
class ConnectionIdentifier {
|
|
24748
|
-
static get Instance() {
|
|
24749
|
-
if (!this.instance) {
|
|
24750
|
-
this.instance = new ConnectionIdentifier();
|
|
24751
|
-
}
|
|
24752
|
-
return this.instance;
|
|
24753
|
-
}
|
|
24754
|
-
get WebsocketStates() {
|
|
24755
|
-
return this.aps.map((ps) => ps.websocketState);
|
|
24756
|
-
}
|
|
24757
|
-
constructor() {
|
|
24758
|
-
this.aps = [];
|
|
24759
|
-
this.enabled = true;
|
|
24760
|
-
}
|
|
24761
|
-
register(ps) {
|
|
24762
|
-
var _a;
|
|
24763
|
-
if (!this.aps.includes(ps)) {
|
|
24764
|
-
this.aps.push(ps);
|
|
24765
|
-
if ((_a = ps.config.settings) === null || _a === void 0 ? void 0 : _a.connectionIdentifierLoggingDisabled)
|
|
24766
|
-
this.disable();
|
|
24767
|
-
}
|
|
24768
|
-
if (!this.interval)
|
|
24769
|
-
this.interval = setInterval(this.connectionWatcher.bind(this), 10 * 1000);
|
|
24770
|
-
}
|
|
24771
|
-
GetWebSocketStates() {
|
|
24772
|
-
return this.aps.map((ps) => ps.websocketState);
|
|
24773
|
-
}
|
|
24774
|
-
ActiveInstances() {
|
|
24775
|
-
return this.GetWebSocketStates().filter((state) => state <= WebsocketState.OPEN).length;
|
|
24776
|
-
}
|
|
24777
|
-
disable() {
|
|
24778
|
-
this.enabled = false;
|
|
24779
|
-
}
|
|
24780
|
-
/**
|
|
24781
|
-
* The purpose of this method is to periodically tell the developer the amount of connected instances.
|
|
24782
|
-
* This way the developer can figure out, when they messed up the implementation and there's shadow instances still running.
|
|
24783
|
-
* Or when they accidentally set up multiple connections!
|
|
24784
|
-
* Things like that can happen, for example if the React.useEffect was not setup perfectly!
|
|
24785
|
-
*/
|
|
24786
|
-
connectionWatcher() {
|
|
24787
|
-
if (!this.enabled)
|
|
24788
|
-
return;
|
|
24789
|
-
const activeStates = this.GetWebSocketStates().filter((state) => state <= WebsocketState.OPEN);
|
|
24790
|
-
if (activeStates.length === 1) {
|
|
24791
|
-
//console.log(`PixelStreaming Instance is connected.`);
|
|
24792
|
-
}
|
|
24793
|
-
else if (activeStates.length !== 0) {
|
|
24794
|
-
console.warn(`${activeStates.length} PixelStreaming Instances are connected!`);
|
|
24795
|
-
}
|
|
24796
|
-
}
|
|
24797
|
-
}
|
|
24798
|
-
exports.ConnectionIdentifier = ConnectionIdentifier;
|
|
24799
|
-
|
|
24800
|
-
|
|
24801
24733
|
/***/ }),
|
|
24802
24734
|
|
|
24803
24735
|
/***/ 3379:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcware-cloud/pixelstreaming-websdk",
|
|
3
3
|
"description": "WebSDK for easy implementation of pixel streaming with Arcware Cloud Services. Heavily based on the '@epicgames-ps' library.",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.21",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./index.umd.js",
|
|
7
7
|
"module": "./index.esm.js",
|
|
@@ -29,7 +29,7 @@ export declare class ArcwareConfig extends Config {
|
|
|
29
29
|
readonly session: Session;
|
|
30
30
|
readonly settings: Settings;
|
|
31
31
|
private _initialSettings;
|
|
32
|
-
readonly VERSION = "1.3.
|
|
32
|
+
readonly VERSION = "1.3.21";
|
|
33
33
|
readonly whiteLabellingChanged: EventHandler<{
|
|
34
34
|
next: WhiteLabel;
|
|
35
35
|
changed: boolean;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { ArcwareConfig, ArcwareConfigParams } from "./ArcwareConfig";
|
|
2
2
|
import { ArcwarePixelStreaming } from "./ArcwarePixelStreaming";
|
|
3
3
|
import { ArcwareApplication } from "./ArcwareApplication";
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
type ArcwareSettings = ArcwareConfigParams["settings"];
|
|
5
|
+
export type ArcwareInitConfiguration = Partial<Omit<ArcwareConfigParams, "settings">> & {
|
|
6
|
+
settings?: Partial<Omit<ArcwareSettings, "shareId" | "projectId">>;
|
|
7
|
+
};
|
|
8
|
+
export type ConnectionInfo = {
|
|
9
|
+
shareId: string;
|
|
9
10
|
projectId?: string;
|
|
10
|
-
}
|
|
11
|
+
};
|
|
12
|
+
/** What ArcwareInit returns. */
|
|
13
|
+
export interface ArcwareInitResult {
|
|
11
14
|
Config: ArcwareConfig;
|
|
12
15
|
PixelStreaming: ArcwarePixelStreaming;
|
|
13
16
|
Application: ArcwareApplication;
|
|
14
|
-
}
|
|
17
|
+
}
|
|
18
|
+
export declare function ArcwareInit(ids: ConnectionInfo, configuration?: ArcwareInitConfiguration, forceRefresh?: boolean): ArcwareInitResult;
|
|
15
19
|
export {};
|
|
@@ -4,10 +4,15 @@ import { z } from "zod";
|
|
|
4
4
|
import { ArcwareConfig } from "./ArcwareConfig";
|
|
5
5
|
import { EventHandler } from "./domain/EventHandler";
|
|
6
6
|
import { Session } from "./domain/Session";
|
|
7
|
-
import { WebsocketState } from "./domain/ConnectionIdentifier";
|
|
8
7
|
type OutboundByKey<K extends keyof typeof Messages.Send> = z.input<(typeof Messages.Send)[K]> & {
|
|
9
8
|
type: K;
|
|
10
9
|
};
|
|
10
|
+
export declare enum WebsocketState {
|
|
11
|
+
CONNECTING = 0,
|
|
12
|
+
OPEN = 1,
|
|
13
|
+
CLOSING = 2,
|
|
14
|
+
CLOSED = 3
|
|
15
|
+
}
|
|
11
16
|
export declare class ArcwarePixelStreaming extends PixelStreaming {
|
|
12
17
|
/** Override default config with ArcwareConfig. */
|
|
13
18
|
config: ArcwareConfig;
|
|
@@ -37,10 +42,6 @@ export declare class ArcwarePixelStreaming extends PixelStreaming {
|
|
|
37
42
|
private isRetryableClose;
|
|
38
43
|
private bindTransportEvents;
|
|
39
44
|
private get isWsOpen();
|
|
40
|
-
/** Returns a list of WebSocketStates of all PixelStreaming Instances generated. */
|
|
41
|
-
get WebsocketStates(): WebsocketState[];
|
|
42
|
-
/** Counts all active PixelStreaming Instances generated. (CONNECTING & CONNECTED) */
|
|
43
|
-
get ActiveInstances(): () => number;
|
|
44
45
|
/** Returns this PixelStreaming Instances websocket state. */
|
|
45
46
|
get websocketState(): WebsocketState;
|
|
46
47
|
constructor(config: ArcwareConfig, overrides?: PixelStreamingOverrides);
|
|
@@ -109,14 +109,12 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
109
109
|
connectionStrengthIcon: z.ZodOptional<z.ZodBoolean>;
|
|
110
110
|
/** ShareId, used for sharing your project.
|
|
111
111
|
* Using ArcwareInit will set this required property for you. */
|
|
112
|
-
shareId: z.
|
|
112
|
+
shareId: z.ZodString;
|
|
113
113
|
/** Id of your project, only required if your shareId refers to multiple projects.
|
|
114
114
|
* Using ArcwareInit will set this required property for you. */
|
|
115
115
|
projectId: z.ZodOptional<z.ZodString>;
|
|
116
116
|
/** Enable/Disable LoveLetter logging to the console. */
|
|
117
117
|
loveLetterLogging: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
-
/** Enable/Disable Connection Identifier logging to the console. */
|
|
119
|
-
connectionIdentifierLoggingDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
120
118
|
/** Width with which instance should be started */
|
|
121
119
|
startWidth: z.ZodOptional<z.ZodNumber>;
|
|
122
120
|
/** Height with which instance should be started */
|
|
@@ -200,7 +198,6 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
200
198
|
shareId?: string;
|
|
201
199
|
projectId?: string;
|
|
202
200
|
loveLetterLogging?: boolean;
|
|
203
|
-
connectionIdentifierLoggingDisabled?: boolean;
|
|
204
201
|
startWidth?: number;
|
|
205
202
|
startHeight?: number;
|
|
206
203
|
orientationZoom?: {
|
|
@@ -256,7 +253,6 @@ export declare const ArcwareSettingsSchema: z.ZodObject<{
|
|
|
256
253
|
shareId?: string;
|
|
257
254
|
projectId?: string;
|
|
258
255
|
loveLetterLogging?: boolean;
|
|
259
|
-
connectionIdentifierLoggingDisabled?: boolean;
|
|
260
256
|
startWidth?: number;
|
|
261
257
|
startHeight?: number;
|
|
262
258
|
orientationZoom?: {
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ArcwarePixelStreaming } from "../ArcwarePixelStreaming";
|
|
2
|
-
export declare enum WebsocketState {
|
|
3
|
-
CONNECTING = 0,
|
|
4
|
-
OPEN = 1,
|
|
5
|
-
CLOSING = 2,
|
|
6
|
-
CLOSED = 3
|
|
7
|
-
}
|
|
8
|
-
export declare class ConnectionIdentifier {
|
|
9
|
-
private static instance;
|
|
10
|
-
static get Instance(): ConnectionIdentifier;
|
|
11
|
-
private interval;
|
|
12
|
-
private aps;
|
|
13
|
-
get WebsocketStates(): WebsocketState[];
|
|
14
|
-
private constructor();
|
|
15
|
-
register(ps: ArcwarePixelStreaming): void;
|
|
16
|
-
GetWebSocketStates(): WebsocketState[];
|
|
17
|
-
ActiveInstances(): number;
|
|
18
|
-
private enabled;
|
|
19
|
-
disable(): void;
|
|
20
|
-
/**
|
|
21
|
-
* The purpose of this method is to periodically tell the developer the amount of connected instances.
|
|
22
|
-
* This way the developer can figure out, when they messed up the implementation and there's shadow instances still running.
|
|
23
|
-
* Or when they accidentally set up multiple connections!
|
|
24
|
-
* Things like that can happen, for example if the React.useEffect was not setup perfectly!
|
|
25
|
-
*/
|
|
26
|
-
private connectionWatcher;
|
|
27
|
-
}
|