From 9279c0d8b4801c5d37b291058d1e508c5f55d6e9 Mon Sep 17 00:00:00 2001 From: Luke Bermingham <1215582+lukehb@users.noreply.github.com> Date: Mon, 1 Jul 2024 08:35:59 +1000 Subject: [PATCH 1/2] Upgrade to 5.5 - do not merge as using local deps --- examples/typescript/package-lock.json | 4 +- examples/typescript/src/index.ts | 18 ++- library/package-lock.json | 186 -------------------------- library/package.json | 3 +- library/src/LoadingOverlay.ts | 2 +- library/src/Messages.ts | 16 +-- library/src/SPSApplication.ts | 19 ++- library/src/SignallingExtension.ts | 48 +++---- library/src/index.ts | 82 ++++++------ 9 files changed, 96 insertions(+), 282 deletions(-) diff --git a/examples/typescript/package-lock.json b/examples/typescript/package-lock.json index 0826defe..191e1692 100644 --- a/examples/typescript/package-lock.json +++ b/examples/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tensorworks/spstypescriptexample", - "version": "0.0.1", + "version": "0.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tensorworks/spstypescriptexample", - "version": "0.0.1", + "version": "0.0.2", "license": "MIT", "dependencies": { "dotenv": "^16.0.3" diff --git a/examples/typescript/src/index.ts b/examples/typescript/src/index.ts index cd8507fc..2e09c519 100644 --- a/examples/typescript/src/index.ts +++ b/examples/typescript/src/index.ts @@ -1,11 +1,15 @@ -import { Config, PixelStreaming, SPSApplication, TextParameters, PixelStreamingApplicationStyle, MessageRecv, Flags } from "@tensorworks/libspsfrontend"; +import { Config, PixelStreaming, SPSApplication, PixelStreamingApplicationStyle, Flags, BaseMessage } from "@tensorworks/libspsfrontend"; // Apply default styling from Epic Games Pixel Streaming Frontend export const PixelStreamingApplicationStyles = new PixelStreamingApplicationStyle(); PixelStreamingApplicationStyles.applyStyleSheet(); -// Extend the MessageRecv to allow the engine version to exist as part of our config message from the signalling server -class MessageExtendedConfig extends MessageRecv { +// Extend the default "Config" message supplied by PSInfra library to include the following: +// - Engine version +// - Platform +// - FrontendSendOffer +class MessageExtendedConfig implements BaseMessage { + type: string; peerConnectionOptions: RTCConfiguration; engineVersion: string; platform: string; @@ -29,10 +33,10 @@ document.body.onload = function () { const stream = new ScalablePixelStreaming(config); // Override the onConfig so we can determine if we need to send the WebRTC offer based on what is sent from the signalling server - stream.webSocketController.onConfig = (messageExtendedConfig: MessageExtendedConfig) => { - stream.config.setFlagEnabled(Flags.BrowserSendOffer, messageExtendedConfig.frontendToSendOffer); - stream.handleOnConfig(messageExtendedConfig); - } + stream.signallingProtocol.addListener("config", (config : MessageExtendedConfig) => { + stream.config.setFlagEnabled(Flags.BrowserSendOffer, config.frontendToSendOffer); + stream.handleOnConfig(config); + }); // Create and append our application const spsApplication = new SPSApplication({ diff --git a/library/package-lock.json b/library/package-lock.json index 4c27c691..101181cf 100644 --- a/library/package-lock.json +++ b/library/package-lock.json @@ -8,10 +8,6 @@ "name": "@tensorworks/libspsfrontend", "version": "0.3.4", "license": "MIT", - "dependencies": { - "@epicgames-ps/lib-pixelstreamingfrontend-ue5.4": "^0.0.4", - "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4": "^0.0.4" - }, "devDependencies": { "css-loader": "^6.7.3", "html-loader": "^4.2.0", @@ -24,17 +20,6 @@ "webpack-dev-server": "^4.11.1" } }, - "node_modules/@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", - "dependencies": { - "regenerator-runtime": "^0.13.11" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -44,27 +29,6 @@ "node": ">=10.0.0" } }, - "node_modules/@epicgames-ps/lib-pixelstreamingfrontend-ue5.4": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ue5.4/-/lib-pixelstreamingfrontend-ue5.4-0.0.4.tgz", - "integrity": "sha512-PrfrTJ6rf/yxp/GXVDM3hwSyMUooUYd/z90TMxaYcTWU3RbXG8qT85pS5dceGoPwCkwLIiznpWOPOSq70bUupg==", - "dependencies": { - "sdp": "^3.1.0" - } - }, - "node_modules/@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4/-/lib-pixelstreamingfrontend-ui-ue5.4-0.0.4.tgz", - "integrity": "sha512-RFwWo4vY9DRhiVKWWLMBsagpIxiJoQ+GBtI2OmzcgAAb8djGHMDAiljyagwIpTW6r6rxQrl10AGCSlZDKeQSvQ==", - "dependencies": { - "jss": "^10.9.2", - "jss-plugin-camel-case": "^10.9.2", - "jss-plugin-global": "^10.9.2" - }, - "peerDependencies": { - "@epicgames-ps/lib-pixelstreamingfrontend-ue5.4": "^0.0.4" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -1129,11 +1093,6 @@ "node": ">=4" } }, - "node_modules/csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" - }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2022,11 +1981,6 @@ "node": ">=10.17.0" } }, - "node_modules/hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" - }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -2164,11 +2118,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-in-browser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", - "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2288,40 +2237,6 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "node_modules/jss": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz", - "integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==", - "dependencies": { - "@babel/runtime": "^7.3.1", - "csstype": "^3.0.2", - "is-in-browser": "^1.1.3", - "tiny-warning": "^1.0.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/jss" - } - }, - "node_modules/jss-plugin-camel-case": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz", - "integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==", - "dependencies": { - "@babel/runtime": "^7.3.1", - "hyphenate-style-name": "^1.0.3", - "jss": "10.10.0" - } - }, - "node_modules/jss-plugin-global": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz", - "integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==", - "dependencies": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3113,11 +3028,6 @@ "node": ">= 10.13.0" } }, - "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" - }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -3261,11 +3171,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/sdp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", - "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" - }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -3729,11 +3634,6 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, - "node_modules/tiny-warning": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4310,38 +4210,12 @@ } }, "dependencies": { - "@babel/runtime": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.0.tgz", - "integrity": "sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==", - "requires": { - "regenerator-runtime": "^0.13.11" - } - }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, - "@epicgames-ps/lib-pixelstreamingfrontend-ue5.4": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ue5.4/-/lib-pixelstreamingfrontend-ue5.4-0.0.4.tgz", - "integrity": "sha512-PrfrTJ6rf/yxp/GXVDM3hwSyMUooUYd/z90TMxaYcTWU3RbXG8qT85pS5dceGoPwCkwLIiznpWOPOSq70bUupg==", - "requires": { - "sdp": "^3.1.0" - } - }, - "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4/-/lib-pixelstreamingfrontend-ui-ue5.4-0.0.4.tgz", - "integrity": "sha512-RFwWo4vY9DRhiVKWWLMBsagpIxiJoQ+GBtI2OmzcgAAb8djGHMDAiljyagwIpTW6r6rxQrl10AGCSlZDKeQSvQ==", - "requires": { - "jss": "^10.9.2", - "jss-plugin-camel-case": "^10.9.2", - "jss-plugin-global": "^10.9.2" - } - }, "@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -5208,11 +5082,6 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, - "csstype": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", - "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -5890,11 +5759,6 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, - "hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -5988,11 +5852,6 @@ "is-extglob": "^2.1.1" } }, - "is-in-browser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", - "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" - }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -6081,36 +5940,6 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, - "jss": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz", - "integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==", - "requires": { - "@babel/runtime": "^7.3.1", - "csstype": "^3.0.2", - "is-in-browser": "^1.1.3", - "tiny-warning": "^1.0.2" - } - }, - "jss-plugin-camel-case": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz", - "integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==", - "requires": { - "@babel/runtime": "^7.3.1", - "hyphenate-style-name": "^1.0.3", - "jss": "10.10.0" - } - }, - "jss-plugin-global": { - "version": "10.10.0", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz", - "integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==", - "requires": { - "@babel/runtime": "^7.3.1", - "jss": "10.10.0" - } - }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -6699,11 +6528,6 @@ "resolve": "^1.20.0" } }, - "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" - }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -6799,11 +6623,6 @@ "ajv-keywords": "^3.5.2" } }, - "sdp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", - "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" - }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -7162,11 +6981,6 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, - "tiny-warning": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" - }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", diff --git a/library/package.json b/library/package.json index b0678aac..be93abe8 100644 --- a/library/package.json +++ b/library/package.json @@ -14,8 +14,7 @@ "author": "TensorWorks Pty Ltd", "license": "MIT", "dependencies": { - "@epicgames-ps/lib-pixelstreamingfrontend-ue5.4": "^0.0.4", - "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4": "^0.0.4" + }, "devDependencies": { "css-loader": "^6.7.3", diff --git a/library/src/LoadingOverlay.ts b/library/src/LoadingOverlay.ts index 86067e31..22251b4b 100644 --- a/library/src/LoadingOverlay.ts +++ b/library/src/LoadingOverlay.ts @@ -1,4 +1,4 @@ -import { TextOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; +import { TextOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; export class LoadingOverlay extends TextOverlay { diff --git a/library/src/Messages.ts b/library/src/Messages.ts index 8430cb62..95206169 100644 --- a/library/src/Messages.ts +++ b/library/src/Messages.ts @@ -5,18 +5,15 @@ import { DataChannelStats, InboundAudioStats, InboundVideoStats, - MessageSend, + BaseMessage, OutBoundVideoStats -} from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; - -export enum MessageSendTypes { - STATS = "stats", -} +} from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; /** * Aggregated Stats Message Wrapper */ -export class MessageStats extends MessageSend { +export class MessageStats implements BaseMessage { + type: string; inboundVideoStats: InboundVideoStats; inboundAudioStats: InboundAudioStats; candidatePair: CandidatePairStats; @@ -26,11 +23,10 @@ export class MessageStats extends MessageSend { outboundVideoStats: OutBoundVideoStats; /** - * @param aggregatedStats - Aggregated Stats + * @param aggregatedStats - Aggregated Stats */ constructor(aggregatedStats: AggregatedStats) { - super(); - this.type = MessageSendTypes.STATS + this.type = "stats"; this.inboundVideoStats = aggregatedStats.inboundVideoStats; this.inboundAudioStats = aggregatedStats.inboundAudioStats; this.candidatePair = aggregatedStats.getActiveCandidatePair(); diff --git a/library/src/SPSApplication.ts b/library/src/SPSApplication.ts index 880e96c9..9d5c939b 100644 --- a/library/src/SPSApplication.ts +++ b/library/src/SPSApplication.ts @@ -1,5 +1,5 @@ -import { Application, SettingUIFlag, UIOptions } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -import { AggregatedStats, SettingFlag, TextParameters } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; +import { Application, SettingUIFlag, UIOptions } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +import { AggregatedStats, SettingFlag, TextParameters } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; import { LoadingOverlay } from './LoadingOverlay'; import { SPSSignalling } from './SignallingExtension'; import { MessageStats } from './Messages'; @@ -19,7 +19,7 @@ export class SPSApplication extends Application { constructor(config: UIOptions) { super(config); - this.signallingExtension = new SPSSignalling(this.stream.webSocketController); + this.signallingExtension = new SPSSignalling(this.stream.signallingProtocol); this.signallingExtension.onAuthenticationResponse = this.handleSignallingResponse.bind(this); this.signallingExtension.onInstanceStateChanged = this.handleSignallingResponse.bind(this); @@ -68,8 +68,15 @@ export class SPSApplication extends Application { // get the current signalling url let signallingUrl = this.stream.config.getTextSettingValue(TextParameters.SignallingServerUrl); - // build the signalling URL based on the existing window location, the result should be 'domain.com/signalling/app-name' - signallingUrl = signallingUrl.endsWith("/") ? signallingUrl + "signalling" + window.location.pathname : signallingUrl + "/signalling" + window.location.pathname; + if(signallingUrl.includes("/signalling") || signallingUrl.includes("/signalling/")) + { + return signallingUrl; + } + else + { + // build the signalling URL based on the existing window location, the result should be 'domain.com/signalling/app-name' + signallingUrl = signallingUrl.endsWith("/") ? signallingUrl + "signalling" + window.location.pathname : signallingUrl + "/signalling" + window.location.pathname; + } return signallingUrl }); @@ -89,6 +96,6 @@ export class SPSApplication extends Application { */ sendStatsToSignallingServer(stats: AggregatedStats) { const data = new MessageStats(stats); - this.stream.webSocketController.webSocket.send(data.payload()); + this.stream.signallingProtocol.sendMessage(data); } } diff --git a/library/src/SignallingExtension.ts b/library/src/SignallingExtension.ts index 6071c5b3..ed2af37f 100644 --- a/library/src/SignallingExtension.ts +++ b/library/src/SignallingExtension.ts @@ -1,14 +1,14 @@ import { Logger, - MessageRecv, - MessageSend, - WebSocketController, -} from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; + BaseMessage, + SignallingProtocol, +} from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; /** * Auth Request Message Wrapper */ -export class MessageAuthRequest extends MessageSend { +export class MessageAuthRequest implements BaseMessage { + type: string; token: string; provider: string; @@ -17,7 +17,6 @@ export class MessageAuthRequest extends MessageSend { * @param provider - Name of the provider that is registered in the auth plugin */ constructor(token: string, provider: string) { - super(); this.type = "authenticationRequest"; this.token = token; this.provider = provider; @@ -37,14 +36,14 @@ export enum InstanceState { /** * Instance State Message wrapper */ -export class MessageInstanceState extends MessageRecv { +export class MessageInstanceState { state: InstanceState; details: string; progress: number; } /** - * Types of Authentication reposes + * Types of Authentication responses */ export enum MessageAuthResponseOutcomeType { REDIRECT = "REDIRECT", @@ -54,9 +53,9 @@ export enum MessageAuthResponseOutcomeType { } /** - * Authentication Response Message wrapper + * Structure for auth responses */ -export class MessageAuthResponse extends MessageRecv { +export class MessageAuthResponse { outcome: MessageAuthResponseOutcomeType; redirect: string; error: string; @@ -65,13 +64,14 @@ export class MessageAuthResponse extends MessageRecv { /** * Instance Request Message Wrapper */ -export class MessageRequestInstance extends MessageSend { +export class MessageRequestInstance implements BaseMessage { + + type: string; // An opaque string representing optional configuration data to pass to the signalling server for instance customisation - data: string + data: string; constructor() { - super(); this.type = "requestInstance"; } } @@ -85,37 +85,34 @@ export class SPSSignalling { onInstanceStateChanged: (stateChangedMsg: string, isError: boolean) => void; onAuthenticationResponse: (authRespMsg: string, isError: boolean) => void; - constructor(websocketController: WebSocketController) { - this.extendSignallingProtocol(websocketController); + constructor(signallingProtocol: SignallingProtocol) { + this.extendSignallingProtocol(signallingProtocol); } /** * Extend the signalling protocol with SPS specific messages. */ - extendSignallingProtocol(webSocketController: WebSocketController) { + extendSignallingProtocol(signallingProtocol: SignallingProtocol) { // authenticationRequired - webSocketController.signallingProtocol.addMessageHandler("authenticationRequired", (authReqPayload: string) => { + signallingProtocol.addListener("authenticationRequired", (authReqPayload: BaseMessage) => { Logger.Log(Logger.GetStackTrace(), "AUTHENTICATION_REQUIRED", 6); const url_string = window.location.href; const url = new URL(url_string); const authRequest = new MessageAuthRequest(url.searchParams.get("code"), url.searchParams.get("provider")); - webSocketController.webSocket.send(authRequest.payload()); + signallingProtocol.sendMessage(authRequest); }); // instanceState - webSocketController.signallingProtocol.addMessageHandler("instanceState", (instanceStatePayload: string) => { + signallingProtocol.addListener("instanceState", (instanceState: MessageInstanceState) => { Logger.Log(Logger.GetStackTrace(), "INSTANCE_STATE", 6); - const instanceState: MessageInstanceState = JSON.parse(instanceStatePayload); this.handleInstanceStateChanged(instanceState); }); // authenticationResponse - webSocketController.signallingProtocol.addMessageHandler("authenticationResponse", (authRespPayload: string) => { + signallingProtocol.addListener("authenticationResponse", (authenticationResponse: MessageAuthResponse) => { Logger.Log(Logger.GetStackTrace(), "AUTHENTICATION_RESPONSE", 6); - const authenticationResponse: MessageAuthResponse = JSON.parse(authRespPayload); - this.handleAuthenticationResponse(authenticationResponse); switch (authenticationResponse.outcome) { @@ -125,8 +122,7 @@ export class SPSSignalling { } case MessageAuthResponseOutcomeType.AUTHENTICATED: { Logger.Log(Logger.GetStackTrace(), "User is authenticated and now requesting an instance", 6); - - webSocketController.webSocket.send(new MessageRequestInstance().payload()); + signallingProtocol.sendMessage(new MessageRequestInstance()); break; } case MessageAuthResponseOutcomeType.INVALID_TOKEN: { @@ -148,7 +144,7 @@ export class SPSSignalling { /** * Set up functionality to happen when an instance state change occurs and updates the info overlay with the response - * @param instanceState - the message instance state + * @param instanceState - the message instance state */ handleInstanceStateChanged(instanceState: MessageInstanceState) { let instanceStateMessage = ""; diff --git a/library/src/index.ts b/library/src/index.ts index 995d9dca..b660b9e2 100644 --- a/library/src/index.ts +++ b/library/src/index.ts @@ -1,50 +1,48 @@ // Scalable Pixel Streaming Frontend exports export { SPSApplication } from "./SPSApplication"; export { LoadingOverlay } from "./LoadingOverlay"; -export { MessageSendTypes, MessageStats } from "./Messages"; +export { MessageStats } from "./Messages"; export { MessageAuthRequest, InstanceState, MessageInstanceState, MessageAuthResponseOutcomeType, MessageAuthResponse, MessageRequestInstance, SPSSignalling } from "./SignallingExtension"; // Epic Games Pixel Streaming Frontend exports -export { WebRtcPlayerController } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { WebXRController } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { Config, ControlSchemeType, Flags, NumericParameters, TextParameters, OptionParameters, FlagsIds, NumericParametersIds, TextParametersIds, OptionParametersIds, AllSettings } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { SettingBase } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { SettingFlag } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { SettingNumber } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { SettingOption } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { SettingText } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { PixelStreaming } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { AfkLogic } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { LatencyTestResults } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { EncoderSettings, InitialSettings, WebRTCSettings } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { AggregatedStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { Logger } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { UnquantizedAndDenormalizeUnsigned } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { MessageSend } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { MessageRecv, MessageStreamerList } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { WebSocketController } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { SignallingProtocol } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { CandidatePairStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { CandidateStat } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { DataChannelStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { InboundAudioStats, InboundVideoStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; -export { OutBoundVideoStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.4'; +export { WebRtcPlayerController } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { WebXRController } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { Config, ControlSchemeType, Flags, NumericParameters, TextParameters, OptionParameters, FlagsIds, NumericParametersIds, TextParametersIds, OptionParametersIds, AllSettings } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { SettingBase } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { SettingFlag } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { SettingNumber } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { SettingOption } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { SettingText } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { PixelStreaming } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { AfkLogic } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { LatencyTestResults } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { EncoderSettings, InitialSettings, WebRTCSettings } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { AggregatedStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { Logger } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { UnquantizedAndDenormalizeUnsigned } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { BaseMessage, MessageRegistry } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { SignallingProtocol } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { CandidatePairStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { CandidateStat } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { DataChannelStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { InboundAudioStats, InboundVideoStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; +export { OutBoundVideoStats } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5'; // Epic Games Pixel Streaming Frontend UI exports -export { Application, UIOptions } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { PixelStreamingApplicationStyle } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { AFKOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { ActionOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { OverlayBase } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { ConnectOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { DisconnectOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { ErrorOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { InfoOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { PlayOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { TextOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { ConfigUI } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { SettingUIBase } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { SettingUIFlag } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { SettingUINumber } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { SettingUIOption } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; -export { SettingUIText } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.4'; +export { Application, UIOptions } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { PixelStreamingApplicationStyle } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { AFKOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { ActionOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { OverlayBase } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { ConnectOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { DisconnectOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { ErrorOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { InfoOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { PlayOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { TextOverlay } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { ConfigUI } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { SettingUIBase } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { SettingUIFlag } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { SettingUINumber } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { SettingUIOption } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; +export { SettingUIText } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5'; From 76ada0dd80a0a80cea42c94d16c200e69e5dd3ce Mon Sep 17 00:00:00 2001 From: Luke Bermingham <1215582+lukehb@users.noreply.github.com> Date: Thu, 11 Jul 2024 22:03:00 +1000 Subject: [PATCH 2/2] Update SPS frontend use PSInfra 5.5 and add support for signalling server to be passed as url arg or in code. --- examples/typescript/package-lock.json | 4 +- examples/typescript/package.json | 2 +- examples/typescript/src/index.ts | 16 +- library/package-lock.json | 369 ++++++++++++++++++++++++-- library/package.json | 5 +- library/src/SPSApplication.ts | 27 +- 6 files changed, 382 insertions(+), 41 deletions(-) diff --git a/examples/typescript/package-lock.json b/examples/typescript/package-lock.json index 191e1692..6109e290 100644 --- a/examples/typescript/package-lock.json +++ b/examples/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tensorworks/spstypescriptexample", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tensorworks/spstypescriptexample", - "version": "0.0.2", + "version": "0.0.3", "license": "MIT", "dependencies": { "dotenv": "^16.0.3" diff --git a/examples/typescript/package.json b/examples/typescript/package.json index 8f8162db..50e2a444 100644 --- a/examples/typescript/package.json +++ b/examples/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@tensorworks/spstypescriptexample", - "version": "0.0.2", + "version": "0.0.3", "description": "The typescript example for consuming the Scalable Pixel Streaming Frontend", "main": "./src/index.ts", "scripts": { diff --git a/examples/typescript/src/index.ts b/examples/typescript/src/index.ts index 2e09c519..1eb7d4f9 100644 --- a/examples/typescript/src/index.ts +++ b/examples/typescript/src/index.ts @@ -1,4 +1,4 @@ -import { Config, PixelStreaming, SPSApplication, PixelStreamingApplicationStyle, Flags, BaseMessage } from "@tensorworks/libspsfrontend"; +import { Config, PixelStreaming, SPSApplication, PixelStreamingApplicationStyle, Flags, TextParameters, BaseMessage } from "@tensorworks/libspsfrontend"; // Apply default styling from Epic Games Pixel Streaming Frontend export const PixelStreamingApplicationStyles = new PixelStreamingApplicationStyle(); @@ -29,6 +29,20 @@ document.body.onload = function () { // Create a config object. We default to sending the WebRTC offer from the browser as true, TimeoutIfIdle to true, AutoConnect to false and MaxReconnectAttempts to 0 const config = new Config({ useUrlParams: true, initialSettings: { OfferToReceive: true, TimeoutIfIdle: true, AutoConnect: false, MaxReconnectAttempts: 0 } }); + // Handle setting custom signalling url from code or by querying url parameters (e.g. ?ss=ws://my.signaling.server). + { + // Replace with your custom signalling url if you need to. + // Otherwise SPS will use ws|wss://window.location.host/signalling/window.location.pathname + let YOUR_CUSTOM_SIGNALLING_URL_HERE : string = ""; // <-- replace here + + // Check the ?ss= url parameter for a custom signalling url. + const urlParams = new URLSearchParams(window.location.search); + if (urlParams.has(TextParameters.SignallingServerUrl)) { + YOUR_CUSTOM_SIGNALLING_URL_HERE = urlParams.get(TextParameters.SignallingServerUrl); + } + config.setTextSetting(TextParameters.SignallingServerUrl, YOUR_CUSTOM_SIGNALLING_URL_HERE); + } + // Create stream and spsApplication instances that implement the Epic Games Pixel Streaming Frontend PixelStreaming and Application types const stream = new ScalablePixelStreaming(config); diff --git a/library/package-lock.json b/library/package-lock.json index 101181cf..e40fbece 100644 --- a/library/package-lock.json +++ b/library/package-lock.json @@ -1,13 +1,17 @@ { "name": "@tensorworks/libspsfrontend", - "version": "0.3.4", + "version": "0.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tensorworks/libspsfrontend", - "version": "0.3.4", + "version": "0.4.0", "license": "MIT", + "dependencies": { + "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^0.1.2", + "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": "^0.1.0" + }, "devDependencies": { "css-loader": "^6.7.3", "html-loader": "^4.2.0", @@ -20,6 +24,17 @@ "webpack-dev-server": "^4.11.1" } }, + "node_modules/@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -29,6 +44,38 @@ "node": ">=10.0.0" } }, + "node_modules/@epicgames-ps/lib-pixelstreamingcommon-ue5.5": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingcommon-ue5.5/-/lib-pixelstreamingcommon-ue5.5-0.0.14.tgz", + "integrity": "sha512-GXu1GJUfXAWnTHylBYAfvE9SVPXl8B6ovD/6CbQh0AXxktadbA4KsDbuEFuZHIVEVLLn6vXsBkkKf7yZODphOQ==", + "dependencies": { + "@protobuf-ts/plugin": "^2.9.3", + "@types/ws": "^8.5.10", + "ws": "^8.17.1" + } + }, + "node_modules/@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ue5.5/-/lib-pixelstreamingfrontend-ue5.5-0.1.2.tgz", + "integrity": "sha512-jpjpZTc1vZZNQ+xRxnPmNeBc3U+Wxx6C7iSGZrBRqkVXkDV6C8oV+yoTgKN4JWTvpXUOLRQ/9MJR5wYCWnxu1Q==", + "dependencies": { + "@epicgames-ps/lib-pixelstreamingcommon-ue5.5": "^0.0.14", + "sdp": "^3.1.0" + } + }, + "node_modules/@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5/-/lib-pixelstreamingfrontend-ui-ue5.5-0.1.0.tgz", + "integrity": "sha512-WUfemK/iO/oqb916W4RQrrYufYJ3zHk6KHn8R/m7HLL/0MP6gnXpvvSSs1m/hXwtPR3u4PrB+2kOMCmXtFN57A==", + "dependencies": { + "jss": "^10.9.2", + "jss-plugin-camel-case": "^10.9.2", + "jss-plugin-global": "^10.9.2" + }, + "peerDependencies": { + "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^0.1.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -99,6 +146,76 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@protobuf-ts/plugin": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.4.tgz", + "integrity": "sha512-Db5Laq5T3mc6ERZvhIhkj1rn57/p8gbWiCKxQWbZBBl20wMuqKoHbRw4tuD7FyXi+IkwTToaNVXymv5CY3E8Rw==", + "dependencies": { + "@protobuf-ts/plugin-framework": "^2.9.4", + "@protobuf-ts/protoc": "^2.9.4", + "@protobuf-ts/runtime": "^2.9.4", + "@protobuf-ts/runtime-rpc": "^2.9.4", + "typescript": "^3.9" + }, + "bin": { + "protoc-gen-dump": "bin/protoc-gen-dump", + "protoc-gen-ts": "bin/protoc-gen-ts" + } + }, + "node_modules/@protobuf-ts/plugin-framework": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.4.tgz", + "integrity": "sha512-9nuX1kjdMliv+Pes8dQCKyVhjKgNNfwxVHg+tx3fLXSfZZRcUHMc1PMwB9/vTvc6gBKt9QGz5ERqSqZc0++E9A==", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.4", + "typescript": "^3.9" + } + }, + "node_modules/@protobuf-ts/plugin-framework/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@protobuf-ts/plugin/node_modules/typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/@protobuf-ts/protoc": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.4.tgz", + "integrity": "sha512-hQX+nOhFtrA+YdAXsXEDrLoGJqXHpgv4+BueYF0S9hy/Jq0VRTVlJS1Etmf4qlMt/WdigEes5LOd/LDzui4GIQ==", + "bin": { + "protoc": "protoc.js" + } + }, + "node_modules/@protobuf-ts/runtime": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.4.tgz", + "integrity": "sha512-vHRFWtJJB/SiogWDF0ypoKfRIZ41Kq+G9cEFj6Qm1eQaAhJ1LDFvgZ7Ja4tb3iLOQhz0PaoPnnOijF1qmEqTxg==" + }, + "node_modules/@protobuf-ts/runtime-rpc": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.4.tgz", + "integrity": "sha512-y9L9JgnZxXFqH5vD4d7j9duWvIJ7AShyBRoNKJGhu9Q27qIbchfzli66H9RvrQNIFk5ER7z1Twe059WZGqERcA==", + "dependencies": { + "@protobuf-ts/runtime": "^2.9.4" + } + }, "node_modules/@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -216,8 +333,7 @@ "node_modules/@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", - "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", - "dev": true + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" }, "node_modules/@types/qs": { "version": "6.9.7", @@ -266,10 +382,9 @@ } }, "node_modules/@types/ws": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", - "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", - "dev": true, + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", "dependencies": { "@types/node": "*" } @@ -1093,6 +1208,11 @@ "node": ">=4" } }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -1981,6 +2101,11 @@ "node": ">=10.17.0" } }, + "node_modules/hyphenate-style-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", + "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==" + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -2118,6 +2243,11 @@ "node": ">=0.10.0" } }, + "node_modules/is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -2237,6 +2367,40 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/jss": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz", + "integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "csstype": "^3.0.2", + "is-in-browser": "^1.1.3", + "tiny-warning": "^1.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/jss" + } + }, + "node_modules/jss-plugin-camel-case": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz", + "integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "hyphenate-style-name": "^1.0.3", + "jss": "10.10.0" + } + }, + "node_modules/jss-plugin-global": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz", + "integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==", + "dependencies": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3028,6 +3192,11 @@ "node": ">= 10.13.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "node_modules/relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -3171,6 +3340,11 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/sdp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", + "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -3634,6 +3808,11 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "node_modules/tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -4182,10 +4361,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "engines": { "node": ">=10.0.0" }, @@ -4210,12 +4388,49 @@ } }, "dependencies": { + "@babel/runtime": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.7.tgz", + "integrity": "sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==", + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@epicgames-ps/lib-pixelstreamingcommon-ue5.5": { + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingcommon-ue5.5/-/lib-pixelstreamingcommon-ue5.5-0.0.14.tgz", + "integrity": "sha512-GXu1GJUfXAWnTHylBYAfvE9SVPXl8B6ovD/6CbQh0AXxktadbA4KsDbuEFuZHIVEVLLn6vXsBkkKf7yZODphOQ==", + "requires": { + "@protobuf-ts/plugin": "^2.9.3", + "@types/ws": "^8.5.10", + "ws": "^8.17.1" + } + }, + "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ue5.5/-/lib-pixelstreamingfrontend-ue5.5-0.1.2.tgz", + "integrity": "sha512-jpjpZTc1vZZNQ+xRxnPmNeBc3U+Wxx6C7iSGZrBRqkVXkDV6C8oV+yoTgKN4JWTvpXUOLRQ/9MJR5wYCWnxu1Q==", + "requires": { + "@epicgames-ps/lib-pixelstreamingcommon-ue5.5": "^0.0.14", + "sdp": "^3.1.0" + } + }, + "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5/-/lib-pixelstreamingfrontend-ui-ue5.5-0.1.0.tgz", + "integrity": "sha512-WUfemK/iO/oqb916W4RQrrYufYJ3zHk6KHn8R/m7HLL/0MP6gnXpvvSSs1m/hXwtPR3u4PrB+2kOMCmXtFN57A==", + "requires": { + "jss": "^10.9.2", + "jss-plugin-camel-case": "^10.9.2", + "jss-plugin-global": "^10.9.2" + } + }, "@jridgewell/gen-mapping": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", @@ -4279,6 +4494,59 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "@protobuf-ts/plugin": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin/-/plugin-2.9.4.tgz", + "integrity": "sha512-Db5Laq5T3mc6ERZvhIhkj1rn57/p8gbWiCKxQWbZBBl20wMuqKoHbRw4tuD7FyXi+IkwTToaNVXymv5CY3E8Rw==", + "requires": { + "@protobuf-ts/plugin-framework": "^2.9.4", + "@protobuf-ts/protoc": "^2.9.4", + "@protobuf-ts/runtime": "^2.9.4", + "@protobuf-ts/runtime-rpc": "^2.9.4", + "typescript": "^3.9" + }, + "dependencies": { + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" + } + } + }, + "@protobuf-ts/plugin-framework": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/plugin-framework/-/plugin-framework-2.9.4.tgz", + "integrity": "sha512-9nuX1kjdMliv+Pes8dQCKyVhjKgNNfwxVHg+tx3fLXSfZZRcUHMc1PMwB9/vTvc6gBKt9QGz5ERqSqZc0++E9A==", + "requires": { + "@protobuf-ts/runtime": "^2.9.4", + "typescript": "^3.9" + }, + "dependencies": { + "typescript": { + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz", + "integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==" + } + } + }, + "@protobuf-ts/protoc": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/protoc/-/protoc-2.9.4.tgz", + "integrity": "sha512-hQX+nOhFtrA+YdAXsXEDrLoGJqXHpgv4+BueYF0S9hy/Jq0VRTVlJS1Etmf4qlMt/WdigEes5LOd/LDzui4GIQ==" + }, + "@protobuf-ts/runtime": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.9.4.tgz", + "integrity": "sha512-vHRFWtJJB/SiogWDF0ypoKfRIZ41Kq+G9cEFj6Qm1eQaAhJ1LDFvgZ7Ja4tb3iLOQhz0PaoPnnOijF1qmEqTxg==" + }, + "@protobuf-ts/runtime-rpc": { + "version": "2.9.4", + "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime-rpc/-/runtime-rpc-2.9.4.tgz", + "integrity": "sha512-y9L9JgnZxXFqH5vD4d7j9duWvIJ7AShyBRoNKJGhu9Q27qIbchfzli66H9RvrQNIFk5ER7z1Twe059WZGqERcA==", + "requires": { + "@protobuf-ts/runtime": "^2.9.4" + } + }, "@types/body-parser": { "version": "1.19.2", "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", @@ -4396,8 +4664,7 @@ "@types/node": { "version": "18.15.11", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", - "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==", - "dev": true + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" }, "@types/qs": { "version": "6.9.7", @@ -4446,10 +4713,9 @@ } }, "@types/ws": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", - "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", - "dev": true, + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", "requires": { "@types/node": "*" } @@ -5082,6 +5348,11 @@ "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -5759,6 +6030,11 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "hyphenate-style-name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz", + "integrity": "sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw==" + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -5852,6 +6128,11 @@ "is-extglob": "^2.1.1" } }, + "is-in-browser": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", + "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -5940,6 +6221,36 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "jss": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss/-/jss-10.10.0.tgz", + "integrity": "sha512-cqsOTS7jqPsPMjtKYDUpdFC0AbhYFLTcuGRqymgmdJIeQ8cH7+AgX7YSgQy79wXloZq2VvATYxUOUQEvS1V/Zw==", + "requires": { + "@babel/runtime": "^7.3.1", + "csstype": "^3.0.2", + "is-in-browser": "^1.1.3", + "tiny-warning": "^1.0.2" + } + }, + "jss-plugin-camel-case": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.10.0.tgz", + "integrity": "sha512-z+HETfj5IYgFxh1wJnUAU8jByI48ED+v0fuTuhKrPR+pRBYS2EDwbusU8aFOpCdYhtRc9zhN+PJ7iNE8pAWyPw==", + "requires": { + "@babel/runtime": "^7.3.1", + "hyphenate-style-name": "^1.0.3", + "jss": "10.10.0" + } + }, + "jss-plugin-global": { + "version": "10.10.0", + "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.10.0.tgz", + "integrity": "sha512-icXEYbMufiNuWfuazLeN+BNJO16Ge88OcXU5ZDC2vLqElmMybA31Wi7lZ3lf+vgufRocvPj8443irhYRgWxP+A==", + "requires": { + "@babel/runtime": "^7.3.1", + "jss": "10.10.0" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -6528,6 +6839,11 @@ "resolve": "^1.20.0" } }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==" + }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -6623,6 +6939,11 @@ "ajv-keywords": "^3.5.2" } }, + "sdp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/sdp/-/sdp-3.2.0.tgz", + "integrity": "sha512-d7wDPgDV3DDiqulJjKiV2865wKsJ34YI+NDREbm+FySq6WuKOikwyNQcm+doLAZ1O6ltdO0SeKle2xMpN3Brgw==" + }, "select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", @@ -6981,6 +7302,11 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "tiny-warning": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", + "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7362,10 +7688,9 @@ "dev": true }, "ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "requires": {} }, "yallist": { diff --git a/library/package.json b/library/package.json index be93abe8..9be2f11b 100644 --- a/library/package.json +++ b/library/package.json @@ -1,6 +1,6 @@ { "name": "@tensorworks/libspsfrontend", - "version": "0.3.4", + "version": "0.4.0", "description": "The Scalable Pixel Streaming Frontend Library consuming Epic Games' Pixel Streaming Frontend", "main": "dist/libspsfrontend.min.js", "module": "dist/libspsfrontend.esm.js", @@ -14,7 +14,8 @@ "author": "TensorWorks Pty Ltd", "license": "MIT", "dependencies": { - + "@epicgames-ps/lib-pixelstreamingfrontend-ue5.5": "^0.1.2", + "@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5": "^0.1.0" }, "devDependencies": { "css-loader": "^6.7.3", diff --git a/library/src/SPSApplication.ts b/library/src/SPSApplication.ts index 9d5c939b..695add21 100644 --- a/library/src/SPSApplication.ts +++ b/library/src/SPSApplication.ts @@ -60,25 +60,26 @@ export class SPSApplication extends Application { // SPS needs to build a specific signalling server url based on the application name so K8s can distinguish it this.stream.setSignallingUrlBuilder(() => { - // if we have overriden the signalling server URL with a .env file use it here + // If we have overriden the signalling server URL with a .env file use it here if (WEBSOCKET_URL !== undefined ) { return WEBSOCKET_URL as string; } - // get the current signalling url - let signallingUrl = this.stream.config.getTextSettingValue(TextParameters.SignallingServerUrl); - - if(signallingUrl.includes("/signalling") || signallingUrl.includes("/signalling/")) - { - return signallingUrl; - } - else - { - // build the signalling URL based on the existing window location, the result should be 'domain.com/signalling/app-name' - signallingUrl = signallingUrl.endsWith("/") ? signallingUrl + "signalling" + window.location.pathname : signallingUrl + "/signalling" + window.location.pathname; + // If there is signalling url specified, then use that. + let customSignallingUrl = this.stream.config.getTextSettingValue(TextParameters.SignallingServerUrl); + if(customSignallingUrl && customSignallingUrl !== "") { + return customSignallingUrl; } - return signallingUrl + // If neither environment used or customSignallingUrl specified, then build the URL using the domain we are on. + + // Construct the signalling url from the base url, prepend protocol, then append /signalling, then append /rest-of-path?myargs + const urlProtocol: string = window.location.protocol === 'http:' ? 'ws://' : 'wss://'; + const urlBase: string = window.location.host; + const urlPath: string = window.location.pathname; + // Build the signalling URL based on the existing window location, the result should be 'domain.com/signalling/app-name' + const signallingUrl = urlProtocol + urlBase + "/signalling" + urlPath; + return signallingUrl; }); }