@sdk185/sip-phone-sdk26 0.2.11 → 0.2.13

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.
@@ -12,7 +12,7 @@
12
12
  <!-- 通话信息显示区域 -->
13
13
  <div class="d-flex flex-column align-center call-btn" v-if="!miniMode && !showDialPad">
14
14
  <!-- 应用logo -->
15
- <img class="elevation-4 call-img" alt="logo" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/normal-logo.png"/>
15
+ <img class="elevation-4 call-img" alt="logo" :src="chatURL+'/static/normal-logo.png'"/>
16
16
  <!-- 通话状态提示 -->
17
17
  <p class="mt-6 mb-0 call-label" >{{callPrompt}}</p>
18
18
  </div>
@@ -36,7 +36,7 @@
36
36
  v-show="!isCalling && !needDial"
37
37
  @click="onHangupBtnClick"
38
38
  >
39
- <img class="cancel-img" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/call-down.png" alt="hangup" >
39
+ <img class="cancel-img" :src="chatURL+'/static/call-down.png'" alt="hangup" >
40
40
  <span class="cancel-label">取消</span>
41
41
  </v-btn>
42
42
  <v-btn
@@ -45,8 +45,8 @@
45
45
  @click="onMuteBtnClick('audio')"
46
46
  class="custom-mute-btn btn-box"
47
47
  >
48
- <img class="img-open-close" v-if="!isAudioMute" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/adudio-open.png" >
49
- <img class="img-open-close" v-else src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/adudio-close.png" >
48
+ <img class="img-open-close" v-if="!isAudioMute" :src="chatURL+'/static/adudio-open.png'" >
49
+ <img class="img-open-close" v-else :src="chatURL+'/static/adudio-close.png'" >
50
50
  </v-btn>
51
51
  <!-- 摄像头开关按钮 -->
52
52
  <v-btn
@@ -55,8 +55,8 @@
55
55
  @click="onMuteBtnClick('video')"
56
56
  class="custom-mute-btn"
57
57
  >
58
- <img class="img-open-close" v-if="!isVideoMute" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/camera-open.png" alt="mic-on">
59
- <img class="img-open-close" v-else src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/camera-close.png" alt="mic-off">
58
+ <img class="img-open-close" v-if="!isVideoMute" :src="chatURL+'/static/camera-open.png'" alt="mic-on">
59
+ <img class="img-open-close" v-else :src="chatURL+'/static/camera-close.png'" alt="mic-off">
60
60
  </v-btn>
61
61
 
62
62
  </v-row>
@@ -69,7 +69,7 @@
69
69
  v-show="isCalling && showHangup"
70
70
  @click="onHangupBtnClick"
71
71
  >
72
- <img class="hangup-img" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/call-down.png" alt="hangup">
72
+ <img class="hangup-img" :src="chatURL+'/static/call-down.png'" alt="hangup">
73
73
  <span class="hangup-label">挂断</span>
74
74
  </v-btn>
75
75
  <!-- 切换摄像头按钮 -->
@@ -245,7 +245,7 @@ export default {
245
245
  return {
246
246
  prompt: `${this.$t('serverConnecting')}...`,
247
247
  callPrompt: this.$t('pleaseBePatient'),
248
-
248
+ chatURL:"https://kefu-gm-jc-dat.boc-samsunglife.cn",// 环境切换
249
249
  isCalling: false,
250
250
  showHangup: false,
251
251
  showAudioPlayer: true,
@@ -840,8 +840,8 @@ export default {
840
840
  if(this.localVideo.show) {
841
841
  return
842
842
  }
843
- this.localVideo.w = parseInt(this.clientWidth / 3)
844
- this.localVideo.h = parseInt(this.clientHeight / 3)
843
+ this.localVideo.w = this.clientWidth
844
+ this.localVideo.h = this.clientHeight
845
845
  this.localVideo.draggable = false
846
846
  this.showVideoCt = true
847
847
  this.localVideo.show = true
@@ -854,37 +854,56 @@ export default {
854
854
  console.info('remoteStream', stream, info)
855
855
  this._resetCmpWHLRTB()
856
856
 
857
+ // 修复:iOS remoteStream 事件优化
858
+ // 问题:iOS设备卡在localStream阶段,Android正常工作
859
+ // 解决方案:移除延迟,立即处理视频流
860
+
861
+ // 1. 立即绑定远程视频流(修复iOS卡顿问题)
862
+ // iOS需要立即绑定流来触发视频显示
863
+ this.$refs.remoteVideo.srcObject = stream
864
+
865
+ // 2. 调整本地视频到角落窗口(iOS和Android都优化)
866
+ // 将本地视频从全屏移动到左上角
857
867
  Object.assign(this.localVideo, {
858
- w: parseInt(this.clientWidth / 3),
859
- h: parseInt(this.clientHeight / 3),
860
- x: 0,
861
- y: 80,
862
- z: 1100,
863
- draggable: true
868
+ w: parseInt(this.clientWidth / 3), // 1/3 屏幕宽度
869
+ h: parseInt(this.clientHeight / 3), // 1/3 屏幕高度
870
+ x: 0, // 左侧位置
871
+ y: 80, // 顶部偏移(避免UI重叠)
872
+ z: 1100, // 前景层级
873
+ draggable: true // 启用拖拽
864
874
  })
865
- this.$nextTick(() => {
866
- this.$refs.localVideoWrapper.moveVertically(80)
875
+
876
+ // 3. 立即显示远程视频作为主视图(移除500ms延迟)
877
+ // 原来的setTimeout(500)导致iOS卡在localStream阶段
878
+ Object.assign(this.remoteVideo, {
879
+ show: true, // 显示远程视频
880
+ w: this.clientWidth, // 全屏宽度
881
+ h: this.clientHeight, // 全屏高度
882
+ x: 0, // 左侧位置
883
+ y: 0, // 顶部位置
884
+ z: 1000, // 背景层级
885
+ draggable: false // 禁用拖拽(主视图)
867
886
  })
868
887
 
869
-
870
- setTimeout(async () => {
871
- Object.assign(this.remoteVideo, {
872
- show: true,
873
- w: this.clientWidth,
874
- h: this.clientHeight,
875
- x: 0,
876
- y: 0,
877
- z: 1000,
878
- draggable: false
879
- })
880
-
881
- await this.$nextTick()
882
- if (this.autoHideLocalVideo) {
883
- this.localVideo.show = false
888
+ // 4. 应用布局更改并确保视频播放(iOS兼容性)
889
+ this.$nextTick(() => {
890
+ // 移动本地视频包装器到正确位置
891
+ this.$refs.localVideoWrapper.moveVertically(80)
892
+
893
+ // iOS:强制视频播放(iOS可能阻止自动播放)
894
+ // Android:play()会成功,无副作用
895
+ if (this.$refs.remoteVideo && this.$refs.remoteVideo.play) {
896
+ this.$refs.remoteVideo.play().catch(e => {
897
+ console.warn('iOS video play failed:', e)
898
+ // 即使播放失败也继续执行
899
+ })
884
900
  }
885
- this.$refs.remoteVideo.srcObject = stream
886
- }, 500)
901
+ })
887
902
 
903
+ // 5. 处理自动隐藏本地视频设置(逻辑不变)
904
+ if (this.autoHideLocalVideo) {
905
+ this.localVideo.show = false
906
+ }
888
907
  })
889
908
 
890
909
  this.sipMix.on('remoteRing', () => {
@@ -1281,17 +1300,6 @@ export default {
1281
1300
  pointer-events: none !important;
1282
1301
  }
1283
1302
 
1284
- /* iOS specific fixes */
1285
- // @supports (-webkit-touch-callout: none) {
1286
- // video {
1287
- // -webkit-transform: translateZ(0);
1288
- // transform: translateZ(0);
1289
- // -webkit-backface-visibility: hidden;
1290
- // backface-visibility: hidden;
1291
- // -webkit-perspective: 1000;
1292
- // perspective: 1000;
1293
- // }
1294
- // }
1295
1303
 
1296
1304
  /* 隐藏音量按钮(可选) */
1297
1305
  video::-webkit-media-controls-volume-slider {