@sdk185/sip-phone-sdk26 0.2.32 → 0.2.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sdk185/sip-phone-sdk26",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -119,8 +119,6 @@
119
119
  controls
120
120
  controlsList="nodownload nofullscreen noremoteplayback"
121
121
  disablepictureinpicture
122
- @play="onRemoteVideoPlaying"
123
- @loadedmetadata="onRemoteVideoLoaded"
124
122
  ></video>
125
123
  </vue-draggable-resizable>
126
124
  <!-- 本地视频窗口 -->
@@ -248,7 +246,8 @@ export default {
248
246
  return {
249
247
  prompt: `${this.$t('serverConnecting')}...`,
250
248
  callPrompt: this.$t('pleaseBePatient'),
251
- chatURL:"https://kefu-gm-jc-dat.boc-samsunglife.cn",// 环境切换
249
+ // chatURL:"https://kefu-gm-jc-dat.boc-samsunglife.cn",// dat环境切换
250
+ chatURL:"https://kefu-gm-jc-uat.boc-samsunglife.cn",// uat环境切换
252
251
  isCalling: false,
253
252
  showHangup: false,
254
253
  showAudioPlayer: true,
@@ -764,18 +763,6 @@ export default {
764
763
 
765
764
  return Promise.resolve(true)
766
765
  },
767
- // 视频成功播放回调
768
- onRemoteVideoPlaying() {
769
- console.log('[iOS] Remote video is playing')
770
- },
771
-
772
- // 元数据加载完成回调
773
- onRemoteVideoLoaded() {
774
- console.log('[iOS] Remote video metadata loaded')
775
- if (this.$refs.remoteVideo) {
776
- this.$refs.remoteVideo.play().catch(() => {})
777
- }
778
- },
779
766
 
780
767
  startSip ({debug, password, register, autoDial = false}) {
781
768
  const {domain, port, path} = window.config
@@ -865,51 +852,8 @@ export default {
865
852
  // this.$refs.localVideo.srcObject = stream
866
853
  })
867
854
 
868
- // this.sipMix.on('remoteStream', (stream, info) => {
869
- // console.info('remoteStream', stream, info)
870
- // this._resetCmpWHLRTB()
871
-
872
- // Object.assign(this.localVideo, {
873
- // w: parseInt(this.clientWidth / 3),
874
- // h: parseInt(this.clientHeight / 3),
875
- // x: 0,
876
- // y: 80,
877
- // z: 1100,
878
- // draggable: true
879
- // })
880
- // this.$nextTick(() => {
881
- // this.$refs.localVideoWrapper.moveVertically(80)
882
- // })
883
-
884
-
885
- // setTimeout(async () => {
886
- // Object.assign(this.remoteVideo, {
887
- // show: true,
888
- // w: this.clientWidth,
889
- // h: this.clientHeight,
890
- // x: 0,
891
- // y: 0,
892
- // z: 1000,
893
- // draggable: false
894
- // })
895
-
896
- // await this.$nextTick()
897
- // if (this.autoHideLocalVideo) {
898
- // this.localVideo.show = false
899
- // }
900
- // this.$refs.remoteVideo.srcObject = stream
901
- // }, 500)
902
-
903
- // })
904
-
905
855
  this.sipMix.on('remoteStream', (stream, info) => {
906
856
  console.info('remoteStream', stream, info)
907
-
908
- const video = this.$refs.remoteVideo
909
- if (!video) return
910
-
911
- video.srcObject = stream
912
-
913
857
  this._resetCmpWHLRTB()
914
858
 
915
859
  Object.assign(this.localVideo, {
@@ -920,33 +864,11 @@ export default {
920
864
  z: 1100,
921
865
  draggable: true
922
866
  })
923
-
924
867
  this.$nextTick(() => {
925
- // ==================== iOS 16 优化后版本(减少延迟) ====================
926
- const forcePlay = () => {
927
- if (video.paused || video.ended) {
928
- video.play().catch(err => {
929
- console.warn('Force play failed:', err.name)
930
- })
931
- }
932
- }
933
-
934
- // 更紧凑的调用顺序,减少延迟
935
- forcePlay() // 立即
936
- setTimeout(forcePlay, 30) // 30ms
937
- setTimeout(forcePlay, 100) // 100ms
938
-
939
- // 只监听一次,避免重复触发
940
- video.addEventListener('pause', forcePlay, { once: true })
941
-
942
- // 元数据加载完立即播放
943
- video.addEventListener('loadedmetadata', () => {
944
- console.log('[iOS] metadata loaded → force play')
945
- forcePlay()
946
- }, { once: true })
868
+ this.$refs.localVideoWrapper.moveVertically(80)
947
869
  })
948
870
 
949
- // 原有后续代码保持不变
871
+
950
872
  setTimeout(async () => {
951
873
  Object.assign(this.remoteVideo, {
952
874
  show: true,
@@ -962,7 +884,9 @@ export default {
962
884
  if (this.autoHideLocalVideo) {
963
885
  this.localVideo.show = false
964
886
  }
965
- }, 300) // 稍微调小一点
887
+ this.$refs.remoteVideo.srcObject = stream
888
+ }, 500)
889
+
966
890
  })
967
891
 
968
892
  this.sipMix.on('remoteRing', () => {
@@ -1380,29 +1304,5 @@ export default {
1380
1304
  height: 0 !important;
1381
1305
  pointer-events: none !important;
1382
1306
  }
1383
- /* iOS 16+ 纯前端压制中间暂停按钮 */
1384
- video::-webkit-media-controls-overlay-play-button,
1385
- video::-webkit-media-controls-start-playback-button,
1386
- video::-webkit-media-controls-play-button,
1387
- video::-webkit-media-controls-pause-button {
1388
- display: none !important;
1389
- opacity: 0 !important;
1390
- pointer-events: none !important;
1391
- visibility: hidden !important;
1392
- }
1393
-
1394
- /* 中间播放按钮 + 直播按钮 + 所有图标彻底隐藏 */
1395
- video::-webkit-media-controls-overlay-play-button,
1396
- video::-webkit-media-controls-start-playback-button,
1397
- video::-webkit-media-controls-live-button,
1398
- video::-webkit-full-screen-button,
1399
- video::-webkit-media-controls-panel {
1400
- display: none !important;
1401
- opacity: 0 !important;
1402
- visibility: hidden !important;
1403
- width: 0 !important;
1404
- height: 0 !important;
1405
- pointer-events: none !important;
1406
- }
1407
1307
 
1408
1308
  </style>