@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.
Files changed (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/LICENSE +133 -0
  3. package/README.md +278 -3
  4. package/dist/amd/index.js +2244 -103
  5. package/dist/cjs/index.js +4 -4
  6. package/dist/esm/index.js +13 -13
  7. package/dist/iife/index.js +5 -5
  8. package/dist/types/StormStreamer.d.ts +393 -2
  9. package/dist/types/config/AudioData.d.ts +46 -0
  10. package/dist/types/config/ConfigManager.d.ts +47 -0
  11. package/dist/types/config/DebugData.d.ts +108 -0
  12. package/dist/types/config/IConfig.d.ts +3 -0
  13. package/dist/types/config/SettingsData.d.ts +114 -0
  14. package/dist/types/config/StorageData.d.ts +46 -0
  15. package/dist/types/config/StreamData.d.ts +75 -0
  16. package/dist/types/config/VideoData.d.ts +115 -0
  17. package/dist/types/config/enum/LogType.d.ts +3 -0
  18. package/dist/types/config/enum/ProtocolType.d.ts +3 -0
  19. package/dist/types/config/enum/ScalingType.d.ts +3 -0
  20. package/dist/types/config/enum/SecurityType.d.ts +3 -0
  21. package/dist/types/config/enum/SizeCalculationType.d.ts +3 -0
  22. package/dist/types/events/EventDispatcher.d.ts +34 -0
  23. package/dist/types/events/StormStreamerEvent.d.ts +141 -0
  24. package/dist/types/graph/MicrophoneGraph.d.ts +11 -0
  25. package/dist/types/logger/Logger.d.ts +103 -0
  26. package/dist/types/model/AbstractSourceItem.d.ts +23 -0
  27. package/dist/types/model/GatewayServerItem.d.ts +53 -0
  28. package/dist/types/model/IServerItem.d.ts +3 -0
  29. package/dist/types/model/ISourceItem.d.ts +3 -0
  30. package/dist/types/model/IStreamItem.d.ts +3 -0
  31. package/dist/types/model/RTMPSourceItem.d.ts +50 -0
  32. package/dist/types/model/RTSPSourceItem.d.ts +50 -0
  33. package/dist/types/model/StormMetaDataItem.d.ts +3 -0
  34. package/dist/types/model/StormServerItem.d.ts +53 -0
  35. package/dist/types/model/StormSourceItem.d.ts +27 -0
  36. package/dist/types/model/StreamInfo.d.ts +46 -0
  37. package/dist/types/network/AbstractSocket.d.ts +94 -0
  38. package/dist/types/network/NetworkController.d.ts +33 -0
  39. package/dist/types/network/WowzaConnection.d.ts +63 -0
  40. package/dist/types/network/WowzaStatusConnection.d.ts +54 -0
  41. package/dist/types/playback/CooldownMonitor.d.ts +17 -0
  42. package/dist/types/playback/StreamerController.d.ts +271 -0
  43. package/dist/types/playback/enum/ConnectionState.d.ts +3 -0
  44. package/dist/types/playback/player/AbstractPlayer.d.ts +23 -0
  45. package/dist/types/playback/task/IPlaybackTask.d.ts +3 -0
  46. package/dist/types/stage/ScreenElement.d.ts +54 -0
  47. package/dist/types/stage/StageController.d.ts +86 -0
  48. package/dist/types/statistics/StatsController.d.ts +8 -0
  49. package/dist/types/storage/StorageManager.d.ts +37 -0
  50. package/dist/types/utilities/DomUtilities.d.ts +7 -0
  51. package/dist/types/utilities/NumberUtilities.d.ts +7 -0
  52. package/dist/types/utilities/UserCapabilities.d.ts +44 -0
  53. package/dist/umd/index.js +5 -5
  54. package/package.json +6 -2
  55. package/samples/index_amd.html +50 -0
  56. package/samples/index_esm.html +46 -0
  57. package/samples/index_iife.html +45 -0
  58. package/samples/index_umd.html +45 -0
@@ -4,80 +4,334 @@ import { InputDevice } from "./model/InputDevice";
4
4
  import { PublishState } from "./enum/PublishState";
5
5
  import { InputDevicesState } from "./enum/InputDevicesState";
6
6
  import { DeviceState } from "./enum/DeviceState";
7
+ /**
8
+ * This class (instance) is responsible to controlling video playback. It's the central point of the whole project, where
9
+ * all components are being managed.
10
+ */
7
11
  export declare class StreamerController {
12
+ /**
13
+ * Reference to the main class
14
+ * @private
15
+ */
8
16
  private readonly _main;
17
+ /**
18
+ * Reference to the player logger
19
+ * @private
20
+ */
9
21
  protected _logger: Logger;
22
+ /**
23
+ * Whenever current window is active or not
24
+ * @private
25
+ */
10
26
  private _isWindowActive;
27
+ /**
28
+ * WebRTC Connection with Wowza Server
29
+ * @private
30
+ */
11
31
  private _peerConnection;
32
+ /**
33
+ * Status connection
34
+ * @private
35
+ */
12
36
  private _statusConnection;
37
+ /**
38
+ * Default configuration for ICE-Servers
39
+ * @private
40
+ */
13
41
  private _peerConnectionConfig;
42
+ /**
43
+ * MungeSDP for injecting values into WebRTC Description
44
+ * @private
45
+ */
14
46
  private _mungeSDP;
47
+ /**
48
+ * Currently selected camera (if ay)
49
+ * @private
50
+ */
15
51
  private _selectedCamera;
52
+ /**
53
+ * Currently selected microphone (if ay)
54
+ * @private
55
+ */
16
56
  private _selectedMicrophone;
57
+ /**
58
+ * Whenever microphone is currenly muted
59
+ * @private
60
+ */
17
61
  private _isMicrophoneMuted;
62
+ /**
63
+ * Desired microphone state that should be applied when stream becomes available
64
+ * @private
65
+ */
18
66
  private _pendingMicrophoneState;
67
+ /**
68
+ * List of all available camera devices found on user device
69
+ * @private
70
+ */
19
71
  private _cameraList;
72
+ /**
73
+ * List of all available microphone devices found on user device
74
+ * @private
75
+ */
20
76
  private _microphoneList;
77
+ /**
78
+ * The stream itself;
79
+ * @private
80
+ */
21
81
  private _stream;
82
+ /**
83
+ * Sound meter device
84
+ * @private
85
+ */
22
86
  private _soundMeter;
87
+ /**
88
+ * Whenever we have cheched for permissions
89
+ * @private
90
+ */
23
91
  private _permissionChecked;
92
+ /**
93
+ * A default set of permissions
94
+ * @private
95
+ */
24
96
  private _constraints;
97
+ /**
98
+ * Restart timer
99
+ * @private
100
+ */
25
101
  private _restartTimer;
102
+ /**
103
+ * Current count for restart, _restartTimerMaxCount is the max number
104
+ * @private
105
+ */
26
106
  private _restartTimerCount;
107
+ /**
108
+ * max
109
+ * @private
110
+ */
27
111
  private _restartTimerMaxCount;
112
+ /**
113
+ * Current streamer state
114
+ * @protected
115
+ */
28
116
  protected _publishState: PublishState;
29
117
  protected _publishTime: number;
118
+ /**
119
+ * General state for streamer
120
+ * @protected
121
+ */
30
122
  protected _inputDeviceState: InputDevicesState;
123
+ /**
124
+ * Current Camera state
125
+ * @protected
126
+ */
31
127
  protected _cameraState: DeviceState;
128
+ /**
129
+ * Current Microphone state
130
+ * @protected
131
+ */
32
132
  protected _microphoneState: DeviceState;
33
133
  protected _publishTimer: number;
34
134
  private _currentOrientation;
35
135
  private _statusTimer;
36
136
  private _debug;
137
+ private _fullStreamName;
138
+ /**
139
+ * Constructor - requires properly configured config object
140
+ * @param config
141
+ */
37
142
  constructor(main: StormStreamer);
143
+ /**
144
+ * Initializes the PlaybackController by setting up event listeners and device handling
145
+ * This method orchestrates the initialization process by first checking device availability
146
+ * and permissions, then setting up necessary event listeners and configurations
147
+ * @private
148
+ */
38
149
  private initialize;
150
+ /**
151
+ * Sets up core event listeners for the controller
152
+ * @private
153
+ */
39
154
  private setupEventListeners;
155
+ /**
156
+ * Initializes media devices by checking permissions and setting up initial device lists
157
+ * @private
158
+ */
40
159
  private initializeDevices;
160
+ /**
161
+ * Handles device state changes and initiates publishing if appropriate
162
+ * @private
163
+ */
41
164
  private onDeviceStateChange;
165
+ /**
166
+ * Initializes the media stream if a camera or microphone is selected
167
+ * @private
168
+ */
42
169
  private initializeStream;
43
170
  private setupPermissionListeners;
171
+ /**
172
+ * Sets up event listener for device changes and handles them appropriately
173
+ * @private
174
+ */
175
+ private setupDeviceChangeListener;
44
176
  private handlePermissionChange;
177
+ /**
178
+ * Handles successful camera stream initialization
179
+ */
45
180
  private onCameraStreamSuccess;
181
+ /**
182
+ * Initializes WebRTC connection
183
+ */
46
184
  private initializeWebRTC;
185
+ /**
186
+ * Modified publish method to handle both camera and WebRTC
187
+ *
188
+ * @param streamKey - klucz streamu
189
+ * @returns {boolean} - true jeśli udało się rozpocząć publikowanie
190
+ */
47
191
  publish(streamKey: string): boolean;
48
192
  unpublish(): void;
193
+ /**
194
+ * This method
195
+ * @private
196
+ */
49
197
  private setupOrientationListener;
198
+ /**
199
+ * This method is responsible for handing orientation changes for mobile devices
200
+ */
50
201
  private handleOrientationChange;
202
+ /**
203
+ * Error on trying to grab video stream (it usually means that browser does not support WebRTC streaming)
204
+ *
205
+ * @param error
206
+ */
51
207
  onUserMediaError(error: any): Promise<void>;
208
+ /**
209
+ * This method is used for checking individual access to output devices
210
+ * @private
211
+ */
52
212
  private checkIndividualDeviceAccess;
213
+ /**
214
+ * This method handles basic SDP/ICE-Candidate exchange with a Wowza Server
215
+ *
216
+ * @param data
217
+ */
53
218
  onSocketMessage(data: any): void;
219
+ /**
220
+ * Recives events related to peerConnection (change of state)
221
+ *
222
+ * @param event event with its data
223
+ * @param thisRef reference to player classonConnectionStateChange
224
+ * @private
225
+ */
54
226
  private onConnectionStateChange;
55
227
  private onServerDisconnect;
228
+ /**
229
+ * Method for handling a situation when a given streamKey is already in use.
230
+ */
56
231
  private onStreamKeyTaken;
232
+ /**
233
+ * Returns list od devices (cameras, microphones) available for user's device
234
+ */
57
235
  grabDevices(): Promise<void>;
236
+ /**
237
+ * Selects camera based on camera device ID;
238
+ * @param cameraID
239
+ */
58
240
  selectCamera(cameraID: string): void;
241
+ /**
242
+ * Method tries to select (change) microphone based on its system ID
243
+ * @param micID
244
+ */
59
245
  selectMicrophone(micID: string): Promise<void>;
246
+ /**
247
+ * This method tries to start a camera.
248
+ *
249
+ * @private
250
+ */
60
251
  private startCamera;
252
+ /**
253
+ * Updates WebRTC connection with new stream
254
+ */
61
255
  private updateWebRTCStream;
256
+ /**
257
+ * Modified closeStream to handle both camera and WebRTC completely
258
+ */
62
259
  private closeStream;
260
+ /**
261
+ * This method selects a camera based on previous uses or saved IDs
262
+ *
263
+ * @private
264
+ */
63
265
  private pickCamera;
266
+ /**
267
+ * This method selects a microphone based on previous uses or saved IDs
268
+ *
269
+ * @private
270
+ */
64
271
  private pickMicrophone;
272
+ /**
273
+ * Cleans all saved cameras and microphones IDs.
274
+ */
65
275
  clearSavedDevices(): void;
276
+ /**
277
+ * Messes up camera's and microphone's id (for testing only)
278
+ */
66
279
  messSavedDevices(): void;
280
+ /**
281
+ * Handles microphone muting state
282
+ * @param microphoneState true to unmute, false to mute
283
+ */
67
284
  muteMicrophone(shouldMute: boolean): void;
285
+ /**
286
+ * Applies the microphone state to the actual stream tracks
287
+ *
288
+ * @param enabled true to enable tracks, false to disable
289
+ * @private
290
+ */
68
291
  private applyMicrophoneState;
292
+ /**
293
+ * This methods is a final check whenever we're ready to publish a stream
294
+ *
295
+ * @param requireVideo - whenever video track is required
296
+ * @param requireAudio - whenever audio track is required
297
+ * @returns {boolean} true if stream is ready for publishing
298
+ */
69
299
  isStreamReady(requireVideo?: boolean, requireAudio?: boolean): boolean;
300
+ /**
301
+ * Method fires once a connection with wowza is established. It's the main connection where we exchange
302
+ * ice-candidates and SDP. We'll start setting up peer connections.
303
+ */
70
304
  private onServerConnect;
305
+ /**
306
+ * Method fires once a status connection is established. We'll set an interval for monitoring stream status.
307
+ */
71
308
  private onStatusServerConnect;
72
309
  private requestStatusData;
310
+ /**
311
+ * If for some reason the status connection is disconnected we have to clean the interval
312
+ */
73
313
  private onStatusServerDisconnect;
314
+ /**
315
+ * This event fires whenever "STREAM_STATUS_RESPONSE" packet form status connection reports stream status along some stream data. This gives
316
+ * us an insight into whenever our stream is ok (works) or not.
317
+ * @param event
318
+ */
74
319
  private onStreamStatsUpdate;
75
320
  private closeWebRTCConnection;
76
321
  private onDescriptionError;
77
322
  private onDescriptionSuccess;
78
323
  private onIceCandidate;
324
+ /**
325
+ * Methods handles visibility change events
326
+ */
79
327
  private visibilityChange;
328
+ /**
329
+ * Reacts to browser changing visibility of the document (or blur)
330
+ */
80
331
  private onWindowBlur;
332
+ /**
333
+ * Reacts to browser changing visibility of the document (or focus)
334
+ */
81
335
  private onWindowFocus;
82
336
  createStatusConnection(): void;
83
337
  isMicrophoneMuted(): boolean;
@@ -94,9 +348,26 @@ export declare class StreamerController {
94
348
  getCameraList(): InputDevice[];
95
349
  getMicrophoneList(): InputDevice[];
96
350
  getPublishState(): PublishState;
351
+ /**
352
+ * Method used to stop camera from streaming
353
+ * @private
354
+ */
97
355
  private stopCameraStream;
356
+ /**
357
+ * Method stops streaming for all streams
358
+ * @private
359
+ */
98
360
  private forceStopAllStreams;
361
+ /**
362
+ * Stops all streaming operations and cleans up resources
363
+ */
99
364
  stop(): void;
365
+ /**
366
+ * Reinitializes the streaming setup
367
+ */
100
368
  start(): Promise<void>;
369
+ /**
370
+ * Method used for destroying everything (one-time use)
371
+ */
101
372
  destroy(): void;
102
373
  }
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Different connection states
3
+ */
1
4
  export declare enum ConnectionState {
2
5
  NOT_INITIALIZED = 0,
3
6
  STARTED = 1,
@@ -1,11 +1,34 @@
1
1
  import { StreamerController } from "../StreamerController";
2
2
  import { Logger } from "../../logger/Logger";
3
3
  import { StormStreamer } from "../../StormStreamer";
4
+ /**
5
+ * Abstract Player Class, gathers common fields and methods
6
+ */
4
7
  export declare class AbstractPlayer {
8
+ /**
9
+ * Reference to the main class
10
+ * @protected
11
+ */
5
12
  protected _main: StormStreamer;
13
+ /**
14
+ * Reference to the playback controller
15
+ * @protected
16
+ */
6
17
  protected _playbackController: StreamerController;
18
+ /**
19
+ * Reference to the player logger
20
+ * @protected
21
+ */
7
22
  protected _logger: Logger;
23
+ /**
24
+ * Reference to the VideoElement
25
+ * @protected
26
+ */
8
27
  protected _videoObject: HTMLVideoElement;
28
+ /**
29
+ * Numer of received data packets
30
+ * @protected
31
+ */
9
32
  protected _dataPacketCount: number;
10
33
  getPlaybackRate(): number;
11
34
  }
@@ -1,4 +1,7 @@
1
1
  import { TaskType } from "../enum/TaskType";
2
+ /**
3
+ * Interface for all configs within the player
4
+ */
2
5
  export interface IPlaybackTask {
3
6
  getType(): TaskType;
4
7
  }
@@ -1,19 +1,73 @@
1
1
  import { StormStreamer } from "../StormStreamer";
2
+ /**
3
+ * Class controls the VideoElement itself
4
+ */
2
5
  export declare class ScreenElement {
6
+ /**
7
+ * Decides whenever logs are being generated by this class
8
+ * @private
9
+ */
3
10
  private readonly LOG_ACTIVITY;
11
+ /**
12
+ * Reference to the main class
13
+ * @private
14
+ */
4
15
  private _main;
16
+ /**
17
+ * Current volume level
18
+ * @private
19
+ */
5
20
  private _volume;
21
+ /**
22
+ * Whenever video is muted
23
+ * @private
24
+ */
6
25
  private _isMuted;
26
+ /**
27
+ * Whenever video is muted by a browser
28
+ * @private
29
+ */
7
30
  private _isMutedByBrowser;
31
+ /**
32
+ * Video Element itself
33
+ * @private
34
+ */
8
35
  private _videoElement;
36
+ /**
37
+ * Reference to the main logger
38
+ * @private
39
+ */
9
40
  private _logger;
10
41
  constructor(main: StormStreamer);
42
+ /**
43
+ * Initializes and pre-configures main video object
44
+ */
11
45
  initialize(): void;
46
+ /**
47
+ * Called whenever browser stops playback
48
+ */
12
49
  private onForceMute;
50
+ /**
51
+ * Sets new volume for playback. It'll also try to store value in a browser memory
52
+ * @param value
53
+ */
13
54
  setVolume(value: number): void;
14
55
  getVolume(): number;
56
+ /**
57
+ * Allows to apply mute to a video element
58
+ * @param isMuted
59
+ */
15
60
  setMuted(isMuted: boolean): void;
61
+ /**
62
+ * Returns true/false whenever video is muted or not
63
+ */
16
64
  getIfMuted(): boolean;
65
+ /**
66
+ * Dispatches event informing about volume chan
67
+ */
17
68
  dispatchVolumeEvent(): void;
69
+ /**
70
+ * Return VideoElement
71
+ */
18
72
  getVideoElement(): HTMLVideoElement;
19
73
  }
@@ -2,32 +2,118 @@ import { Logger } from "../logger/Logger";
2
2
  import { ScalingType } from "../config/enum/ScalingType";
3
3
  import { ScreenElement } from "./ScreenElement";
4
4
  import { StormStreamer } from "../StormStreamer";
5
+ /**
6
+ * Class controls all visual elements of the player
7
+ */
5
8
  export declare class StageController {
9
+ /**
10
+ * Decides whenever logs are being generated by this class
11
+ * @private
12
+ */
6
13
  private static readonly LOG_ACTIVITY;
14
+ /**
15
+ * Video object itself (reference to object on document)
16
+ */
7
17
  private _screenElement;
18
+ /**
19
+ * Container that holds video object itself
20
+ * @private
21
+ */
8
22
  private _videoContainer;
23
+ /**
24
+ * Parent container for the player
25
+ * @private
26
+ */
9
27
  private _parentElement;
28
+ /**
29
+ * Video width
30
+ * @private
31
+ */
10
32
  private _containerWidth;
33
+ /**
34
+ * Temp container width
35
+ * @private
36
+ */
11
37
  private _tempContainerWidth;
38
+ /**
39
+ * Video height
40
+ * @private
41
+ */
12
42
  private _containerHeight;
43
+ /**
44
+ * Temp container height
45
+ * @private
46
+ */
13
47
  private _tempContainerHeight;
48
+ /**
49
+ * Video width (initally 0, after "onmetadata" event is updated to match the real one
50
+ * @private
51
+ */
14
52
  private _videoWidth;
53
+ /**
54
+ * Video width (initally 0, after "onmetadata" event is updated to match the real one
55
+ * @private
56
+ */
15
57
  private _videoHeight;
58
+ /**
59
+ * Current scaling type
60
+ * @private
61
+ */
16
62
  private _scalingMode;
63
+ /**
64
+ * If in fullscreen mode
65
+ * @private
66
+ */
17
67
  private isInFullScreenMode;
68
+ /**
69
+ * Reference to the main class
70
+ * @private
71
+ */
18
72
  private _main;
73
+ /**
74
+ * Reference to the player logger
75
+ * @private
76
+ */
19
77
  protected _logger: Logger;
78
+ /**
79
+ * Watches for changes in the parent container
80
+ * @private
81
+ */
20
82
  private _resizeObserver;
83
+ /**
84
+ * Whenever we are resizing atm.
85
+ * @private
86
+ */
21
87
  private _isResizing;
88
+ /**
89
+ * Deco
90
+ * @private
91
+ */
22
92
  private _autoResizeEnabled;
93
+ /**
94
+ * Parameter holds original overflow style
95
+ * @private
96
+ */
23
97
  private _parentOriginalOverflow;
24
98
  private _debug;
25
99
  constructor(main: StormStreamer);
26
100
  initialize(): void;
101
+ /**
102
+ * Method attaches element to a parent container
103
+ *
104
+ * @param container
105
+ */
27
106
  attachToParent(container: string | HTMLElement): boolean;
107
+ /**
108
+ * Detaches the library from a parent container
109
+ */
28
110
  detachFromParent(): boolean;
29
111
  handleResize(): void;
30
112
  private calculateNewDimensions;
113
+ /**
114
+ * Method resizes video container
115
+ * @private
116
+ */
31
117
  private resizeVideoContainer;
32
118
  private scaleVideo;
33
119
  private onFullScreenChange;
@@ -1,7 +1,15 @@
1
1
  import { StormStreamer } from "../StormStreamer";
2
2
  import { Logger } from "../logger/Logger";
3
3
  export declare class StatsController {
4
+ /**
5
+ * Reference to the main class
6
+ * @private
7
+ */
4
8
  private readonly _main;
9
+ /**
10
+ * Reference to the player logger
11
+ * @private
12
+ */
5
13
  protected _logger: Logger;
6
14
  private _publishVideoWidth;
7
15
  private _publishVideoHeight;
@@ -1,11 +1,48 @@
1
1
  import { StormStreamer } from "../StormStreamer";
2
+ /**
3
+ * Saves and retrieve data from localStorage.
4
+ */
2
5
  export declare class StorageManager {
6
+ /**
7
+ * Decides whenever logs are being generated by this class
8
+ * @private
9
+ */
3
10
  private readonly LOG_ACTIVITY;
11
+ /**
12
+ * Whenever saving cookies is enabled at all
13
+ * @private
14
+ */
4
15
  private isEnabled;
16
+ /**
17
+ * Prefix for multiple instances
18
+ * @private
19
+ */
5
20
  private prefix;
21
+ /**
22
+ * Reference to the main logger
23
+ * @private
24
+ */
6
25
  private logger;
26
+ /**
27
+ * Constructor
28
+ * @param main
29
+ * @param prefix
30
+ */
7
31
  constructor(main: StormStreamer);
32
+ /**
33
+ * Saves data a a cookie
34
+ * @param name name of a field
35
+ * @param value value of a field
36
+ */
8
37
  saveField(name: string, value: string): void;
38
+ /**
39
+ * Removes a field from localStorage
40
+ * @param name the name of the field to remove
41
+ */
9
42
  removeField(name: string): void;
43
+ /**
44
+ * Retrieves field from cookie
45
+ * @param name cookie name
46
+ */
10
47
  getField(name: string): string | null;
11
48
  }
@@ -1,4 +1,11 @@
1
+ /**
2
+ * Class responsible for operations on numbers
3
+ */
1
4
  export declare class DomUtilities {
5
+ /**
6
+ * Calculates element dimensions including margins
7
+ * @param element
8
+ */
2
9
  static calculateDimensionsWithMargins(element: HTMLElement): {
3
10
  width: number;
4
11
  height: number;
@@ -1,4 +1,11 @@
1
+ /**
2
+ * Class responsible for operations on numbers
3
+ */
1
4
  export declare class NumberUtilities {
5
+ /**
6
+ * Adds leading "zero" before the number and returns it as a string. Example: "1" -> "01"
7
+ * @param number
8
+ */
2
9
  static addLeadingZero(number: number): string;
3
10
  static isNear(currentBuffer: number, target: number, targetMargin: number): boolean;
4
11
  static generateUniqueString(length: number): string;