@arcware-cloud/pixelstreaming-websdk 1.3.10 → 1.3.12
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 +5 -0
- package/index.cjs.js +3 -32
- package/index.esm.js +8 -37
- package/index.umd.js +3 -32
- package/package.json +1 -1
- package/types/lib/ArcwareConfig.d.ts +1 -1
- package/types/lib/features/common.d.ts +0 -2
package/README.md
CHANGED
|
@@ -80,6 +80,11 @@ For more detailed examples and advanced usage, please refer to our documentation
|
|
|
80
80
|
|
|
81
81
|
# Changelog
|
|
82
82
|
|
|
83
|
+
### 1.3.12
|
|
84
|
+
|
|
85
|
+
- added orientationZoom field for managing zoom
|
|
86
|
+
- fixed stream-ui issue (occurred on React.js)
|
|
87
|
+
|
|
83
88
|
### 1.3.9
|
|
84
89
|
|
|
85
90
|
- added an event handler to check if video is streaming if cloud requests evidence
|
package/index.cjs.js
CHANGED
|
@@ -23420,7 +23420,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23420
23420
|
if (!config.initialSettings.ss)
|
|
23421
23421
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23422
23422
|
super(config);
|
|
23423
|
-
this.VERSION = "1.3.
|
|
23423
|
+
this.VERSION = "1.3.12";
|
|
23424
23424
|
this.settings = settings;
|
|
23425
23425
|
this.session = new Session_1.Session();
|
|
23426
23426
|
this._initialSettings = config.initialSettings;
|
|
@@ -24129,17 +24129,9 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24129
24129
|
limitedHeight = maxHeight;
|
|
24130
24130
|
limitedWidth = maxHeight * aspectRatio;
|
|
24131
24131
|
}
|
|
24132
|
-
// width: clientWidth * Math.max(window.devicePixelRatio, 1) - for retina device, 1 is min upscale factor
|
|
24133
|
-
const newRes = (0, common_1.capScale)({
|
|
24134
|
-
width: browserWidth * Math.max(window.devicePixelRatio, 1.25),
|
|
24135
|
-
height: browserHeight * Math.max(window.devicePixelRatio, 1.25),
|
|
24136
|
-
}, {
|
|
24137
|
-
width: maxWidth,
|
|
24138
|
-
height: maxHeight,
|
|
24139
|
-
});
|
|
24140
24132
|
// Zoom level for orientation change if provided
|
|
24141
24133
|
if (orientationZoom) {
|
|
24142
|
-
if (
|
|
24134
|
+
if (browserWidth < browserHeight) {
|
|
24143
24135
|
if (orientationZoom.hasOwnProperty('portrait'))
|
|
24144
24136
|
(_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.emitUIInteraction({
|
|
24145
24137
|
zoom: orientationZoom.portrait
|
|
@@ -25214,7 +25206,7 @@ exports.DiagnosticsCollector = DiagnosticsCollector;
|
|
|
25214
25206
|
|
|
25215
25207
|
|
|
25216
25208
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25217
|
-
exports.
|
|
25209
|
+
exports.waitForElement = exports.normalizeType = exports.randomHash = exports.extFromMime = exports.sanitizeFilename = exports.truncateByBytes = exports.parseUnknownToObject = void 0;
|
|
25218
25210
|
/** Conservative normalizer: accepts object, strict JSON string, or JSON-ish like {foo: "bar"} */
|
|
25219
25211
|
function parseUnknownToObject(input, opts = { allowJsonish: true }) {
|
|
25220
25212
|
if (input && typeof input === "object")
|
|
@@ -25333,27 +25325,6 @@ function waitForElement(selector, { root = document, timeout = 3000 } = {}) {
|
|
|
25333
25325
|
});
|
|
25334
25326
|
}
|
|
25335
25327
|
exports.waitForElement = waitForElement;
|
|
25336
|
-
function capScale(size, max) {
|
|
25337
|
-
const result = { width: 0, height: 0 };
|
|
25338
|
-
/* result.width = size.width > max.width ? max.width : size.width;
|
|
25339
|
-
result.height = size.height > max.height ? max.height : size.height; */
|
|
25340
|
-
result.width = Math.floor(size.width);
|
|
25341
|
-
result.height = Math.floor(size.height);
|
|
25342
|
-
if (result.height > max.height) {
|
|
25343
|
-
const heightScale = max.height / result.height;
|
|
25344
|
-
result.height = max.height;
|
|
25345
|
-
result.width *= heightScale;
|
|
25346
|
-
}
|
|
25347
|
-
if (result.width > max.width) {
|
|
25348
|
-
const heightScale = max.width / result.width;
|
|
25349
|
-
result.width = max.width;
|
|
25350
|
-
result.height *= heightScale;
|
|
25351
|
-
}
|
|
25352
|
-
result.width = (result.width % 2) + result.width;
|
|
25353
|
-
result.height = (result.height % 2) + result.height;
|
|
25354
|
-
return result;
|
|
25355
|
-
}
|
|
25356
|
-
exports.capScale = capScale;
|
|
25357
25328
|
|
|
25358
25329
|
|
|
25359
25330
|
/***/ }),
|
package/index.esm.js
CHANGED
|
@@ -23428,7 +23428,7 @@ class ArcwareConfig extends _epicgames_ps_lib_pixelstreamingfrontend_ue5_5__WEBP
|
|
|
23428
23428
|
if (!config.initialSettings.ss)
|
|
23429
23429
|
config.initialSettings.ss = DefaultUrl;
|
|
23430
23430
|
super(config);
|
|
23431
|
-
this.VERSION = "1.3.
|
|
23431
|
+
this.VERSION = "1.3.12";
|
|
23432
23432
|
this.settings = settings;
|
|
23433
23433
|
this.session = new _domain_Session__WEBPACK_IMPORTED_MODULE_0__.Session();
|
|
23434
23434
|
this._initialSettings = config.initialSettings;
|
|
@@ -23581,12 +23581,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23581
23581
|
/* harmony import */ var _domain_EventHandler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3379);
|
|
23582
23582
|
/* harmony import */ var _domain_Stats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9764);
|
|
23583
23583
|
/* harmony import */ var _domain_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9580);
|
|
23584
|
-
/* harmony import */ var
|
|
23585
|
-
/* harmony import */ var
|
|
23584
|
+
/* harmony import */ var _ui_LoveLetters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(4572);
|
|
23585
|
+
/* harmony import */ var _ui_ArcwareLogoLoader__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6469);
|
|
23586
23586
|
/* harmony import */ var _ui_MicrophoneOverlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(3613);
|
|
23587
23587
|
/* harmony import */ var _domain_ConnectionIdentifier__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5999);
|
|
23588
23588
|
/* harmony import */ var _features_DiagnosticsCollector__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8429);
|
|
23589
|
-
/* harmony import */ var
|
|
23589
|
+
/* harmony import */ var _features_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2483);
|
|
23590
23590
|
|
|
23591
23591
|
|
|
23592
23592
|
|
|
@@ -24155,17 +24155,9 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24155
24155
|
limitedHeight = maxHeight;
|
|
24156
24156
|
limitedWidth = maxHeight * aspectRatio;
|
|
24157
24157
|
}
|
|
24158
|
-
// width: clientWidth * Math.max(window.devicePixelRatio, 1) - for retina device, 1 is min upscale factor
|
|
24159
|
-
const newRes = (0,_features_common__WEBPACK_IMPORTED_MODULE_12__.capScale)({
|
|
24160
|
-
width: browserWidth * Math.max(window.devicePixelRatio, 1.25),
|
|
24161
|
-
height: browserHeight * Math.max(window.devicePixelRatio, 1.25),
|
|
24162
|
-
}, {
|
|
24163
|
-
width: maxWidth,
|
|
24164
|
-
height: maxHeight,
|
|
24165
|
-
});
|
|
24166
24158
|
// Zoom level for orientation change if provided
|
|
24167
24159
|
if (orientationZoom) {
|
|
24168
|
-
if (
|
|
24160
|
+
if (browserWidth < browserHeight) {
|
|
24169
24161
|
if (orientationZoom.hasOwnProperty('portrait'))
|
|
24170
24162
|
(_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.emitUIInteraction({
|
|
24171
24163
|
zoom: orientationZoom.portrait
|
|
@@ -24240,7 +24232,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24240
24232
|
}
|
|
24241
24233
|
initLoveLettersContainer() {
|
|
24242
24234
|
var _a;
|
|
24243
|
-
const logoLoader = new
|
|
24235
|
+
const logoLoader = new _ui_ArcwareLogoLoader__WEBPACK_IMPORTED_MODULE_12__.ArcwareLogoLoader();
|
|
24244
24236
|
if (!this.loveLettersContainer) {
|
|
24245
24237
|
const loveLettersContainer = document === null || document === void 0 ? void 0 : document.createElement("div");
|
|
24246
24238
|
const { videoPlayer } = this === null || this === void 0 ? void 0 : this.webRtcController;
|
|
@@ -24277,7 +24269,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24277
24269
|
if (letter !== undefined) {
|
|
24278
24270
|
const formattedLoveLetter = letter === null || letter === void 0 ? void 0 : letter.replace(/LL: |\.$/g, "");
|
|
24279
24271
|
(_a = this === null || this === void 0 ? void 0 : this.loveLettersList) === null || _a === void 0 ? void 0 : _a.push(formattedLoveLetter);
|
|
24280
|
-
const loveLettersBox = new
|
|
24272
|
+
const loveLettersBox = new _ui_LoveLetters__WEBPACK_IMPORTED_MODULE_13__.LoveLetters();
|
|
24281
24273
|
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);
|
|
24282
24274
|
setTimeout(() => {
|
|
24283
24275
|
this.processLoveLetterQueue();
|
|
@@ -24366,7 +24358,7 @@ class ArcwarePixelStreaming extends _epicgames_ps_lib_pixelstreamingfrontend_ue5
|
|
|
24366
24358
|
}
|
|
24367
24359
|
}
|
|
24368
24360
|
injectCustomUI() {
|
|
24369
|
-
(0,
|
|
24361
|
+
(0,_features_common__WEBPACK_IMPORTED_MODULE_14__.waitForElement)('#stream-ui')
|
|
24370
24362
|
.then(el => {
|
|
24371
24363
|
var _a;
|
|
24372
24364
|
const videoElementParent = (_a = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
@@ -25252,7 +25244,6 @@ class DiagnosticsCollector {
|
|
|
25252
25244
|
|
|
25253
25245
|
__webpack_require__.r(__webpack_exports__);
|
|
25254
25246
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25255
|
-
/* harmony export */ "capScale": () => (/* binding */ capScale),
|
|
25256
25247
|
/* harmony export */ "extFromMime": () => (/* binding */ extFromMime),
|
|
25257
25248
|
/* harmony export */ "normalizeType": () => (/* binding */ normalizeType),
|
|
25258
25249
|
/* harmony export */ "parseUnknownToObject": () => (/* binding */ parseUnknownToObject),
|
|
@@ -25372,26 +25363,6 @@ function waitForElement(selector, { root = document, timeout = 3000 } = {}) {
|
|
|
25372
25363
|
}, timeout);
|
|
25373
25364
|
});
|
|
25374
25365
|
}
|
|
25375
|
-
function capScale(size, max) {
|
|
25376
|
-
const result = { width: 0, height: 0 };
|
|
25377
|
-
/* result.width = size.width > max.width ? max.width : size.width;
|
|
25378
|
-
result.height = size.height > max.height ? max.height : size.height; */
|
|
25379
|
-
result.width = Math.floor(size.width);
|
|
25380
|
-
result.height = Math.floor(size.height);
|
|
25381
|
-
if (result.height > max.height) {
|
|
25382
|
-
const heightScale = max.height / result.height;
|
|
25383
|
-
result.height = max.height;
|
|
25384
|
-
result.width *= heightScale;
|
|
25385
|
-
}
|
|
25386
|
-
if (result.width > max.width) {
|
|
25387
|
-
const heightScale = max.width / result.width;
|
|
25388
|
-
result.width = max.width;
|
|
25389
|
-
result.height *= heightScale;
|
|
25390
|
-
}
|
|
25391
|
-
result.width = (result.width % 2) + result.width;
|
|
25392
|
-
result.height = (result.height % 2) + result.height;
|
|
25393
|
-
return result;
|
|
25394
|
-
}
|
|
25395
25366
|
|
|
25396
25367
|
|
|
25397
25368
|
/***/ }),
|
package/index.umd.js
CHANGED
|
@@ -23430,7 +23430,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
|
|
|
23430
23430
|
if (!config.initialSettings.ss)
|
|
23431
23431
|
config.initialSettings.ss = exports.DefaultUrl;
|
|
23432
23432
|
super(config);
|
|
23433
|
-
this.VERSION = "1.3.
|
|
23433
|
+
this.VERSION = "1.3.12";
|
|
23434
23434
|
this.settings = settings;
|
|
23435
23435
|
this.session = new Session_1.Session();
|
|
23436
23436
|
this._initialSettings = config.initialSettings;
|
|
@@ -24139,17 +24139,9 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
|
|
|
24139
24139
|
limitedHeight = maxHeight;
|
|
24140
24140
|
limitedWidth = maxHeight * aspectRatio;
|
|
24141
24141
|
}
|
|
24142
|
-
// width: clientWidth * Math.max(window.devicePixelRatio, 1) - for retina device, 1 is min upscale factor
|
|
24143
|
-
const newRes = (0, common_1.capScale)({
|
|
24144
|
-
width: browserWidth * Math.max(window.devicePixelRatio, 1.25),
|
|
24145
|
-
height: browserHeight * Math.max(window.devicePixelRatio, 1.25),
|
|
24146
|
-
}, {
|
|
24147
|
-
width: maxWidth,
|
|
24148
|
-
height: maxHeight,
|
|
24149
|
-
});
|
|
24150
24142
|
// Zoom level for orientation change if provided
|
|
24151
24143
|
if (orientationZoom) {
|
|
24152
|
-
if (
|
|
24144
|
+
if (browserWidth < browserHeight) {
|
|
24153
24145
|
if (orientationZoom.hasOwnProperty('portrait'))
|
|
24154
24146
|
(_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.emitUIInteraction({
|
|
24155
24147
|
zoom: orientationZoom.portrait
|
|
@@ -25224,7 +25216,7 @@ exports.DiagnosticsCollector = DiagnosticsCollector;
|
|
|
25224
25216
|
|
|
25225
25217
|
|
|
25226
25218
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
25227
|
-
exports.
|
|
25219
|
+
exports.waitForElement = exports.normalizeType = exports.randomHash = exports.extFromMime = exports.sanitizeFilename = exports.truncateByBytes = exports.parseUnknownToObject = void 0;
|
|
25228
25220
|
/** Conservative normalizer: accepts object, strict JSON string, or JSON-ish like {foo: "bar"} */
|
|
25229
25221
|
function parseUnknownToObject(input, opts = { allowJsonish: true }) {
|
|
25230
25222
|
if (input && typeof input === "object")
|
|
@@ -25343,27 +25335,6 @@ function waitForElement(selector, { root = document, timeout = 3000 } = {}) {
|
|
|
25343
25335
|
});
|
|
25344
25336
|
}
|
|
25345
25337
|
exports.waitForElement = waitForElement;
|
|
25346
|
-
function capScale(size, max) {
|
|
25347
|
-
const result = { width: 0, height: 0 };
|
|
25348
|
-
/* result.width = size.width > max.width ? max.width : size.width;
|
|
25349
|
-
result.height = size.height > max.height ? max.height : size.height; */
|
|
25350
|
-
result.width = Math.floor(size.width);
|
|
25351
|
-
result.height = Math.floor(size.height);
|
|
25352
|
-
if (result.height > max.height) {
|
|
25353
|
-
const heightScale = max.height / result.height;
|
|
25354
|
-
result.height = max.height;
|
|
25355
|
-
result.width *= heightScale;
|
|
25356
|
-
}
|
|
25357
|
-
if (result.width > max.width) {
|
|
25358
|
-
const heightScale = max.width / result.width;
|
|
25359
|
-
result.width = max.width;
|
|
25360
|
-
result.height *= heightScale;
|
|
25361
|
-
}
|
|
25362
|
-
result.width = (result.width % 2) + result.width;
|
|
25363
|
-
result.height = (result.height % 2) + result.height;
|
|
25364
|
-
return result;
|
|
25365
|
-
}
|
|
25366
|
-
exports.capScale = capScale;
|
|
25367
25338
|
|
|
25368
25339
|
|
|
25369
25340
|
/***/ }),
|
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.12",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./index.umd.js",
|
|
7
7
|
"module": "./index.umd.js",
|
|
@@ -26,7 +26,7 @@ export declare class ArcwareConfig extends Config {
|
|
|
26
26
|
readonly session: Session;
|
|
27
27
|
readonly settings: Settings;
|
|
28
28
|
private _initialSettings;
|
|
29
|
-
readonly VERSION = "1.3.
|
|
29
|
+
readonly VERSION = "1.3.12";
|
|
30
30
|
constructor(config: ArcwareConfigParams);
|
|
31
31
|
/** Setup connection string. */
|
|
32
32
|
get urlFlags(): string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Size } from "@arcware-cloud/shared/signalling-communication";
|
|
2
1
|
/** Conservative normalizer: accepts object, strict JSON string, or JSON-ish like {foo: "bar"} */
|
|
3
2
|
export declare function parseUnknownToObject(input: unknown, opts?: {
|
|
4
3
|
allowJsonish?: boolean;
|
|
@@ -16,4 +15,3 @@ export declare function waitForElement(selector: string, { root, timeout }?: {
|
|
|
16
15
|
root?: Document;
|
|
17
16
|
timeout?: number;
|
|
18
17
|
}): Promise<any>;
|
|
19
|
-
export declare function capScale(size: Size, max: Size): Size;
|