@stormstreaming/stormstreamer 0.9.1-beta.2 → 0.9.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amd/index.js +93 -37
- package/dist/cjs/index.js +4 -4
- package/dist/esm/index.js +4 -4
- package/dist/iife/index.js +5 -5
- package/dist/types/StormStreamer.d.ts +2 -1
- package/dist/types/playback/PlaybackController.d.ts +2 -0
- package/dist/types/playback/enum/DeviceState.d.ts +2 -1
- package/dist/types/playback/enum/StreamerState.d.ts +2 -1
- package/dist/umd/index.js +5 -5
- package/package.json +1 -1
package/dist/amd/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* contact@stormstreaming.com
|
|
5
5
|
* https://stormstreaming.com
|
|
6
6
|
*
|
|
7
|
-
* Version: 0.9.1-beta.
|
|
8
|
-
* Version: 1/
|
|
7
|
+
* Version: 0.9.1-beta.3
|
|
8
|
+
* Version: 1/25/2025, 7:07:05 AM
|
|
9
9
|
*
|
|
10
10
|
* LEGAL NOTICE:
|
|
11
11
|
* This software is subject to the terms and conditions defined in
|
|
@@ -13,6 +13,38 @@
|
|
|
13
13
|
*
|
|
14
14
|
*/define(['exports'], (function (exports) { 'use strict';
|
|
15
15
|
|
|
16
|
+
/******************************************************************************
|
|
17
|
+
Copyright (c) Microsoft Corporation.
|
|
18
|
+
|
|
19
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
+
purpose with or without fee is hereby granted.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
+
***************************************************************************** */
|
|
30
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
44
|
+
var e = new Error(message);
|
|
45
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
46
|
+
};
|
|
47
|
+
|
|
16
48
|
class StormServerItem {
|
|
17
49
|
constructor(host, application, port = 443, isSSL = true) {
|
|
18
50
|
this.host = host;
|
|
@@ -2093,38 +2125,6 @@
|
|
|
2093
2125
|
}
|
|
2094
2126
|
StageController.LOG_ACTIVITY = true;
|
|
2095
2127
|
|
|
2096
|
-
/******************************************************************************
|
|
2097
|
-
Copyright (c) Microsoft Corporation.
|
|
2098
|
-
|
|
2099
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
2100
|
-
purpose with or without fee is hereby granted.
|
|
2101
|
-
|
|
2102
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
2103
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
2104
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
2105
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
2106
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
2107
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
2108
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
2109
|
-
***************************************************************************** */
|
|
2110
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2114
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2115
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2116
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2117
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2118
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2119
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2120
|
-
});
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
2124
|
-
var e = new Error(message);
|
|
2125
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
2126
|
-
};
|
|
2127
|
-
|
|
2128
2128
|
class MungeSDP {
|
|
2129
2129
|
constructor() {}
|
|
2130
2130
|
addAudio(sdpStr, audioLine) {
|
|
@@ -2578,6 +2578,7 @@
|
|
|
2578
2578
|
StreamerState["UPDATING"] = "UPDATING";
|
|
2579
2579
|
StreamerState["INVALID"] = "INVALID";
|
|
2580
2580
|
StreamerState["UNKNOWN"] = "UNKNOWN";
|
|
2581
|
+
StreamerState["STOPPED"] = "STOPPED";
|
|
2581
2582
|
})(exports.StreamerState || (exports.StreamerState = {}));
|
|
2582
2583
|
|
|
2583
2584
|
exports.DeviceState = void 0;
|
|
@@ -2586,6 +2587,7 @@
|
|
|
2586
2587
|
DeviceState["ENABLED"] = "ENABLED";
|
|
2587
2588
|
DeviceState["ACCESS_DENIED"] = "ACCESS_DENIED";
|
|
2588
2589
|
DeviceState["NOT_FOUND"] = "NOT_FOUND";
|
|
2590
|
+
DeviceState["STOPPED"] = "STOPPED";
|
|
2589
2591
|
})(exports.DeviceState || (exports.DeviceState = {}));
|
|
2590
2592
|
|
|
2591
2593
|
var ConnectionState;
|
|
@@ -3979,6 +3981,51 @@
|
|
|
3979
3981
|
}
|
|
3980
3982
|
}
|
|
3981
3983
|
}
|
|
3984
|
+
stop() {
|
|
3985
|
+
if (this._statusConnection) {
|
|
3986
|
+
this._statusConnection.destroy();
|
|
3987
|
+
this._statusConnection = null;
|
|
3988
|
+
}
|
|
3989
|
+
if (this._statusTimer) {
|
|
3990
|
+
clearInterval(this._statusTimer);
|
|
3991
|
+
this._statusTimer = null;
|
|
3992
|
+
}
|
|
3993
|
+
this.closeWebRTCConnection();
|
|
3994
|
+
this.stopCameraStream();
|
|
3995
|
+
this.setPublishState(exports.PublishState.STOPPED);
|
|
3996
|
+
this.setInputDeviceState(exports.StreamerState.STOPPED);
|
|
3997
|
+
this.setCameraState(exports.DeviceState.STOPPED);
|
|
3998
|
+
this.setMicrophoneState(exports.DeviceState.STOPPED);
|
|
3999
|
+
if (this._restartTimer) {
|
|
4000
|
+
clearInterval(this._restartTimer);
|
|
4001
|
+
this._restartTimer = null;
|
|
4002
|
+
}
|
|
4003
|
+
this._restartTimerCount = 0;
|
|
4004
|
+
clearTimeout(this._publishTimer);
|
|
4005
|
+
}
|
|
4006
|
+
start() {
|
|
4007
|
+
var _a, _b, _c;
|
|
4008
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4009
|
+
try {
|
|
4010
|
+
this._publishState = exports.PublishState.NOT_INITIALIZED;
|
|
4011
|
+
this._inputDeviceState = exports.StreamerState.NOT_INITIALIZED;
|
|
4012
|
+
this._cameraState = exports.DeviceState.NOT_INITIALIZED;
|
|
4013
|
+
this._microphoneState = exports.DeviceState.NOT_INITIALIZED;
|
|
4014
|
+
yield this.initializeDevices();
|
|
4015
|
+
yield this.startCamera();
|
|
4016
|
+
if ((_a = this._main.getConfigManager()) === null || _a === void 0 ? void 0 : _a.getSettingsData().autoConnect) {
|
|
4017
|
+
(_b = this._main.getNetworkController()) === null || _b === void 0 ? void 0 : _b.initialize();
|
|
4018
|
+
}
|
|
4019
|
+
if ((_c = this._main.getConfigManager()) === null || _c === void 0 ? void 0 : _c.getStreamData().streamKey) {
|
|
4020
|
+
this.createStatusConnection();
|
|
4021
|
+
}
|
|
4022
|
+
} catch (error) {
|
|
4023
|
+
this._logger.error(this, "Start failed: " + JSON.stringify(error));
|
|
4024
|
+
this.setInputDeviceState(exports.StreamerState.INVALID);
|
|
4025
|
+
throw error;
|
|
4026
|
+
}
|
|
4027
|
+
});
|
|
4028
|
+
}
|
|
3982
4029
|
destroy() {
|
|
3983
4030
|
if (window.screen && window.screen.orientation) {
|
|
3984
4031
|
window.screen.orientation.removeEventListener('change', this.handleOrientationChange);
|
|
@@ -4193,8 +4240,8 @@
|
|
|
4193
4240
|
constructor(streamConfig, autoInitialize = false) {
|
|
4194
4241
|
super();
|
|
4195
4242
|
this.DEV_MODE = true;
|
|
4196
|
-
this.STREAMER_VERSION = "0.9.1-beta.
|
|
4197
|
-
this.COMPILE_DATE = "1/
|
|
4243
|
+
this.STREAMER_VERSION = "0.9.1-beta.3";
|
|
4244
|
+
this.COMPILE_DATE = "1/25/2025, 7:07:04 AM";
|
|
4198
4245
|
this.STREAMER_BRANCH = "Experimental";
|
|
4199
4246
|
this.STREAMER_PROTOCOL_VERSION = 1;
|
|
4200
4247
|
this._initialized = false;
|
|
@@ -4249,7 +4296,6 @@
|
|
|
4249
4296
|
});
|
|
4250
4297
|
}
|
|
4251
4298
|
}
|
|
4252
|
-
stop() {}
|
|
4253
4299
|
isConnected() {
|
|
4254
4300
|
var _a, _b;
|
|
4255
4301
|
return (_b = (_a = this._networkController) === null || _a === void 0 ? void 0 : _a.getConnection().isConnectionActive()) !== null && _b !== void 0 ? _b : false;
|
|
@@ -4501,6 +4547,16 @@
|
|
|
4501
4547
|
dispatchEvent(eventName, event) {
|
|
4502
4548
|
super.dispatchEvent(eventName, event);
|
|
4503
4549
|
}
|
|
4550
|
+
start() {
|
|
4551
|
+
var _a;
|
|
4552
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4553
|
+
return (_a = this._playbackController) === null || _a === void 0 ? void 0 : _a.start();
|
|
4554
|
+
});
|
|
4555
|
+
}
|
|
4556
|
+
stop() {
|
|
4557
|
+
var _a;
|
|
4558
|
+
return (_a = this._playbackController) === null || _a === void 0 ? void 0 : _a.stop();
|
|
4559
|
+
}
|
|
4504
4560
|
destroy() {
|
|
4505
4561
|
var _a, _b, _c, _d;
|
|
4506
4562
|
this._logger.warning(this, "Destroying library instance, bye, bye!");
|