podchat-browser 12.7.2-snapshot.0 → 12.7.2-snapshot.1
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/node/call.module.js +19 -10
- package/dist/podchat-browser-bundle.js +13 -3
- package/dist.zip +0 -0
- package/package.json +1 -1
- package/src/call.module.js +16 -4
package/dist/node/call.module.js
CHANGED
|
@@ -2457,11 +2457,17 @@ function ChatCall(params) {
|
|
|
2457
2457
|
var restrictedMessageTypes = [_constants.chatMessageVOTypes.MUTE_CALL_PARTICIPANT, _constants.chatMessageVOTypes.UNMUTE_CALL_PARTICIPANT, _constants.chatMessageVOTypes.CALL_PARTICIPANT_JOINED, _constants.chatMessageVOTypes.REMOVE_CALL_PARTICIPANT, _constants.chatMessageVOTypes.RECONNECT, _constants.chatMessageVOTypes.TURN_OFF_VIDEO_CALL, _constants.chatMessageVOTypes.TURN_ON_VIDEO_CALL, _constants.chatMessageVOTypes.DESTINED_RECORD_CALL, _constants.chatMessageVOTypes.RECORD_CALL, _constants.chatMessageVOTypes.RECORD_CALL_STARTED, _constants.chatMessageVOTypes.END_RECORD_CALL, _constants.chatMessageVOTypes.TERMINATE_CALL, _constants.chatMessageVOTypes.CALL_STICKER_SYSTEM_MESSAGE // chatMessageVOTypes.END_CALL
|
|
2458
2458
|
];
|
|
2459
2459
|
|
|
2460
|
-
if (
|
|
2460
|
+
if (!callStopQueue.callStarted && restrictedMessageTypes.includes(type)) {
|
|
2461
2461
|
return true;
|
|
2462
2462
|
} else {
|
|
2463
2463
|
return false;
|
|
2464
2464
|
}
|
|
2465
|
+
/* if((!currentCallId || currentCallId && threadId != currentCallId) && restrictedMessageTypes.includes(type)){
|
|
2466
|
+
return true;
|
|
2467
|
+
} else {
|
|
2468
|
+
return false
|
|
2469
|
+
} */
|
|
2470
|
+
|
|
2465
2471
|
}
|
|
2466
2472
|
|
|
2467
2473
|
this.handleChatMessages = function (type, messageContent, contentCount, threadId, uniqueId) {
|
|
@@ -4686,21 +4692,24 @@ function ChatCall(params) {
|
|
|
4686
4692
|
subjectId: currentCallId
|
|
4687
4693
|
};
|
|
4688
4694
|
|
|
4689
|
-
if (!invitees || Array.isArray(invitees) || invitees.length) {
|
|
4695
|
+
if (!invitees || !Array.isArray(invitees) || !invitees.length) {
|
|
4690
4696
|
raiseCallError(_errorHandler.errorList.INVITEES_LIST_REQUIRED, callback, true, {});
|
|
4691
4697
|
return;
|
|
4692
4698
|
}
|
|
4693
4699
|
|
|
4694
4700
|
sendData.content = []; //params.invitees;
|
|
4695
4701
|
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4702
|
+
invitees.forEach(function (item) {
|
|
4703
|
+
item.idType = _constants.inviteeVOidTypes[item.idType];
|
|
4704
|
+
sendData.content.push(item);
|
|
4705
|
+
});
|
|
4706
|
+
/* for (let i = 0; i < invitees.length; i++) {
|
|
4707
|
+
let tempInvitee = invitees[i];
|
|
4708
|
+
if (tempInvitee && typeof tempInvitee.idType === "string") {
|
|
4709
|
+
tempInvitee.idType = inviteeVOidTypes[tempInvitee.idType];
|
|
4710
|
+
sendData.content.push(tempInvitee);
|
|
4711
|
+
}
|
|
4712
|
+
}*/
|
|
4704
4713
|
|
|
4705
4714
|
return chatMessaging.sendMessage(sendData, {
|
|
4706
4715
|
onResult: function onResult(result) {
|
|
@@ -45475,7 +45475,11 @@ callStateController.createSessionInChat(currentCallParams);}}break;}chatMessagin
|
|
|
45475
45475
|
* @param threadId
|
|
45476
45476
|
* @return {boolean}
|
|
45477
45477
|
*/function shouldNotProcessChatMessage(type,threadId){var restrictedMessageTypes=[_constants.chatMessageVOTypes.MUTE_CALL_PARTICIPANT,_constants.chatMessageVOTypes.UNMUTE_CALL_PARTICIPANT,_constants.chatMessageVOTypes.CALL_PARTICIPANT_JOINED,_constants.chatMessageVOTypes.REMOVE_CALL_PARTICIPANT,_constants.chatMessageVOTypes.RECONNECT,_constants.chatMessageVOTypes.TURN_OFF_VIDEO_CALL,_constants.chatMessageVOTypes.TURN_ON_VIDEO_CALL,_constants.chatMessageVOTypes.DESTINED_RECORD_CALL,_constants.chatMessageVOTypes.RECORD_CALL,_constants.chatMessageVOTypes.RECORD_CALL_STARTED,_constants.chatMessageVOTypes.END_RECORD_CALL,_constants.chatMessageVOTypes.TERMINATE_CALL,_constants.chatMessageVOTypes.CALL_STICKER_SYSTEM_MESSAGE// chatMessageVOTypes.END_CALL
|
|
45478
|
-
];if(
|
|
45478
|
+
];if(!callStopQueue.callStarted&&restrictedMessageTypes.includes(type)){return true;}else{return false;}/* if((!currentCallId || currentCallId && threadId != currentCallId) && restrictedMessageTypes.includes(type)){
|
|
45479
|
+
return true;
|
|
45480
|
+
} else {
|
|
45481
|
+
return false
|
|
45482
|
+
} */}this.handleChatMessages=function(type,messageContent,contentCount,threadId,uniqueId){consoleLogging&&console.debug("[SDK][CALL_MODULE][handleChatMessages]","type:",type,"threadId:",threadId,"currentCallId:",currentCallId,"shouldNotProcessChatMessage:",shouldNotProcessChatMessage(type,threadId));if(shouldNotProcessChatMessage(type,threadId)){return;}switch(type){/**
|
|
45479
45483
|
* Type 70 Send Call Request
|
|
45480
45484
|
*/case _constants.chatMessageVOTypes.CALL_REQUEST:callRequestController.callRequestReceived=true;callReceived({callId:messageContent.callId},function(r){});if(chatMessaging.messagesCallbacks[uniqueId]){chatMessaging.messagesCallbacks[uniqueId](_utility["default"].createReturnData(false,'',0,messageContent,contentCount));}messageContent.threadId=threadId;_eventsModule.chatEvents.fireEvent('callEvents',{type:'RECEIVE_CALL',result:messageContent});if(messageContent.callId>0){if(!currentCallId){currentCallId=messageContent.callId;}}else{_eventsModule.chatEvents.fireEvent('callEvents',{type:'PARTNER_RECEIVED_YOUR_CALL',result:messageContent});}break;/**
|
|
45481
45485
|
* Type 71 Accept Call Request
|
|
@@ -45673,8 +45677,14 @@ return;// me.peers[me.audioTopicName].getLocalStream().getTracks()[0].enabled =
|
|
|
45673
45677
|
me.audioTopicManager.getPeer().getLocalStream().getTracks()[0].enabled=true;callback&&callback();};this.resizeCallVideo=function(params,callback){if(params){if(!!params.width&&+params.width>0){callVideoMinWidth=+params.width;}if(!!params.height&&+params.height>0){callVideoMinHeight=+params.height;}if(!callUsers[chatMessaging.userInfo.id]){consoleLogging&&console.log("Error in resizeCallVideo(), call not started ");return;}var userObject=callUsers[chatMessaging.userInfo.id];//userObject.peers[userObject.videoTopicName]
|
|
45674
45678
|
userObject.videoTopicManager.getPeer().getLocalStream().getTracks()[0].applyConstraints({"width":callVideoMinWidth,"height":callVideoMinHeight}).then(function(res){userObject.htmlElements[userObject.videoTopicName].style.width=callVideoMinWidth+'px';userObject.htmlElements[userObject.videoTopicName].style.height=callVideoMinHeight+'px';callback&&callback();})["catch"](function(e){_eventsModule.chatEvents.fireEvent('error',{code:999,message:e});});}else{_eventsModule.chatEvents.fireEvent('error',{code:999,message:'No params have been sent to resize the video call! Send an object like {width: 640, height: 480}'});return;}};this.sendCallSticker=function(_ref3,callback){var _ref3$sticker=_ref3.sticker,sticker=_ref3$sticker===void 0?_constants.callStickerTypes.RAISE_HAND:_ref3$sticker;var sendMessageParams={chatMessageVOType:_constants.chatMessageVOTypes.CALL_STICKER_SYSTEM_MESSAGE,typeCode:generalTypeCode,//params.typeCode,
|
|
45675
45679
|
content:[sticker],subjectId:currentCallId};if(!sendMessageParams.subjectId){(0,_errorHandler.raiseError)(_errorHandler.errorList.INVALID_CALLID,callback,true,{});return;}if(!sticker||!Object.values(_constants.callStickerTypes).includes(sticker)){raiseCallError(_errorHandler.errorList.INVALID_STICKER_NAME,callback,true);return;}return chatMessaging.sendMessage(sendMessageParams,{onResult:function onResult(result){callback&&callback(result);}});};this.recallThreadParticipant=function(_ref4,callback){var invitees=_ref4.invitees;var sendData={chatMessageVOType:_constants.chatMessageVOTypes.RECALL_THREAD_PARTICIPANT,typeCode:generalTypeCode,//params.typeCode,
|
|
45676
|
-
content:null,subjectId:currentCallId};if(!invitees
|
|
45677
|
-
|
|
45680
|
+
content:null,subjectId:currentCallId};if(!invitees||!Array.isArray(invitees)||!invitees.length){raiseCallError(_errorHandler.errorList.INVITEES_LIST_REQUIRED,callback,true,{});return;}sendData.content=[];//params.invitees;
|
|
45681
|
+
invitees.forEach(function(item){item.idType=_constants.inviteeVOidTypes[item.idType];sendData.content.push(item);});/* for (let i = 0; i < invitees.length; i++) {
|
|
45682
|
+
let tempInvitee = invitees[i];
|
|
45683
|
+
if (tempInvitee && typeof tempInvitee.idType === "string") {
|
|
45684
|
+
tempInvitee.idType = inviteeVOidTypes[tempInvitee.idType];
|
|
45685
|
+
sendData.content.push(tempInvitee);
|
|
45686
|
+
}
|
|
45687
|
+
}*/return chatMessaging.sendMessage(sendData,{onResult:function onResult(result){callback&&callback(result);}});};this.deviceManager=_deviceManager["default"];this.callStop=callStop;this.restartMedia=restartMedia;}var _default=ChatCall;exports["default"]=_default;
|
|
45678
45688
|
|
|
45679
45689
|
},{"./events.module.js":262,"./lib/call/deviceManager.js":263,"./lib/constants":264,"./lib/errorHandler":265,"./utility/utility":267,"@babel/runtime/helpers/interopRequireDefault":3,"@babel/runtime/helpers/typeof":5,"kurento-utils":184}],261:[function(require,module,exports){
|
|
45680
45690
|
'use strict';var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _typeof3=require("@babel/runtime/helpers/typeof");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _typeof2=_interopRequireDefault(require("@babel/runtime/helpers/typeof"));var _podasyncWsOnly=_interopRequireDefault(require("podasync-ws-only"));var _utility=_interopRequireDefault(require("./utility/utility"));var _dexie=_interopRequireDefault(require("dexie"));var _call=_interopRequireDefault(require("./call.module"));var _events=_interopRequireWildcard(require("./events.module"));var _messaging=_interopRequireDefault(require("./messaging.module"));var _constants=require("./lib/constants");var _deviceManager=_interopRequireDefault(require("./lib/call/deviceManager.js"));function _getRequireWildcardCache(nodeInterop){if(typeof WeakMap!=="function")return null;var cacheBabelInterop=new WeakMap();var cacheNodeInterop=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(nodeInterop){return nodeInterop?cacheNodeInterop:cacheBabelInterop;})(nodeInterop);}function _interopRequireWildcard(obj,nodeInterop){if(!nodeInterop&&obj&&obj.__esModule){return obj;}if(obj===null||_typeof3(obj)!=="object"&&typeof obj!=="function"){return{"default":obj};}var cache=_getRequireWildcardCache(nodeInterop);if(cache&&cache.has(obj)){return cache.get(obj);}var newObj={};var hasPropertyDescriptor=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var key in obj){if(key!=="default"&&Object.prototype.hasOwnProperty.call(obj,key)){var desc=hasPropertyDescriptor?Object.getOwnPropertyDescriptor(obj,key):null;if(desc&&(desc.get||desc.set)){Object.defineProperty(newObj,key,desc);}else{newObj[key]=obj[key];}}}newObj["default"]=obj;if(cache){cache.set(obj,newObj);}return newObj;}function Chat(params){/*******************************************************
|
package/dist.zip
ADDED
|
Binary file
|
package/package.json
CHANGED
package/src/call.module.js
CHANGED
|
@@ -2453,11 +2453,18 @@ function ChatCall(params) {
|
|
|
2453
2453
|
// chatMessageVOTypes.END_CALL
|
|
2454
2454
|
];
|
|
2455
2455
|
|
|
2456
|
-
if(
|
|
2456
|
+
if(!callStopQueue.callStarted && restrictedMessageTypes.includes(type)) {
|
|
2457
2457
|
return true;
|
|
2458
2458
|
} else {
|
|
2459
2459
|
return false
|
|
2460
2460
|
}
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
/* if((!currentCallId || currentCallId && threadId != currentCallId) && restrictedMessageTypes.includes(type)){
|
|
2464
|
+
return true;
|
|
2465
|
+
} else {
|
|
2466
|
+
return false
|
|
2467
|
+
} */
|
|
2461
2468
|
}
|
|
2462
2469
|
|
|
2463
2470
|
this.handleChatMessages = function(type, messageContent, contentCount, threadId, uniqueId) {
|
|
@@ -4653,20 +4660,25 @@ function ChatCall(params) {
|
|
|
4653
4660
|
subjectId: currentCallId,
|
|
4654
4661
|
};
|
|
4655
4662
|
|
|
4656
|
-
if(!invitees || Array.isArray(invitees) || invitees.length) {
|
|
4663
|
+
if(!invitees || !Array.isArray(invitees) || !invitees.length) {
|
|
4657
4664
|
raiseCallError(errorList.INVITEES_LIST_REQUIRED, callback, true, {});
|
|
4658
4665
|
return;
|
|
4659
4666
|
}
|
|
4660
4667
|
|
|
4661
4668
|
sendData.content = [];//params.invitees;
|
|
4662
|
-
|
|
4669
|
+
invitees.forEach(item => {
|
|
4670
|
+
item.idType = inviteeVOidTypes[item.idType];
|
|
4671
|
+
sendData.content.push(item);
|
|
4672
|
+
})
|
|
4673
|
+
/* for (let i = 0; i < invitees.length; i++) {
|
|
4663
4674
|
let tempInvitee = invitees[i];
|
|
4664
4675
|
|
|
4676
|
+
|
|
4665
4677
|
if (tempInvitee && typeof tempInvitee.idType === "string") {
|
|
4666
4678
|
tempInvitee.idType = inviteeVOidTypes[tempInvitee.idType];
|
|
4667
4679
|
sendData.content.push(tempInvitee);
|
|
4668
4680
|
}
|
|
4669
|
-
}
|
|
4681
|
+
}*/
|
|
4670
4682
|
|
|
4671
4683
|
return chatMessaging.sendMessage(sendData, {
|
|
4672
4684
|
onResult: function (result) {
|