@wireapp/avs 9.0.13 → 9.0.17
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/avs_core.js +5 -6
- package/dist/avs_pc.js +46 -45
- package/package.json +1 -1
package/dist/avs_pc.js
CHANGED
|
@@ -971,21 +971,21 @@ function pc_LocalDescription(hnd, typePtr) {
|
|
|
971
971
|
pc_log(LOG_LEVEL_INFO, "pc_LocalDescription: hnd=" + hnd);
|
|
972
972
|
var pc = connectionsStore.getPeerConnection(hnd);
|
|
973
973
|
if (pc == null) {
|
|
974
|
-
return;
|
|
974
|
+
return 0;
|
|
975
975
|
}
|
|
976
976
|
var rtc = pc.rtc;
|
|
977
977
|
if (!rtc) {
|
|
978
|
-
return;
|
|
978
|
+
return 0;
|
|
979
979
|
}
|
|
980
980
|
var sdpDesc = rtc.localDescription;
|
|
981
981
|
if (!sdpDesc) {
|
|
982
|
-
return;
|
|
982
|
+
return 0;
|
|
983
983
|
}
|
|
984
984
|
if (typePtr != null) {
|
|
985
985
|
var type = em_module.UTF8ToString(typePtr);
|
|
986
986
|
if (type != sdpDesc.type) {
|
|
987
987
|
pc_log(LOG_LEVEL_WARN, "pc_LocalDescriptiont: wrong type");
|
|
988
|
-
return
|
|
988
|
+
return 0;
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
991
|
var sdp = sdpDesc.sdp.toString();
|
|
@@ -1005,16 +1005,16 @@ function pc_HeapFree(ptr) {
|
|
|
1005
1005
|
}
|
|
1006
1006
|
function pc_IceGatheringState(hnd) {
|
|
1007
1007
|
pc_log(LOG_LEVEL_INFO, "pc_IceGatheringState: hnd=" + hnd);
|
|
1008
|
+
var state = PC_GATHER_STATE_UNKNOWN;
|
|
1008
1009
|
var pc = connectionsStore.getPeerConnection(hnd);
|
|
1009
1010
|
if (!pc) {
|
|
1010
|
-
return
|
|
1011
|
+
return state;
|
|
1011
1012
|
}
|
|
1012
1013
|
var rtc = pc.rtc;
|
|
1013
1014
|
if (!rtc) {
|
|
1014
|
-
return;
|
|
1015
|
+
return state;
|
|
1015
1016
|
}
|
|
1016
1017
|
var stateStr = rtc.iceGatheringState;
|
|
1017
|
-
var state = PC_GATHER_STATE_UNKNOWN;
|
|
1018
1018
|
switch (stateStr) {
|
|
1019
1019
|
case "new":
|
|
1020
1020
|
state = PC_GATHER_STATE_NEW;
|
|
@@ -1030,16 +1030,17 @@ function pc_IceGatheringState(hnd) {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
function pc_SignalingState(hnd) {
|
|
1032
1032
|
pc_log(LOG_LEVEL_INFO, "pc_SignalingState: hnd=" + hnd);
|
|
1033
|
+
var state = PC_SIG_STATE_UNKNOWN;
|
|
1033
1034
|
var pc = connectionsStore.getPeerConnection(hnd);
|
|
1034
1035
|
if (!pc) {
|
|
1035
|
-
return
|
|
1036
|
+
return state;
|
|
1036
1037
|
}
|
|
1037
1038
|
var rtc = pc.rtc;
|
|
1038
1039
|
if (!rtc) {
|
|
1039
|
-
return;
|
|
1040
|
+
return state;
|
|
1040
1041
|
}
|
|
1041
1042
|
var stateStr = rtc.signalingState;
|
|
1042
|
-
|
|
1043
|
+
state = sigState(stateStr);
|
|
1043
1044
|
pc_log(LOG_LEVEL_INFO, "pc_SignalingState: hnd=" + hnd + " " + stateStr + " mapped: " + state);
|
|
1044
1045
|
return state;
|
|
1045
1046
|
}
|
|
@@ -1054,7 +1055,7 @@ function pc_ConnectionState(hnd) {
|
|
|
1054
1055
|
*/
|
|
1055
1056
|
var rtc = pc.rtc;
|
|
1056
1057
|
if (!rtc) {
|
|
1057
|
-
return;
|
|
1058
|
+
return 0;
|
|
1058
1059
|
}
|
|
1059
1060
|
var state = rtc.connectionState;
|
|
1060
1061
|
return state;
|
|
@@ -1070,7 +1071,7 @@ function pc_SetMute(hnd, muted) {
|
|
|
1070
1071
|
function pc_GetMute(hnd) {
|
|
1071
1072
|
var pc = connectionsStore.getPeerConnection(hnd);
|
|
1072
1073
|
if (pc == null) {
|
|
1073
|
-
return;
|
|
1074
|
+
return 0;
|
|
1074
1075
|
}
|
|
1075
1076
|
return pc.muted;
|
|
1076
1077
|
}
|
|
@@ -1087,11 +1088,11 @@ function pc_CreateDataChannel(hnd, labelPtr) {
|
|
|
1087
1088
|
pc_log(LOG_LEVEL_INFO, "pc_CreateDataChannel: hnd=" + hnd);
|
|
1088
1089
|
var pc = connectionsStore.getPeerConnection(hnd);
|
|
1089
1090
|
if (pc == null) {
|
|
1090
|
-
return;
|
|
1091
|
+
return 0;
|
|
1091
1092
|
}
|
|
1092
1093
|
var rtc = pc.rtc;
|
|
1093
1094
|
if (!rtc) {
|
|
1094
|
-
return;
|
|
1095
|
+
return 0;
|
|
1095
1096
|
}
|
|
1096
1097
|
var label = em_module.UTF8ToString(labelPtr);
|
|
1097
1098
|
var dc = rtc.createDataChannel(label);
|
|
@@ -1111,12 +1112,12 @@ function pc_DataChannelId(hnd) {
|
|
|
1111
1112
|
}
|
|
1112
1113
|
function pc_DataChannelState(hnd) {
|
|
1113
1114
|
pc_log(LOG_LEVEL_INFO, "pc_DataChannelState: hnd=" + hnd);
|
|
1115
|
+
var state = DC_STATE_ERROR;
|
|
1114
1116
|
var dc = connectionsStore.getDataChannel(hnd);
|
|
1115
1117
|
if (dc == null) {
|
|
1116
|
-
return;
|
|
1118
|
+
return state;
|
|
1117
1119
|
}
|
|
1118
1120
|
var str = dc.readyState;
|
|
1119
|
-
var state = DC_STATE_ERROR;
|
|
1120
1121
|
if (str == "connecting") {
|
|
1121
1122
|
state = DC_STATE_CONNECTING;
|
|
1122
1123
|
}
|
|
@@ -1159,35 +1160,35 @@ function pc_InitModule(module, logh) {
|
|
|
1159
1160
|
em_module = module;
|
|
1160
1161
|
logFn = logh;
|
|
1161
1162
|
var callbacks = [
|
|
1162
|
-
[pc_SetEnv, "
|
|
1163
|
-
[pc_New, "
|
|
1164
|
-
[pc_Create, "
|
|
1165
|
-
[pc_Close, "
|
|
1166
|
-
[pc_HeapFree, "
|
|
1167
|
-
[pc_AddTurnServer, "
|
|
1168
|
-
[pc_IceGatheringState, "
|
|
1169
|
-
[pc_SignalingState, "
|
|
1170
|
-
[pc_ConnectionState, "
|
|
1171
|
-
[pc_CreateDataChannel, "
|
|
1172
|
-
[pc_CreateOffer, "
|
|
1173
|
-
[pc_CreateAnswer, "
|
|
1174
|
-
[pc_AddDecoderAnswer, "
|
|
1175
|
-
[pc_AddUserInfo, "
|
|
1176
|
-
[pc_RemoveUserInfo, "
|
|
1177
|
-
[pc_SetRemoteDescription, "
|
|
1178
|
-
[pc_SetLocalDescription, "
|
|
1179
|
-
[pc_LocalDescription, "
|
|
1180
|
-
[pc_SetMute, "
|
|
1181
|
-
[pc_GetMute, "
|
|
1182
|
-
[pc_GetLocalStats, "
|
|
1183
|
-
[pc_SetRemoteUserClientId, "
|
|
1184
|
-
[pc_HasVideo, "
|
|
1185
|
-
[pc_SetVideoState, "
|
|
1186
|
-
[pc_DataChannelId, "
|
|
1187
|
-
[pc_DataChannelState, "
|
|
1188
|
-
[pc_DataChannelSend, "
|
|
1189
|
-
[pc_DataChannelClose, "
|
|
1190
|
-
[pc_SetMediaKey, "
|
|
1163
|
+
[pc_SetEnv, "vi"],
|
|
1164
|
+
[pc_New, "iiiiii"],
|
|
1165
|
+
[pc_Create, "viii"],
|
|
1166
|
+
[pc_Close, "vi"],
|
|
1167
|
+
[pc_HeapFree, "vi"],
|
|
1168
|
+
[pc_AddTurnServer, "viiii"],
|
|
1169
|
+
[pc_IceGatheringState, "ii"],
|
|
1170
|
+
[pc_SignalingState, "ii"],
|
|
1171
|
+
[pc_ConnectionState, "ii"],
|
|
1172
|
+
[pc_CreateDataChannel, "iii"],
|
|
1173
|
+
[pc_CreateOffer, "viii"],
|
|
1174
|
+
[pc_CreateAnswer, "viii"],
|
|
1175
|
+
[pc_AddDecoderAnswer, "vi"],
|
|
1176
|
+
[pc_AddUserInfo, "viiiiiiiii"],
|
|
1177
|
+
[pc_RemoveUserInfo, "vii"],
|
|
1178
|
+
[pc_SetRemoteDescription, "viii"],
|
|
1179
|
+
[pc_SetLocalDescription, "viii"],
|
|
1180
|
+
[pc_LocalDescription, "iii"],
|
|
1181
|
+
[pc_SetMute, "vii"],
|
|
1182
|
+
[pc_GetMute, "ii"],
|
|
1183
|
+
[pc_GetLocalStats, "vi"],
|
|
1184
|
+
[pc_SetRemoteUserClientId, "viii"],
|
|
1185
|
+
[pc_HasVideo, "ii"],
|
|
1186
|
+
[pc_SetVideoState, "vii"],
|
|
1187
|
+
[pc_DataChannelId, "ii"],
|
|
1188
|
+
[pc_DataChannelState, "ii"],
|
|
1189
|
+
[pc_DataChannelSend, "viii"],
|
|
1190
|
+
[pc_DataChannelClose, "vi"],
|
|
1191
|
+
[pc_SetMediaKey, "viiiii"],
|
|
1191
1192
|
].map(function (_a) {
|
|
1192
1193
|
var callback = _a[0], signature = _a[1];
|
|
1193
1194
|
return em_module.addFunction(callback, signature);
|
package/package.json
CHANGED