@stormstreaming/stormstreamer 0.9.2-beta.3 → 1.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/LICENSE +133 -0
- package/README.md +278 -3
- package/dist/amd/index.js +2244 -103
- package/dist/cjs/index.js +4 -4
- package/dist/esm/index.js +13 -13
- package/dist/iife/index.js +5 -5
- package/dist/types/StormStreamer.d.ts +393 -2
- package/dist/types/config/AudioData.d.ts +46 -0
- package/dist/types/config/ConfigManager.d.ts +47 -0
- package/dist/types/config/DebugData.d.ts +108 -0
- package/dist/types/config/IConfig.d.ts +3 -0
- package/dist/types/config/SettingsData.d.ts +114 -0
- package/dist/types/config/StorageData.d.ts +46 -0
- package/dist/types/config/StreamData.d.ts +75 -0
- package/dist/types/config/VideoData.d.ts +115 -0
- package/dist/types/config/enum/LogType.d.ts +3 -0
- package/dist/types/config/enum/ProtocolType.d.ts +3 -0
- package/dist/types/config/enum/ScalingType.d.ts +3 -0
- package/dist/types/config/enum/SecurityType.d.ts +3 -0
- package/dist/types/config/enum/SizeCalculationType.d.ts +3 -0
- package/dist/types/events/EventDispatcher.d.ts +34 -0
- package/dist/types/events/StormStreamerEvent.d.ts +141 -0
- package/dist/types/graph/MicrophoneGraph.d.ts +11 -0
- package/dist/types/logger/Logger.d.ts +103 -0
- package/dist/types/model/AbstractSourceItem.d.ts +23 -0
- package/dist/types/model/GatewayServerItem.d.ts +53 -0
- package/dist/types/model/IServerItem.d.ts +3 -0
- package/dist/types/model/ISourceItem.d.ts +3 -0
- package/dist/types/model/IStreamItem.d.ts +3 -0
- package/dist/types/model/RTMPSourceItem.d.ts +50 -0
- package/dist/types/model/RTSPSourceItem.d.ts +50 -0
- package/dist/types/model/StormMetaDataItem.d.ts +3 -0
- package/dist/types/model/StormServerItem.d.ts +53 -0
- package/dist/types/model/StormSourceItem.d.ts +27 -0
- package/dist/types/model/StreamInfo.d.ts +46 -0
- package/dist/types/network/AbstractSocket.d.ts +94 -0
- package/dist/types/network/NetworkController.d.ts +33 -0
- package/dist/types/network/WowzaConnection.d.ts +63 -0
- package/dist/types/network/WowzaStatusConnection.d.ts +54 -0
- package/dist/types/playback/CooldownMonitor.d.ts +17 -0
- package/dist/types/playback/StreamerController.d.ts +271 -0
- package/dist/types/playback/enum/ConnectionState.d.ts +3 -0
- package/dist/types/playback/player/AbstractPlayer.d.ts +23 -0
- package/dist/types/playback/task/IPlaybackTask.d.ts +3 -0
- package/dist/types/stage/ScreenElement.d.ts +54 -0
- package/dist/types/stage/StageController.d.ts +86 -0
- package/dist/types/statistics/StatsController.d.ts +8 -0
- package/dist/types/storage/StorageManager.d.ts +37 -0
- package/dist/types/utilities/DomUtilities.d.ts +7 -0
- package/dist/types/utilities/NumberUtilities.d.ts +7 -0
- package/dist/types/utilities/UserCapabilities.d.ts +44 -0
- package/dist/umd/index.js +5 -5
- package/package.json +6 -2
- package/samples/index_amd.html +50 -0
- package/samples/index_esm.html +46 -0
- package/samples/index_iife.html +45 -0
- package/samples/index_umd.html +45 -0
|
@@ -1,15 +1,49 @@
|
|
|
1
1
|
import { StormStreamerEvent } from "./StormStreamerEvent";
|
|
2
2
|
import { StormStreamerListener } from "./StormStreamerListener";
|
|
3
3
|
import { Logger } from "../logger/Logger";
|
|
4
|
+
/**
|
|
5
|
+
* General class for event-listeners
|
|
6
|
+
*/
|
|
4
7
|
export declare class EventDispatcher {
|
|
8
|
+
/**
|
|
9
|
+
* Whenever instance of this class has been removed
|
|
10
|
+
* @protected
|
|
11
|
+
*/
|
|
5
12
|
protected _isRemoved: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Logger attached to this player
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
6
17
|
protected _logger: Logger;
|
|
18
|
+
/**
|
|
19
|
+
* An array storing all the listeners
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
7
22
|
protected _listeners: {
|
|
8
23
|
[K in keyof StormStreamerEvent]?: Array<StormStreamerListener<K>>;
|
|
9
24
|
};
|
|
10
25
|
constructor();
|
|
26
|
+
/**
|
|
27
|
+
* Method registers event listener with the object
|
|
28
|
+
* @param eventName name of an event (as a string)
|
|
29
|
+
* @param listener a reference to a method
|
|
30
|
+
* @param removable whenever this listener can be removed or not
|
|
31
|
+
*/
|
|
11
32
|
addEventListener<K extends keyof StormStreamerEvent>(eventName: K, listener: (ev: StormStreamerEvent[K]) => void, removable?: boolean): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Method removes a listener from this object based on event name and used method
|
|
35
|
+
* @param eventName name of an event (as a string)
|
|
36
|
+
* @param listenera reference to a method (optional)
|
|
37
|
+
*/
|
|
12
38
|
removeEventListener<K extends keyof StormStreamerEvent>(eventName: K, listener?: (ev: StormStreamerEvent[K]) => void): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Method removes all event listeners
|
|
41
|
+
*/
|
|
13
42
|
removeAllEventListeners<K extends keyof StormStreamerEvent>(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Method dispatches an event of a given eventName
|
|
45
|
+
* @param eventName
|
|
46
|
+
* @param event
|
|
47
|
+
*/
|
|
14
48
|
dispatchEvent<K extends keyof StormStreamerEvent>(eventName: K, event: StormStreamerEvent[K]): void;
|
|
15
49
|
}
|
|
@@ -7,199 +7,340 @@ import { DeviceState } from "../playback/enum/DeviceState";
|
|
|
7
7
|
import { PublishMetadata } from "../playback/model/PublishMetadata";
|
|
8
8
|
import { StreamStatusInfo } from "../playback/model/StreamStatusInfo";
|
|
9
9
|
export interface StormStreamerEvent {
|
|
10
|
+
/**
|
|
11
|
+
* This event is triggered when a streamer instance is initialized via the initialize() method.
|
|
12
|
+
*/
|
|
10
13
|
"streamerReady": {
|
|
11
14
|
ref: StormStreamer;
|
|
12
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* This event is fired when a streamer instance initiates a connection with a Storm Streaming Server/Cloud instance.
|
|
18
|
+
*/
|
|
13
19
|
"serverConnectionInitiate": {
|
|
14
20
|
ref: StormStreamer;
|
|
15
21
|
serverURL: string;
|
|
16
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* This event is triggered when a streamer instance successfully establishes a connection with a Storm Streaming Server/Cloud instance.
|
|
25
|
+
*/
|
|
17
26
|
"serverConnect": {
|
|
18
27
|
ref: StormStreamer;
|
|
19
28
|
serverURL: string;
|
|
20
29
|
sequenceNum: number;
|
|
21
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* This event is triggered when a streamer instance successfully establishes a connection with a status server.
|
|
33
|
+
*/
|
|
22
34
|
"statusServerConnect": {
|
|
23
35
|
ref: StormStreamer;
|
|
24
36
|
serverURL: string;
|
|
25
37
|
sequenceNum: number;
|
|
26
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* This event is called when a streamer instance is disconnected from the Storm Streaming Server/Cloud (after a connection was previously established), which may occur due to publisher networking issues or Storm Streaming Server/Cloud problems.
|
|
41
|
+
*/
|
|
27
42
|
"serverDisconnect": {
|
|
28
43
|
ref: StormStreamer;
|
|
29
44
|
serverURL: string;
|
|
30
45
|
restart: boolean;
|
|
31
46
|
sequenceNum: number;
|
|
32
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* This event is called when a streamer instance is disconnected from the status server.
|
|
50
|
+
*/
|
|
33
51
|
"statusServerDisconnect": {
|
|
34
52
|
ref: StormStreamer;
|
|
35
53
|
serverURL: string;
|
|
36
54
|
restart: boolean;
|
|
37
55
|
sequenceNum: number;
|
|
38
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* This event is triggered when a streamer instance fails to establish a connection with a Storm Streaming Server/Cloud instance, possibly due to networking issues. If there are additional servers on the configuration list and the "restartOnError" parameter is set to true, the streamer will attempt to connect to a different server instead.
|
|
59
|
+
*/
|
|
39
60
|
"serverConnectionError": {
|
|
40
61
|
ref: StormStreamer;
|
|
41
62
|
serverURL: string;
|
|
42
63
|
restart: boolean;
|
|
43
64
|
sequenceNum: number;
|
|
44
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* This event is triggered when a streamer instance fails to establish a connection with a status server.
|
|
68
|
+
*/
|
|
45
69
|
"statusServerConnectionError": {
|
|
46
70
|
ref: StormStreamer;
|
|
47
71
|
serverURL: string;
|
|
48
72
|
restart: boolean;
|
|
49
73
|
sequenceNum: number;
|
|
50
74
|
};
|
|
75
|
+
/**
|
|
76
|
+
* This event is associated with serverConnectionError. If a streamer instance is unable to connect to any of the servers provided in the configuration list, this event indicates that no further action can be taken.
|
|
77
|
+
*/
|
|
51
78
|
"allConnectionsFailed": {
|
|
52
79
|
ref: StormStreamer;
|
|
53
80
|
mode: string;
|
|
54
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Certain browsers and devices do not permit a video element to initiate on its own and necessitate direct user interaction, such as a mouse click or a touch gesture. This event signifies that such an engagement is required.
|
|
84
|
+
*/
|
|
55
85
|
"interactionRequired": {
|
|
56
86
|
ref: StormStreamer;
|
|
57
87
|
mode: string;
|
|
58
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* This event is triggered if a browser or device does not support the required features for streaming. Please note that the streamer will attempt all possible measures to ensure maximum compatibility with a given device.
|
|
91
|
+
*/
|
|
59
92
|
"compatibilityError": {
|
|
60
93
|
ref: StormStreamer;
|
|
61
94
|
message: string;
|
|
62
95
|
};
|
|
96
|
+
/**
|
|
97
|
+
* This event is fired when the preview playback is forcefully paused by the system (not by user interaction).
|
|
98
|
+
*/
|
|
63
99
|
"playbackForcePause": {
|
|
64
100
|
ref: StormStreamer;
|
|
65
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* This event is fired when the preview playback is forcefully muted by the system (not by user interaction).
|
|
104
|
+
*/
|
|
66
105
|
"playbackForceMute": {
|
|
67
106
|
ref: StormStreamer;
|
|
68
107
|
};
|
|
108
|
+
/**
|
|
109
|
+
* This event notifies that video volume was changed (either its value was changed, or video was muted/un-muted).
|
|
110
|
+
*/
|
|
69
111
|
"volumeChange": {
|
|
70
112
|
ref: StormStreamer;
|
|
71
113
|
volume: number;
|
|
72
114
|
muted: boolean;
|
|
73
115
|
invokedBy: "user" | "browser";
|
|
74
116
|
};
|
|
117
|
+
/**
|
|
118
|
+
* This event is triggered whenever a video element within a streamer instance is either created or recreated.
|
|
119
|
+
*/
|
|
75
120
|
"videoElementCreate": {
|
|
76
121
|
ref: StormStreamer;
|
|
77
122
|
videoElement: HTMLVideoElement;
|
|
78
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* This event is fired whenever a streamer is detached or attached to a new container.
|
|
126
|
+
*/
|
|
79
127
|
"containerChange": {
|
|
80
128
|
ref: StormStreamer;
|
|
81
129
|
container: HTMLElement | null;
|
|
82
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* This event is triggered when the video preview size is changed or updated.
|
|
133
|
+
*/
|
|
83
134
|
"resizeUpdate": {
|
|
84
135
|
ref: StormStreamer;
|
|
85
136
|
width: number;
|
|
86
137
|
height: number;
|
|
87
138
|
};
|
|
139
|
+
/**
|
|
140
|
+
* This event is fired when the video preview is successfully unmuted.
|
|
141
|
+
*/
|
|
88
142
|
"videoUnmuted": {
|
|
89
143
|
ref: StormStreamer;
|
|
90
144
|
};
|
|
145
|
+
/**
|
|
146
|
+
* This event is fired if an SSL layer is required for streaming and the browser does not provide it.
|
|
147
|
+
*/
|
|
91
148
|
"SSLError": {
|
|
92
149
|
ref: StormStreamer;
|
|
93
150
|
mode: string;
|
|
94
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* This event is fired when there is a protocol version mismatch between the client and server.
|
|
154
|
+
*/
|
|
95
155
|
"incompatibleProtocol": {
|
|
96
156
|
ref: StormStreamer;
|
|
97
157
|
clientProtocolVer: number;
|
|
98
158
|
serverProtocolVersion: number;
|
|
99
159
|
};
|
|
160
|
+
/**
|
|
161
|
+
* This event is fired when a streamer instance fails to authorize with a server application on Storm Streaming Server/Cloud instance (e.g. incorrect token).
|
|
162
|
+
*/
|
|
100
163
|
"authorizationError": {
|
|
101
164
|
ref: StormStreamer;
|
|
102
165
|
};
|
|
166
|
+
/**
|
|
167
|
+
* This event is called when a streamer instance successfully authorizes with a server application on Storm Streaming Server/Cloud instance.
|
|
168
|
+
*/
|
|
103
169
|
"authorizationComplete": {
|
|
104
170
|
ref: StormStreamer;
|
|
105
171
|
};
|
|
172
|
+
/**
|
|
173
|
+
* This event is fired whenever a Storm Streaming Server/Cloud license expires.
|
|
174
|
+
*/
|
|
106
175
|
"invalidLicense": {
|
|
107
176
|
ref: StormStreamer;
|
|
108
177
|
};
|
|
178
|
+
/**
|
|
179
|
+
* This event notifies that basic stream configuration has been updated.
|
|
180
|
+
*/
|
|
109
181
|
"streamConfigChange": {
|
|
110
182
|
ref: StormStreamer;
|
|
111
183
|
newConfig: ConfigManager;
|
|
112
184
|
};
|
|
185
|
+
/**
|
|
186
|
+
* This event is fired whenever a streamer instance enters browser fullscreen mode (either native or overlay type).
|
|
187
|
+
*/
|
|
113
188
|
"fullScreenEnter": {
|
|
114
189
|
ref: StormStreamer;
|
|
115
190
|
};
|
|
191
|
+
/**
|
|
192
|
+
* This event is fired whenever a streamer instance exits fullscreen mode (either native or overlay type).
|
|
193
|
+
*/
|
|
116
194
|
"fullScreenExit": {
|
|
117
195
|
ref: StormStreamer;
|
|
118
196
|
};
|
|
197
|
+
/**
|
|
198
|
+
* This event is triggered when no camera device is found on the system.
|
|
199
|
+
*/
|
|
119
200
|
"noCameraFound": {
|
|
120
201
|
ref: StormStreamer;
|
|
121
202
|
};
|
|
203
|
+
/**
|
|
204
|
+
* This event notifies about changes in the publishing state (e.g., NOT_INITIALIZED, INITIALIZING, PUBLISHING, etc.).
|
|
205
|
+
*/
|
|
122
206
|
"publishStateChange": {
|
|
123
207
|
ref: StormStreamer;
|
|
124
208
|
state: PublishState;
|
|
125
209
|
};
|
|
210
|
+
/**
|
|
211
|
+
* This event is triggered when no microphone device is found on the system.
|
|
212
|
+
*/
|
|
126
213
|
"noMicrophoneFound": {
|
|
127
214
|
ref: StormStreamer;
|
|
128
215
|
};
|
|
216
|
+
/**
|
|
217
|
+
* This event is fired when the list of available input devices (cameras and microphones) is updated.
|
|
218
|
+
*/
|
|
129
219
|
"deviceListUpdate": {
|
|
130
220
|
ref: StormStreamer;
|
|
131
221
|
cameraList: InputDevice[];
|
|
132
222
|
microphoneList: InputDevice[];
|
|
133
223
|
};
|
|
224
|
+
/**
|
|
225
|
+
* This event is triggered when there is an error accessing or using an input device.
|
|
226
|
+
*/
|
|
134
227
|
"inputDeviceError": {
|
|
135
228
|
ref: StormStreamer;
|
|
136
229
|
};
|
|
230
|
+
/**
|
|
231
|
+
* This event is fired when camera access permission is denied by the user or the system.
|
|
232
|
+
*/
|
|
137
233
|
"cameraAccessDenied": {
|
|
138
234
|
ref: StormStreamer;
|
|
139
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* This event notifies about changes in the state of input devices and provides information about selected camera and microphone.
|
|
238
|
+
*/
|
|
140
239
|
"deviceStateChange": {
|
|
141
240
|
ref: StormStreamer;
|
|
142
241
|
state: InputDevicesState;
|
|
143
242
|
selectedCamera: InputDevice | null;
|
|
144
243
|
selectedMicrophone: InputDevice | null;
|
|
145
244
|
};
|
|
245
|
+
/**
|
|
246
|
+
* This event is fired when new metadata about the publishing stream is available.
|
|
247
|
+
*/
|
|
146
248
|
"publishMetadataUpdate": {
|
|
147
249
|
ref: StormStreamer;
|
|
148
250
|
metadata: PublishMetadata;
|
|
149
251
|
};
|
|
252
|
+
/**
|
|
253
|
+
* This event provides updated information about the status of the published stream on the server.
|
|
254
|
+
*/
|
|
150
255
|
"streamStatusUpdate": {
|
|
151
256
|
ref: StormStreamer;
|
|
152
257
|
streamStatus: StreamStatusInfo;
|
|
153
258
|
};
|
|
259
|
+
/**
|
|
260
|
+
* This event notifies about changes in the camera device state and provides information about the selected camera.
|
|
261
|
+
*/
|
|
154
262
|
"cameraDeviceStateChange": {
|
|
155
263
|
ref: StormStreamer;
|
|
156
264
|
state: DeviceState;
|
|
157
265
|
selectedCamera: InputDevice | null;
|
|
158
266
|
};
|
|
267
|
+
/**
|
|
268
|
+
* This event notifies about changes in the microphone device state and provides information about the selected microphone.
|
|
269
|
+
*/
|
|
159
270
|
"microphoneDeviceStateChange": {
|
|
160
271
|
ref: StormStreamer;
|
|
161
272
|
state: DeviceState;
|
|
162
273
|
selectedMicrophone: InputDevice | null;
|
|
163
274
|
};
|
|
275
|
+
/**
|
|
276
|
+
* This event is fired when microphone access permission is denied by the user or the system.
|
|
277
|
+
*/
|
|
164
278
|
"microphoneAccessDenied": {
|
|
165
279
|
ref: StormStreamer;
|
|
166
280
|
};
|
|
281
|
+
/**
|
|
282
|
+
* This event is triggered when a previously saved camera device is no longer available on the system.
|
|
283
|
+
*/
|
|
167
284
|
"savedCameraNotFound": {
|
|
168
285
|
ref: StormStreamer;
|
|
169
286
|
savedDeviceID: string | null;
|
|
170
287
|
};
|
|
288
|
+
/**
|
|
289
|
+
* This event is triggered when a previously saved microphone device is no longer available on the system.
|
|
290
|
+
*/
|
|
171
291
|
"savedMicrophoneNotFound": {
|
|
172
292
|
ref: StormStreamer;
|
|
173
293
|
savedDeviceID: string | null;
|
|
174
294
|
};
|
|
295
|
+
/**
|
|
296
|
+
* This event is fired when attempting to publish with a stream key that is already in use by another publisher.
|
|
297
|
+
*/
|
|
175
298
|
"streamKeyInUse": {
|
|
176
299
|
ref: StormStreamer;
|
|
177
300
|
streamKey: string;
|
|
178
301
|
};
|
|
302
|
+
/**
|
|
303
|
+
* This event is fired periodically when attempting to publish with a stream key that is already in use, providing retry count information.
|
|
304
|
+
*/
|
|
179
305
|
"streamKeyInUseInterval": {
|
|
180
306
|
ref: StormStreamer;
|
|
181
307
|
streamKey: string;
|
|
182
308
|
count: number;
|
|
183
309
|
maxCount: number;
|
|
184
310
|
};
|
|
311
|
+
/**
|
|
312
|
+
* This event provides real-time audio level information from the microphone.
|
|
313
|
+
*/
|
|
185
314
|
"soundMeter": {
|
|
186
315
|
ref: StormStreamer;
|
|
187
316
|
high: number;
|
|
188
317
|
low: number;
|
|
189
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* This event notifies about changes in the microphone mute state.
|
|
321
|
+
*/
|
|
190
322
|
"microphoneStateChange": {
|
|
191
323
|
ref: StormStreamer;
|
|
192
324
|
isMuted: boolean;
|
|
193
325
|
};
|
|
326
|
+
/**
|
|
327
|
+
* This event provides metadata about the video being published, including dimensions.
|
|
328
|
+
*/
|
|
194
329
|
"metadata": {
|
|
195
330
|
ref: StormStreamer;
|
|
196
331
|
videoWidth: number;
|
|
197
332
|
videoHeight: number;
|
|
198
333
|
};
|
|
334
|
+
/**
|
|
335
|
+
* This event is fired when publishing to a stream key is initiated.
|
|
336
|
+
*/
|
|
199
337
|
"publish": {
|
|
200
338
|
ref: StormStreamer;
|
|
201
339
|
streamKey: string;
|
|
202
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* This event is fired when publishing is stopped.
|
|
343
|
+
*/
|
|
203
344
|
"unpublish": {
|
|
204
345
|
ref: StormStreamer;
|
|
205
346
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StormStreamer } from "../StormStreamer";
|
|
2
|
+
import { IGraph } from "./IGraph";
|
|
3
|
+
export declare class MicrophoneGraph implements IGraph {
|
|
4
|
+
private _object;
|
|
5
|
+
private _main;
|
|
6
|
+
private _graph;
|
|
7
|
+
constructor(main: StormStreamer, container: string | HTMLElement);
|
|
8
|
+
start(): MicrophoneGraph;
|
|
9
|
+
private onStreamStatsUpdate;
|
|
10
|
+
stop(): MicrophoneGraph;
|
|
11
|
+
}
|
|
@@ -1,26 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger that helps outputting messages
|
|
3
|
+
*/
|
|
1
4
|
import { DebugData } from "../config/DebugData";
|
|
2
5
|
import { StormStreamer } from "../StormStreamer";
|
|
3
6
|
export declare class Logger {
|
|
7
|
+
/**
|
|
8
|
+
* Defines what color an info log would be outputted (can be either a color name or #hex)
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
4
11
|
private static INFO_COLOR;
|
|
12
|
+
/**
|
|
13
|
+
* Defines what color a warning log would be outputted (can be either a color name or #hex)
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
5
16
|
private static WARNING_COLOR;
|
|
17
|
+
/**
|
|
18
|
+
* Defines what color an error log would be outputted (can be either a color name or #hex)
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
6
21
|
private static ERROR_COLOR;
|
|
22
|
+
/**
|
|
23
|
+
* Defines what color a success log would be outputted (can be either a color name or #hex)
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
7
26
|
private static SUCCESS_COLOR;
|
|
27
|
+
/**
|
|
28
|
+
* Defines what color a success log would be outputted (can be either a color name or #hex)
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
8
31
|
private static TRACE_COLOR;
|
|
32
|
+
/**
|
|
33
|
+
* Stores original debug config object
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
9
36
|
private _debugConfig;
|
|
37
|
+
/**
|
|
38
|
+
* Reference to main object
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
10
41
|
private _stormStreamer;
|
|
42
|
+
/**
|
|
43
|
+
* List of colors used for monoColor option
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
11
46
|
private colorOrder;
|
|
47
|
+
/**
|
|
48
|
+
* Selected monocolor
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
12
51
|
private _monoColor;
|
|
52
|
+
/**
|
|
53
|
+
* Stores all loges within this array
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
13
56
|
private _logMemory;
|
|
57
|
+
/**
|
|
58
|
+
* Main name of the instance
|
|
59
|
+
* @private
|
|
60
|
+
*/
|
|
14
61
|
private _streamerInstanceID;
|
|
62
|
+
/**
|
|
63
|
+
* Constructor
|
|
64
|
+
*
|
|
65
|
+
* @param config object containing settings for logger
|
|
66
|
+
* @param stormLibrary reference to main class
|
|
67
|
+
*/
|
|
15
68
|
constructor(config: DebugData, stormStreamer: StormStreamer);
|
|
69
|
+
/**
|
|
70
|
+
* Creates new "info" type log
|
|
71
|
+
*
|
|
72
|
+
* @param objectName object that called the log
|
|
73
|
+
* @param message log message
|
|
74
|
+
*/
|
|
16
75
|
info(objectName: any, message: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Creates new "warning" type log
|
|
78
|
+
*
|
|
79
|
+
* @param objectName object that called the log
|
|
80
|
+
* @param message log message
|
|
81
|
+
*/
|
|
17
82
|
warning(objectName: any, message: string): void;
|
|
18
83
|
decoratedLog(text: string, scheme: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Creates new "error" type log
|
|
86
|
+
*
|
|
87
|
+
* @param objectName object that called the log
|
|
88
|
+
* @param message log message
|
|
89
|
+
*/
|
|
19
90
|
error(objectName: any, message: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Creates new "success" type log
|
|
93
|
+
*
|
|
94
|
+
* @param objectName object that called the log
|
|
95
|
+
* @param message log message
|
|
96
|
+
*/
|
|
20
97
|
success(objectName: any, message: string): void;
|
|
98
|
+
/**
|
|
99
|
+
* Creates new "trace" type log
|
|
100
|
+
*
|
|
101
|
+
* @param objectName object that called the log
|
|
102
|
+
* @param message log message
|
|
103
|
+
*/
|
|
21
104
|
trace(objectName: any, message: string): void;
|
|
105
|
+
/**
|
|
106
|
+
* Prepares console message and formats its text
|
|
107
|
+
* @param _objectName object that called the log
|
|
108
|
+
* @param message log message
|
|
109
|
+
* @private
|
|
110
|
+
*/
|
|
22
111
|
private logData;
|
|
112
|
+
/**
|
|
113
|
+
* Writes log to a DOM container
|
|
114
|
+
*
|
|
115
|
+
* @param message the message
|
|
116
|
+
* @param color of the log
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
23
119
|
private writeToContainer;
|
|
120
|
+
/**
|
|
121
|
+
* Sets player id
|
|
122
|
+
* @param playerID
|
|
123
|
+
*/
|
|
24
124
|
setPlayerID(playerID: number): void;
|
|
125
|
+
/**
|
|
126
|
+
* Returns all logs
|
|
127
|
+
*/
|
|
25
128
|
getAllLogs(): Array<string>;
|
|
26
129
|
}
|
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
import { ProtocolType } from "../config/enum/ProtocolType";
|
|
2
2
|
import { StreamInfo } from "./StreamInfo";
|
|
3
|
+
/**
|
|
4
|
+
* Abstract class for all source items (e.g. webrtc, rtmp, mpeg-dash)
|
|
5
|
+
*/
|
|
3
6
|
export declare class AbstractSourceItem {
|
|
7
|
+
/**
|
|
8
|
+
* Protocol type e.g. RTMP, RTSP
|
|
9
|
+
* @private
|
|
10
|
+
*/
|
|
4
11
|
protected type: ProtocolType;
|
|
12
|
+
/**
|
|
13
|
+
* Info object (cointains data related to video width, height, fps, bitrate e.g.)
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
5
16
|
protected streamInfo: StreamInfo;
|
|
17
|
+
/**
|
|
18
|
+
* Constructor
|
|
19
|
+
*
|
|
20
|
+
* @param type
|
|
21
|
+
* @param info
|
|
22
|
+
*/
|
|
6
23
|
constructor(type: ProtocolType, info: StreamInfo);
|
|
24
|
+
/**
|
|
25
|
+
* Returns protocol type
|
|
26
|
+
*/
|
|
7
27
|
getType(): ProtocolType;
|
|
28
|
+
/**
|
|
29
|
+
* Return info object
|
|
30
|
+
*/
|
|
8
31
|
getStreamInfo(): StreamInfo;
|
|
9
32
|
}
|
|
@@ -1,17 +1,70 @@
|
|
|
1
1
|
import { IServerItem } from "./IServerItem";
|
|
2
|
+
/**
|
|
3
|
+
* Class stores information related to storm gateway servers
|
|
4
|
+
*/
|
|
2
5
|
export declare class GatewayServerItem implements IServerItem {
|
|
6
|
+
/**
|
|
7
|
+
* Server url
|
|
8
|
+
* @private
|
|
9
|
+
*/
|
|
3
10
|
private host;
|
|
11
|
+
/**
|
|
12
|
+
* Application name
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
4
15
|
private application;
|
|
16
|
+
/**
|
|
17
|
+
* Port for storm (default is 443)
|
|
18
|
+
* @private
|
|
19
|
+
*/
|
|
5
20
|
private port;
|
|
21
|
+
/**
|
|
22
|
+
* Whenver connection should be made via SSL (default is true)
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
6
25
|
private isSSL;
|
|
26
|
+
/**
|
|
27
|
+
* Whenever player could not establish connection with this host
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
7
30
|
private hasFaild;
|
|
31
|
+
/**
|
|
32
|
+
* Constructor
|
|
33
|
+
*
|
|
34
|
+
* @param host server URL e.g. "cdn-e001.stormstreaming.com"
|
|
35
|
+
* @param applicationName e.g. "live
|
|
36
|
+
* @param port usually 443
|
|
37
|
+
* @param isSSL whenever connection should be stablished via SSL (true by default)
|
|
38
|
+
*/
|
|
8
39
|
constructor(host: string, application: string, port?: number, isSSL?: boolean);
|
|
40
|
+
/**
|
|
41
|
+
* Returns server URL
|
|
42
|
+
*/
|
|
9
43
|
getHost(): string;
|
|
44
|
+
/**
|
|
45
|
+
* Returns port number
|
|
46
|
+
*/
|
|
10
47
|
getPort(): number;
|
|
48
|
+
/**
|
|
49
|
+
* Returns whenever connection should be established via SSL
|
|
50
|
+
*/
|
|
11
51
|
getIfSSL(): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Returns whenever connection faild while trying to connect
|
|
54
|
+
*/
|
|
12
55
|
getIfFaild(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Marks this server as faild, prevent it from being used anymore
|
|
58
|
+
* @param value
|
|
59
|
+
*/
|
|
13
60
|
setAsFaild(value: boolean): void;
|
|
61
|
+
/**
|
|
62
|
+
* Returns application
|
|
63
|
+
*/
|
|
14
64
|
getApplication(): string;
|
|
65
|
+
/**
|
|
66
|
+
* Returns data from this object
|
|
67
|
+
*/
|
|
15
68
|
getData(): any;
|
|
16
69
|
toString(): string;
|
|
17
70
|
}
|