podchat-browser 12.5.2-snapshot.1 → 12.5.2-snapshot.4
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 +10 -1
- package/examples/bundle-test.js +45 -7
- package/package.json +1 -1
- package/src/call.module.js +26 -5
- package/src/chat.js +3 -2
- package/src/events.module.js +16 -0
package/changelog.md
CHANGED
|
@@ -3,7 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented here.
|
|
4
4
|
to see complete list of changelog please visit [ChangeLog](http://gp.fanapsoft.ir/pod/pod-basic-sdk/chat-js-browser-sdk/-/blob/master/changelog.md)
|
|
5
5
|
|
|
6
|
-
## [12.5.2-snapshot.
|
|
6
|
+
## [12.5.2-snapshot.4] - 2022-05-29
|
|
7
|
+
### Changed
|
|
8
|
+
- Improved call error logs in Sentry
|
|
9
|
+
|
|
10
|
+
## [12.5.2-snapshot.3] - 2022-05-24
|
|
11
|
+
### Changed
|
|
12
|
+
- Update sentry url
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [12.5.2-snapshot.2] - 2022-05-24
|
|
7
16
|
### Changed
|
|
8
17
|
- Update async package
|
|
9
18
|
|
package/examples/bundle-test.js
CHANGED
|
@@ -56718,7 +56718,14 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56718
56718
|
options.sendSource = 'screen';
|
|
56719
56719
|
resolve(options);
|
|
56720
56720
|
}).catch(function (error) {
|
|
56721
|
-
|
|
56721
|
+
let errorString = "[SDK][navigator.mediaDevices.getDisplayMedia]" + JSON.stringify(error)
|
|
56722
|
+
console.error(errorString);
|
|
56723
|
+
chatEvents.fireEvent('callEvents', {
|
|
56724
|
+
type: 'CALL_ERROR',
|
|
56725
|
+
code: 7000,
|
|
56726
|
+
message: errorString,
|
|
56727
|
+
environmentDetails: getSDKCallDetails()
|
|
56728
|
+
});
|
|
56722
56729
|
explainUserMediaError(error, 'video', 'screen');
|
|
56723
56730
|
//resolve(options);
|
|
56724
56731
|
});
|
|
@@ -56758,7 +56765,14 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56758
56765
|
config.state = peerStates.CONNECTING;
|
|
56759
56766
|
config.peer = new KurentoUtils.WebRtcPeer[WebRtcFunction](options, function (err) {
|
|
56760
56767
|
if (err) {
|
|
56761
|
-
|
|
56768
|
+
let errorString = "[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType);
|
|
56769
|
+
console.error(errorString);
|
|
56770
|
+
chatEvents.fireEvent('callEvents', {
|
|
56771
|
+
type: 'CALL_ERROR',
|
|
56772
|
+
code: 7000,
|
|
56773
|
+
message: errorString,
|
|
56774
|
+
environmentDetails: getSDKCallDetails()
|
|
56775
|
+
});
|
|
56762
56776
|
return;
|
|
56763
56777
|
}
|
|
56764
56778
|
|
|
@@ -56780,7 +56794,14 @@ WildEmitter.mixin(WildEmitter);
|
|
|
56780
56794
|
} else {
|
|
56781
56795
|
config.peer.generateOffer((err, sdpOffer) => {
|
|
56782
56796
|
if (err) {
|
|
56783
|
-
|
|
56797
|
+
let errorString = "[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err
|
|
56798
|
+
console.error(errorString);
|
|
56799
|
+
chatEvents.fireEvent('callEvents', {
|
|
56800
|
+
type: 'CALL_ERROR',
|
|
56801
|
+
code: 7000,
|
|
56802
|
+
message: errorString,
|
|
56803
|
+
environmentDetails: getSDKCallDetails()
|
|
56804
|
+
});
|
|
56784
56805
|
return;
|
|
56785
56806
|
}
|
|
56786
56807
|
manager.sendSDPOfferRequestMessage(sdpOffer, 1);
|
|
@@ -57993,12 +58014,12 @@ WildEmitter.mixin(WildEmitter);
|
|
|
57993
58014
|
},
|
|
57994
58015
|
|
|
57995
58016
|
explainUserMediaError = function (err, deviceType, deviceSource) {
|
|
57996
|
-
chatEvents.fireEvent('callEvents', {
|
|
58017
|
+
/*chatEvents.fireEvent('callEvents', {
|
|
57997
58018
|
type: 'CALL_ERROR',
|
|
57998
58019
|
code: 7000,
|
|
57999
58020
|
message: err,
|
|
58000
58021
|
environmentDetails: getSDKCallDetails()
|
|
58001
|
-
})
|
|
58022
|
+
});*/
|
|
58002
58023
|
|
|
58003
58024
|
const n = err.name;
|
|
58004
58025
|
if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
|
|
@@ -60632,7 +60653,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
60632
60653
|
|
|
60633
60654
|
if (!!Sentry) {
|
|
60634
60655
|
Sentry.init({
|
|
60635
|
-
dsn: '
|
|
60656
|
+
dsn: 'https://784a14966f6a416b8b58a4b144aef0f5:733b76b6354f4547a7428bb8c7489bf2@talksentry.sakku-khatam.ir/4',
|
|
60636
60657
|
attachStacktrace: true
|
|
60637
60658
|
});
|
|
60638
60659
|
Sentry.setContext("Chat Params", params);
|
|
@@ -61098,7 +61119,8 @@ WildEmitter.mixin(WildEmitter);
|
|
|
61098
61119
|
connectionCheckTimeoutThreshold: connectionCheckTimeoutThreshold,
|
|
61099
61120
|
messageTtl: messageTtl,
|
|
61100
61121
|
reconnectOnClose: reconnectOnClose,
|
|
61101
|
-
asyncLogging: asyncLogging
|
|
61122
|
+
asyncLogging: asyncLogging,
|
|
61123
|
+
logLevel: (consoleLogging ? 3 : 1)
|
|
61102
61124
|
});
|
|
61103
61125
|
callModule.asyncInitialized(asyncClient);
|
|
61104
61126
|
chatMessaging.asyncInitialized(asyncClient);
|
|
@@ -74880,6 +74902,7 @@ WildEmitter.mixin(WildEmitter);
|
|
|
74880
74902
|
this.uniqueId = error.uniqueId ? error.uniqueId : '';
|
|
74881
74903
|
this.token = token;
|
|
74882
74904
|
this.error = JSON.stringify((error.error ? error.error : error));
|
|
74905
|
+
this.environmentDetails = error.environmentDetails
|
|
74883
74906
|
};
|
|
74884
74907
|
|
|
74885
74908
|
this.updateToken = function (newToken) {
|
|
@@ -74916,7 +74939,22 @@ WildEmitter.mixin(WildEmitter);
|
|
|
74916
74939
|
Sentry.setExtra('errorCode', err.code);
|
|
74917
74940
|
Sentry.setExtra('uniqueId', err.uniqueId);
|
|
74918
74941
|
Sentry.setExtra('token', err.token);
|
|
74942
|
+
Sentry.setExtra('SDKParams', {
|
|
74943
|
+
platformHost: params.platformHost,
|
|
74944
|
+
podSpaceFileServer: params.podSpaceFileServer,
|
|
74945
|
+
socketAddress: params.socketAddress,
|
|
74946
|
+
ssoHost: params.ssoHost,
|
|
74947
|
+
typeCode: params.typeCode,
|
|
74948
|
+
serverName: params.serverName,
|
|
74949
|
+
callRequestTimeout: params.callRequestTimeout,
|
|
74950
|
+
asyncRequestTimeout: params.asyncRequestTimeout,
|
|
74951
|
+
httpUploadRequestTimeout: params.httpUploadRequestTimeout,
|
|
74952
|
+
callOptions: params.callOptions
|
|
74953
|
+
});
|
|
74954
|
+
|
|
74919
74955
|
Sentry.setTag('Error code:', (err.code ? err.code : ''))
|
|
74956
|
+
if(err.environmentDetails)
|
|
74957
|
+
Sentry.setExtra("environmentDetails", err.environmentDetails)
|
|
74920
74958
|
Sentry.captureException(err.error, {
|
|
74921
74959
|
logger: eventName
|
|
74922
74960
|
});
|
package/package.json
CHANGED
package/src/call.module.js
CHANGED
|
@@ -473,7 +473,14 @@
|
|
|
473
473
|
options.sendSource = 'screen';
|
|
474
474
|
resolve(options);
|
|
475
475
|
}).catch(function (error) {
|
|
476
|
-
|
|
476
|
+
let errorString = "[SDK][navigator.mediaDevices.getDisplayMedia]" + JSON.stringify(error)
|
|
477
|
+
console.error(errorString);
|
|
478
|
+
chatEvents.fireEvent('callEvents', {
|
|
479
|
+
type: 'CALL_ERROR',
|
|
480
|
+
code: 7000,
|
|
481
|
+
message: errorString,
|
|
482
|
+
environmentDetails: getSDKCallDetails()
|
|
483
|
+
});
|
|
477
484
|
explainUserMediaError(error, 'video', 'screen');
|
|
478
485
|
//resolve(options);
|
|
479
486
|
});
|
|
@@ -513,7 +520,14 @@
|
|
|
513
520
|
config.state = peerStates.CONNECTING;
|
|
514
521
|
config.peer = new KurentoUtils.WebRtcPeer[WebRtcFunction](options, function (err) {
|
|
515
522
|
if (err) {
|
|
516
|
-
|
|
523
|
+
let errorString = "[SDK][start/webRtc " + config.direction + " " + config.mediaType + " Peer] Error: " + explainUserMediaError(err, config.mediaType);
|
|
524
|
+
console.error(errorString);
|
|
525
|
+
chatEvents.fireEvent('callEvents', {
|
|
526
|
+
type: 'CALL_ERROR',
|
|
527
|
+
code: 7000,
|
|
528
|
+
message: errorString,
|
|
529
|
+
environmentDetails: getSDKCallDetails()
|
|
530
|
+
});
|
|
517
531
|
return;
|
|
518
532
|
}
|
|
519
533
|
|
|
@@ -535,7 +549,14 @@
|
|
|
535
549
|
} else {
|
|
536
550
|
config.peer.generateOffer((err, sdpOffer) => {
|
|
537
551
|
if (err) {
|
|
538
|
-
|
|
552
|
+
let errorString = "[SDK][start/WebRc " + config.direction + " " + config.mediaType + " Peer/generateOffer] " + err
|
|
553
|
+
console.error(errorString);
|
|
554
|
+
chatEvents.fireEvent('callEvents', {
|
|
555
|
+
type: 'CALL_ERROR',
|
|
556
|
+
code: 7000,
|
|
557
|
+
message: errorString,
|
|
558
|
+
environmentDetails: getSDKCallDetails()
|
|
559
|
+
});
|
|
539
560
|
return;
|
|
540
561
|
}
|
|
541
562
|
manager.sendSDPOfferRequestMessage(sdpOffer, 1);
|
|
@@ -1748,12 +1769,12 @@
|
|
|
1748
1769
|
},
|
|
1749
1770
|
|
|
1750
1771
|
explainUserMediaError = function (err, deviceType, deviceSource) {
|
|
1751
|
-
chatEvents.fireEvent('callEvents', {
|
|
1772
|
+
/*chatEvents.fireEvent('callEvents', {
|
|
1752
1773
|
type: 'CALL_ERROR',
|
|
1753
1774
|
code: 7000,
|
|
1754
1775
|
message: err,
|
|
1755
1776
|
environmentDetails: getSDKCallDetails()
|
|
1756
|
-
})
|
|
1777
|
+
});*/
|
|
1757
1778
|
|
|
1758
1779
|
const n = err.name;
|
|
1759
1780
|
if (n === 'NotFoundError' || n === 'DevicesNotFoundError') {
|
package/src/chat.js
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
if (!!Sentry) {
|
|
44
44
|
Sentry.init({
|
|
45
|
-
dsn: '
|
|
45
|
+
dsn: 'https://784a14966f6a416b8b58a4b144aef0f5:733b76b6354f4547a7428bb8c7489bf2@talksentry.sakku-khatam.ir/4',
|
|
46
46
|
attachStacktrace: true
|
|
47
47
|
});
|
|
48
48
|
Sentry.setContext("Chat Params", params);
|
|
@@ -508,7 +508,8 @@
|
|
|
508
508
|
connectionCheckTimeoutThreshold: connectionCheckTimeoutThreshold,
|
|
509
509
|
messageTtl: messageTtl,
|
|
510
510
|
reconnectOnClose: reconnectOnClose,
|
|
511
|
-
asyncLogging: asyncLogging
|
|
511
|
+
asyncLogging: asyncLogging,
|
|
512
|
+
logLevel: (consoleLogging ? 3 : 1)
|
|
512
513
|
});
|
|
513
514
|
callModule.asyncInitialized(asyncClient);
|
|
514
515
|
chatMessaging.asyncInitialized(asyncClient);
|
package/src/events.module.js
CHANGED
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
this.uniqueId = error.uniqueId ? error.uniqueId : '';
|
|
37
37
|
this.token = token;
|
|
38
38
|
this.error = JSON.stringify((error.error ? error.error : error));
|
|
39
|
+
this.environmentDetails = error.environmentDetails
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
this.updateToken = function (newToken) {
|
|
@@ -72,7 +73,22 @@
|
|
|
72
73
|
Sentry.setExtra('errorCode', err.code);
|
|
73
74
|
Sentry.setExtra('uniqueId', err.uniqueId);
|
|
74
75
|
Sentry.setExtra('token', err.token);
|
|
76
|
+
Sentry.setExtra('SDKParams', {
|
|
77
|
+
platformHost: params.platformHost,
|
|
78
|
+
podSpaceFileServer: params.podSpaceFileServer,
|
|
79
|
+
socketAddress: params.socketAddress,
|
|
80
|
+
ssoHost: params.ssoHost,
|
|
81
|
+
typeCode: params.typeCode,
|
|
82
|
+
serverName: params.serverName,
|
|
83
|
+
callRequestTimeout: params.callRequestTimeout,
|
|
84
|
+
asyncRequestTimeout: params.asyncRequestTimeout,
|
|
85
|
+
httpUploadRequestTimeout: params.httpUploadRequestTimeout,
|
|
86
|
+
callOptions: params.callOptions
|
|
87
|
+
});
|
|
88
|
+
|
|
75
89
|
Sentry.setTag('Error code:', (err.code ? err.code : ''))
|
|
90
|
+
if(err.environmentDetails)
|
|
91
|
+
Sentry.setExtra("environmentDetails", err.environmentDetails)
|
|
76
92
|
Sentry.captureException(err.error, {
|
|
77
93
|
logger: eventName
|
|
78
94
|
});
|