surflion-service 1.2.9 → 1.3.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/surflion.js +29 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "surflion-service",
3
- "version": "1.2.9",
3
+ "version": "1.3.1",
4
4
  "description": "",
5
5
  "main": "surflion.js",
6
6
  "scripts": {
package/surflion.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import JsSIP from 'jssip'
2
2
  var SurfLion = {
3
+ showAll: true,
3
4
  outgoingSession: null,
4
5
  incomingSession: null,
5
6
  currentSession: null,
@@ -58,6 +59,9 @@ var SurfLion = {
58
59
  }
59
60
  },
60
61
  createVCalling: function (callInfo) {
62
+ if(!SurfLion.showAll) {
63
+ return
64
+ }
61
65
  if(document.getElementById('surf-calling-virtually')) {
62
66
  document.getElementById('surf-calling-virtually').style.display = 'block'
63
67
  return
@@ -263,6 +267,9 @@ var SurfLion = {
263
267
  },
264
268
  // onCallIn
265
269
  createVAnswer: function (callInfo) {
270
+ if(!SurfLion.showAll) {
271
+ return
272
+ }
266
273
  if(document.getElementById('surf-answer-virtually')) {
267
274
  document.getElementById('surf-answer-virtually').style.display = 'block'
268
275
  return
@@ -393,6 +400,9 @@ var SurfLion = {
393
400
  document.body.appendChild(surfAnswerVirtually);
394
401
  },
395
402
  createVError: function (position, positionX, positionY) {
403
+ if(!SurfLion.showAll) {
404
+ return
405
+ }
396
406
  SurfLion.vPosition = position
397
407
  SurfLion.positionX = positionX
398
408
  SurfLion.positionY = positionY
@@ -544,6 +554,9 @@ var SurfLion = {
544
554
  SurfLion.createVKeyboard(true)
545
555
  },
546
556
  createVEnd: function () {
557
+ if(!SurfLion.showAll) {
558
+ return
559
+ }
547
560
  if(document.getElementById('surf-end-virtually')) {
548
561
  document.getElementById('surf-end-virtually').style.display = 'block'
549
562
  return
@@ -698,6 +711,9 @@ var SurfLion = {
698
711
  },
699
712
  // calling onCallBegin
700
713
  createVCall: function () {
714
+ if(!SurfLion.showAll) {
715
+ return
716
+ }
701
717
  if(document.getElementById('surf-call-virtually')) {
702
718
  document.getElementById('surf-call-virtually').style.display = 'block'
703
719
  return
@@ -870,6 +886,9 @@ var SurfLion = {
870
886
  // document.removeEventListener('keydown', SurfLion.addVKeydown);
871
887
  },
872
888
  createVKeyboard: function (show) {
889
+ if(!SurfLion.showAll) {
890
+ return
891
+ }
873
892
  if(!show) return
874
893
  if(document.getElementById('phone-virtually')) {
875
894
  document.getElementById('phone-virtually').style.display = 'block'
@@ -1093,6 +1112,9 @@ var SurfLion = {
1093
1112
  SurfLion.showPhoneNumber = numberVirtually.value
1094
1113
  },
1095
1114
  createLoading() {
1115
+ if(!SurfLion.showAll) {
1116
+ return
1117
+ }
1096
1118
  if(document.getElementById('loading-virtually')) {
1097
1119
  document.getElementById('loading-virtually').style.display = 'block'
1098
1120
  return
@@ -1152,6 +1174,9 @@ var SurfLion = {
1152
1174
  nameVirtually.textContent = SurfLion.findName(numberVirtually.value)
1153
1175
  },
1154
1176
  createVFloatWindow() {
1177
+ if(!SurfLion.showAll) {
1178
+ return
1179
+ }
1155
1180
  if(document.getElementById('float-virtually')) {
1156
1181
  document.getElementById('float-virtually').style.display = 'block'
1157
1182
  return
@@ -1457,7 +1482,7 @@ var SurfLion = {
1457
1482
  register: true,
1458
1483
  session_timers: false,
1459
1484
  iceServers: [],
1460
- contact: sip_uri_
1485
+ contact_uri: sip_uri_
1461
1486
  };
1462
1487
  function createDialerButton(digit) {
1463
1488
  const button = document.createElement('button');
@@ -1819,6 +1844,9 @@ var SurfLion = {
1819
1844
 
1820
1845
  closeShareWork: function() {
1821
1846
  SurfLion.worker.port.postMessage("close");
1847
+ },
1848
+ closeAllPage: function(state) {
1849
+ SurfLion.showAll = state
1822
1850
  }
1823
1851
  }
1824
1852