@campoint/vxwebrtc 0.1.0 → 0.1.2

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.
@@ -15,6 +15,7 @@ export declare class WebRtcOutputConnection extends WebRtcPeerConnection {
15
15
  private assignSender;
16
16
  private applyBitrateParams;
17
17
  protected onWsMessage(evt: MessageEvent): void;
18
+ fixTcpCandidate(candidate: RTCIceCandidateInit): RTCIceCandidateInit;
18
19
  private parseWebSocketMessage;
19
20
  private validateMessageStatus;
20
21
  private handleSdpData;
@@ -27,4 +28,5 @@ export declare class WebRtcOutputConnection extends WebRtcPeerConnection {
27
28
  export interface IWebRtcOutputConnection extends IWebRtcPeerConnectionOptions {
28
29
  localStream: MediaStream;
29
30
  mediaInfo: MediaInfo;
31
+ onWsMessage?: (evt: MessageEvent) => void;
30
32
  }
@@ -4,6 +4,9 @@ declare abstract class WebRtcPeerConnection {
4
4
  protected wsConnection?: WebSocket;
5
5
  protected peerConnection?: RTCPeerConnection;
6
6
  private hasAttemptedTcpFallback;
7
+ private stallCheckInterval?;
8
+ private lastBytesSent;
9
+ private stallCheckCount;
7
10
  protected abstract onRtcDescription(description: RTCSessionDescriptionInit): void;
8
11
  protected abstract onWsOpen(): void;
9
12
  protected abstract onWsMessage(evt: MessageEvent): void;
@@ -19,6 +22,10 @@ declare abstract class WebRtcPeerConnection {
19
22
  private handleIceConnectionStateChange;
20
23
  private handleConnectionStateChange;
21
24
  private handleIceConnectionFailure;
25
+ private startStallDetection;
26
+ private stopStallDetection;
27
+ private checkForStall;
28
+ private getTotalBytesSent;
22
29
  start(): void;
23
30
  stop(): void;
24
31
  stats(): Promise<RTCStatsReport | undefined>;
@@ -30,5 +37,8 @@ export interface IWebRtcPeerConnectionOptions {
30
37
  onStop: OnStopCallback;
31
38
  onError: OnErrorCallback;
32
39
  enableTcpFallback?: boolean;
40
+ onIceConnectionStateChange?: (state: RTCIceConnectionState) => void;
41
+ onConnectionStateChange?: (state: RTCPeerConnectionState) => void;
42
+ onStallDetected?: () => void;
33
43
  }
34
44
  export default WebRtcPeerConnection;
package/dist/stats.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "umd",
3
- "hash": "1cf1ee97a80d80bad494",
3
+ "hash": "6bd0e9a1f0f13d4ce591",
4
4
  "version": "5.69.0",
5
- "time": 20412,
6
- "builtAt": 1771335102849,
5
+ "time": 23124,
6
+ "builtAt": 1771495001130,
7
7
  "publicPath": "auto",
8
8
  "outputPath": "/opt/atlassian/pipelines/agent/build/dist",
9
9
  "assetsByChunkName": {
@@ -15,7 +15,7 @@
15
15
  {
16
16
  "type": "asset",
17
17
  "name": "vxwebrtc.umd.js",
18
- "size": 153122,
18
+ "size": 154958,
19
19
  "emitted": true,
20
20
  "comparedForEmit": false,
21
21
  "cached": false,
@@ -26,7 +26,7 @@
26
26
  "license": "vxwebrtc.umd.js.LICENSE.txt",
27
27
  "sourceMap": "vxwebrtc.umd.js.map"
28
28
  },
29
- "size": 153122
29
+ "size": 154958
30
30
  },
31
31
  "chunkNames": [
32
32
  "vxwebrtc"
@@ -39,13 +39,13 @@
39
39
  {
40
40
  "type": "sourceMap",
41
41
  "name": "vxwebrtc.umd.js.map",
42
- "size": 948211,
42
+ "size": 952473,
43
43
  "emitted": true,
44
44
  "comparedForEmit": false,
45
45
  "cached": false,
46
46
  "info": {
47
47
  "development": true,
48
- "size": 948211
48
+ "size": 952473
49
49
  },
50
50
  "chunkNames": [],
51
51
  "chunkIdHints": [],
@@ -90,12 +90,12 @@
90
90
  {
91
91
  "type": "asset",
92
92
  "name": "WebRtcPeerConnection.d.ts",
93
- "size": 1635,
93
+ "size": 2025,
94
94
  "emitted": false,
95
95
  "comparedForEmit": true,
96
96
  "cached": false,
97
97
  "info": {
98
- "size": 1635
98
+ "size": 2025
99
99
  },
100
100
  "chunkNames": [],
101
101
  "chunkIdHints": [],
@@ -128,12 +128,12 @@
128
128
  {
129
129
  "type": "asset",
130
130
  "name": "WebRtcOutputConnection.d.ts",
131
- "size": 1180,
131
+ "size": 1301,
132
132
  "emitted": false,
133
133
  "comparedForEmit": true,
134
134
  "cached": false,
135
135
  "info": {
136
- "size": 1180
136
+ "size": 1301
137
137
  },
138
138
  "chunkNames": [],
139
139
  "chunkIdHints": [],
@@ -398,9 +398,9 @@
398
398
  "initial": true,
399
399
  "entry": true,
400
400
  "recorded": false,
401
- "size": 725242,
401
+ "size": 728979,
402
402
  "sizes": {
403
- "javascript": 723961,
403
+ "javascript": 727698,
404
404
  "runtime": 1281
405
405
  },
406
406
  "names": [
@@ -416,7 +416,7 @@
416
416
  "auxiliaryFiles": [
417
417
  "vxwebrtc.umd.js.map"
418
418
  ],
419
- "hash": "f1a13664f0d8d1798972",
419
+ "hash": "d4e17035af4b25aef963",
420
420
  "childrenByOrder": {},
421
421
  "id": 202,
422
422
  "siblings": [],
@@ -596,6 +596,20 @@
596
596
  "moduleId": 831,
597
597
  "resolvedModuleId": 831
598
598
  },
599
+ {
600
+ "moduleIdentifier": "/opt/atlassian/pipelines/agent/build/node_modules/ts-loader/index.js!/opt/atlassian/pipelines/agent/build/src/WebRtcOutputConnection.ts",
601
+ "module": "./src/WebRtcOutputConnection.ts",
602
+ "moduleName": "./src/WebRtcOutputConnection.ts",
603
+ "resolvedModuleIdentifier": "/opt/atlassian/pipelines/agent/build/node_modules/ts-loader/index.js!/opt/atlassian/pipelines/agent/build/src/WebRtcOutputConnection.ts",
604
+ "resolvedModule": "./src/WebRtcOutputConnection.ts",
605
+ "type": "cjs require",
606
+ "active": true,
607
+ "explanation": "",
608
+ "userRequest": "lodash",
609
+ "loc": "33:31-48",
610
+ "moduleId": 285,
611
+ "resolvedModuleId": 285
612
+ },
599
613
  {
600
614
  "moduleIdentifier": "/opt/atlassian/pipelines/agent/build/node_modules/ts-loader/index.js!/opt/atlassian/pipelines/agent/build/src/WebRtcPeerConnection.ts",
601
615
  "module": "./src/WebRtcPeerConnection.ts",
@@ -3644,7 +3658,7 @@
3644
3658
  "active": true,
3645
3659
  "explanation": "",
3646
3660
  "userRequest": "./MungeSdp",
3647
- "loc": "33:17-38",
3661
+ "loc": "34:17-38",
3648
3662
  "moduleId": 285,
3649
3663
  "resolvedModuleId": 285
3650
3664
  }
@@ -3786,7 +3800,7 @@
3786
3800
  "active": true,
3787
3801
  "explanation": "",
3788
3802
  "userRequest": "./Types/CommonConnectionTypes",
3789
- "loc": "34:30-70",
3803
+ "loc": "35:30-70",
3790
3804
  "moduleId": 285,
3791
3805
  "resolvedModuleId": 285
3792
3806
  }
@@ -4182,9 +4196,9 @@
4182
4196
  "type": "module",
4183
4197
  "moduleType": "javascript/auto",
4184
4198
  "layer": null,
4185
- "size": 8963,
4199
+ "size": 9541,
4186
4200
  "sizes": {
4187
- "javascript": 8963
4201
+ "javascript": 9541
4188
4202
  },
4189
4203
  "built": true,
4190
4204
  "codeGenerated": true,
@@ -4334,9 +4348,9 @@
4334
4348
  "type": "module",
4335
4349
  "moduleType": "javascript/auto",
4336
4350
  "layer": null,
4337
- "size": 7486,
4351
+ "size": 10645,
4338
4352
  "sizes": {
4339
- "javascript": 7486
4353
+ "javascript": 10645
4340
4354
  },
4341
4355
  "built": true,
4342
4356
  "codeGenerated": true,
@@ -4401,7 +4415,7 @@
4401
4415
  "active": true,
4402
4416
  "explanation": "",
4403
4417
  "userRequest": "./WebRtcPeerConnection",
4404
- "loc": "35:45-78",
4418
+ "loc": "36:45-78",
4405
4419
  "moduleId": 285,
4406
4420
  "resolvedModuleId": 285
4407
4421
  },
@@ -5491,9 +5505,9 @@
5491
5505
  "type": "module",
5492
5506
  "moduleType": "javascript/auto",
5493
5507
  "layer": null,
5494
- "size": 8963,
5508
+ "size": 9541,
5495
5509
  "sizes": {
5496
- "javascript": 8963
5510
+ "javascript": 9541
5497
5511
  },
5498
5512
  "built": true,
5499
5513
  "codeGenerated": true,
@@ -6242,6 +6256,20 @@
6242
6256
  "moduleId": 831,
6243
6257
  "resolvedModuleId": 831
6244
6258
  },
6259
+ {
6260
+ "moduleIdentifier": "/opt/atlassian/pipelines/agent/build/node_modules/ts-loader/index.js!/opt/atlassian/pipelines/agent/build/src/WebRtcOutputConnection.ts",
6261
+ "module": "./src/WebRtcOutputConnection.ts",
6262
+ "moduleName": "./src/WebRtcOutputConnection.ts",
6263
+ "resolvedModuleIdentifier": "/opt/atlassian/pipelines/agent/build/node_modules/ts-loader/index.js!/opt/atlassian/pipelines/agent/build/src/WebRtcOutputConnection.ts",
6264
+ "resolvedModule": "./src/WebRtcOutputConnection.ts",
6265
+ "type": "cjs require",
6266
+ "active": true,
6267
+ "explanation": "",
6268
+ "userRequest": "lodash",
6269
+ "loc": "33:31-48",
6270
+ "moduleId": 285,
6271
+ "resolvedModuleId": 285
6272
+ },
6245
6273
  {
6246
6274
  "moduleIdentifier": "/opt/atlassian/pipelines/agent/build/node_modules/ts-loader/index.js!/opt/atlassian/pipelines/agent/build/src/WebRtcPeerConnection.ts",
6247
6275
  "module": "./src/WebRtcPeerConnection.ts",
@@ -6436,7 +6464,7 @@
6436
6464
  "active": true,
6437
6465
  "explanation": "",
6438
6466
  "userRequest": "./Types/CommonConnectionTypes",
6439
- "loc": "34:30-70",
6467
+ "loc": "35:30-70",
6440
6468
  "moduleId": 285,
6441
6469
  "resolvedModuleId": 285
6442
6470
  }
@@ -6459,9 +6487,9 @@
6459
6487
  "type": "module",
6460
6488
  "moduleType": "javascript/auto",
6461
6489
  "layer": null,
6462
- "size": 7486,
6490
+ "size": 10645,
6463
6491
  "sizes": {
6464
- "javascript": 7486
6492
+ "javascript": 10645
6465
6493
  },
6466
6494
  "built": true,
6467
6495
  "codeGenerated": true,
@@ -6525,7 +6553,7 @@
6525
6553
  "active": true,
6526
6554
  "explanation": "",
6527
6555
  "userRequest": "./WebRtcPeerConnection",
6528
- "loc": "35:45-78",
6556
+ "loc": "36:45-78",
6529
6557
  "moduleId": 285,
6530
6558
  "resolvedModuleId": 285
6531
6559
  },
@@ -6766,7 +6794,7 @@
6766
6794
  "active": true,
6767
6795
  "explanation": "",
6768
6796
  "userRequest": "./MungeSdp",
6769
- "loc": "33:17-38",
6797
+ "loc": "34:17-38",
6770
6798
  "moduleId": 285,
6771
6799
  "resolvedModuleId": 285
6772
6800
  }
@@ -12018,19 +12046,19 @@
12018
12046
  "assets": [
12019
12047
  {
12020
12048
  "name": "vxwebrtc.umd.js",
12021
- "size": 153122
12049
+ "size": 154958
12022
12050
  }
12023
12051
  ],
12024
12052
  "filteredAssets": 0,
12025
- "assetsSize": 153122,
12053
+ "assetsSize": 154958,
12026
12054
  "auxiliaryAssets": [
12027
12055
  {
12028
12056
  "name": "vxwebrtc.umd.js.map",
12029
- "size": 948211
12057
+ "size": 952473
12030
12058
  }
12031
12059
  ],
12032
12060
  "filteredAuxiliaryAssets": 0,
12033
- "auxiliaryAssetsSize": 948211,
12061
+ "auxiliaryAssetsSize": 952473,
12034
12062
  "children": {},
12035
12063
  "childAssets": {},
12036
12064
  "isOverSizeLimit": false
@@ -12045,19 +12073,19 @@
12045
12073
  "assets": [
12046
12074
  {
12047
12075
  "name": "vxwebrtc.umd.js",
12048
- "size": 153122
12076
+ "size": 154958
12049
12077
  }
12050
12078
  ],
12051
12079
  "filteredAssets": 0,
12052
- "assetsSize": 153122,
12080
+ "assetsSize": 154958,
12053
12081
  "auxiliaryAssets": [
12054
12082
  {
12055
12083
  "name": "vxwebrtc.umd.js.map",
12056
- "size": 948211
12084
+ "size": 952473
12057
12085
  }
12058
12086
  ],
12059
12087
  "filteredAuxiliaryAssets": 0,
12060
- "auxiliaryAssetsSize": 948211,
12088
+ "auxiliaryAssetsSize": 952473,
12061
12089
  "children": {},
12062
12090
  "childAssets": {},
12063
12091
  "isOverSizeLimit": false