@sdk185/sip-phone-sdk26 0.0.6 → 0.0.7
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/sip-phone-sdk.common.js +113 -51
- package/dist/sip-phone-sdk.css +1 -1
- package/dist/sip-phone-sdk.umd.js +113 -51
- package/dist/sip-phone-sdk.umd.min.js +5 -5
- package/package.json +1 -1
- package/src/components/MobilePhone.vue +87 -81
package/package.json
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<!-- 主容器:使用flex垂直布局,内容居中对齐 -->
|
|
4
4
|
<div class="d-flex flex-column align-center justify-space-between sip-call-main">
|
|
5
|
+
<!-- 顶部提示信息 -->
|
|
6
|
+
<div style="position: absolute; top: 0; left: 0; background: transparent; color: #FFFFFF; width: 100%; z-index: 9999; height: 0; padding-top: 10px; padding-left: 10px;">
|
|
7
|
+
<!-- {{ prompt }} -->
|
|
8
|
+
</div>
|
|
5
9
|
<!-- 位置信息显示区域 -->
|
|
6
10
|
<div class="location-wrapper" v-if="showLocation">
|
|
7
11
|
<!-- 显示经纬度和海拔信息 -->
|
|
@@ -10,19 +14,21 @@
|
|
|
10
14
|
<p>ALT: {{altitude}}</p>
|
|
11
15
|
</div>
|
|
12
16
|
<!-- 通话信息显示区域 -->
|
|
13
|
-
<div class="d-flex flex-column align-center
|
|
17
|
+
<div class="d-flex flex-column align-center" v-if="!miniMode && !showDialPad" style="margin-top:160px;">
|
|
14
18
|
<!-- 应用logo -->
|
|
15
|
-
<img class="elevation-4
|
|
19
|
+
<!-- <img class="elevation-4" alt="logo" :src="require('@/assets/normal-logo.png')" width="72" height="72" style="border-radius: 50%;"/> -->
|
|
20
|
+
<img class="elevation-4" alt="logo" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/normal-logo.png" width="72" height="72" style="border-radius: 50%;"/>
|
|
16
21
|
<!-- 通话状态提示 -->
|
|
17
|
-
<p class="mt-6 mb-0
|
|
22
|
+
<p class="mt-6 mb-0" style="font-size: 16px; color: #FFFFFF;">{{callPrompt}}</p>
|
|
18
23
|
</div>
|
|
24
|
+
|
|
19
25
|
<!-- 功能按钮区域 -->
|
|
20
26
|
<div class="pr-10 pl-10 btn-group" v-if="!miniMode && !showDialPad">
|
|
21
27
|
<v-row>
|
|
22
28
|
<v-col cols="12" class="text-center">
|
|
23
29
|
<!-- 通话计时器 -->
|
|
24
30
|
<div
|
|
25
|
-
v-show="isCalling && showHangup"
|
|
31
|
+
v-show="isCalling && showHangup" style="font-size: 14px;margin-top: -50px; color: #FFFFFF;">
|
|
26
32
|
视频时长 {{duration}}
|
|
27
33
|
</div>
|
|
28
34
|
</v-col>
|
|
@@ -31,23 +37,46 @@
|
|
|
31
37
|
<v-row class="d-flex justify-space-around mb-10">
|
|
32
38
|
<!-- 取消按钮 - 用于微信公众号调用的场景 -->
|
|
33
39
|
<v-btn
|
|
34
|
-
|
|
35
|
-
style=" "
|
|
40
|
+
style="opacity: 1; background: transparent; box-shadow: none; position: relative; margin-top: -200px;"
|
|
36
41
|
v-show="!isCalling && !needDial"
|
|
37
42
|
@click="onHangupBtnClick"
|
|
38
43
|
>
|
|
39
|
-
<img
|
|
40
|
-
<
|
|
44
|
+
<!-- <img :src="require('@/assets/call-down.png')" alt="hangup" width="80" height="80"> -->
|
|
45
|
+
<img src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/call-down.png" alt="hangup" width="80" height="80">
|
|
46
|
+
|
|
47
|
+
<span style="position: absolute; top: 78px; color: #FFFFFF;">取消</span>
|
|
41
48
|
</v-btn>
|
|
49
|
+
|
|
50
|
+
<!-- 原拨号按钮已注释,改为由微信公众号调用 -->
|
|
51
|
+
<!-- <v-btn
|
|
52
|
+
large
|
|
53
|
+
fab
|
|
54
|
+
color="#FFFFFF"
|
|
55
|
+
v-show="!isCalling && !needDial"
|
|
56
|
+
@click="onMakeCallBtnClick"
|
|
57
|
+
>
|
|
58
|
+
<v-icon>mdi-phone</v-icon>
|
|
59
|
+
<span class="btn-label">拨号</span>
|
|
60
|
+
</v-btn> -->
|
|
61
|
+
|
|
62
|
+
<!-- 麦克风静音/取消静音按钮 -->
|
|
63
|
+
<!-- 当正在通话且显示挂断按钮时显示 -->
|
|
64
|
+
<!-- 点击时触发onMuteBtnClick方法,传入'audio'参数 -->
|
|
42
65
|
<v-btn
|
|
43
66
|
large
|
|
44
67
|
v-show="isCalling && showHangup"
|
|
45
68
|
@click="onMuteBtnClick('audio')"
|
|
46
69
|
class="custom-mute-btn"
|
|
47
70
|
>
|
|
48
|
-
|
|
49
|
-
<img
|
|
71
|
+
<!-- 静音状态显示开启的麦克风图标 -->
|
|
72
|
+
<!-- <img v-if="!isAudioMute" :src="require('@/assets/adudio-open.png')" width="55" height="80">
|
|
73
|
+
<img v-else :src="require('@/assets/audio-close.png')" width="55" height="80"> -->
|
|
74
|
+
<img v-if="!isAudioMute" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/adudio-open.png" width="55" height="80">
|
|
75
|
+
<img v-else src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/adudio-close.png" width="55" height="80">
|
|
76
|
+
<!-- 显示当前状态的文字提示 -->
|
|
77
|
+
<!-- <span class="btn-label">{{ isAudioMute ? '取消静音' : '静音' }}</span> -->
|
|
50
78
|
</v-btn>
|
|
79
|
+
|
|
51
80
|
<!-- 摄像头开关按钮 -->
|
|
52
81
|
<v-btn
|
|
53
82
|
large
|
|
@@ -55,10 +84,26 @@
|
|
|
55
84
|
@click="onMuteBtnClick('video')"
|
|
56
85
|
class="custom-mute-btn"
|
|
57
86
|
>
|
|
58
|
-
<img
|
|
59
|
-
<img
|
|
87
|
+
<!-- <img v-if="!isVideoMute" :src="require('@/assets/camera-open.png')" alt="mic-on" width="55" height="80">
|
|
88
|
+
<img v-else :src="require('@/assets/camera-close.png')" alt="mic-off" width="55" height="80"> -->
|
|
89
|
+
<img v-if="!isVideoMute" src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/camera-open.png" alt="mic-on" width="55" height="80">
|
|
90
|
+
<img v-else src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/camera-close.png" alt="mic-off" width="55" height="80">
|
|
60
91
|
</v-btn>
|
|
61
92
|
|
|
93
|
+
<!-- 显示/隐藏本地视频按钮 -->
|
|
94
|
+
<!-- <v-btn
|
|
95
|
+
style="opacity: .6"
|
|
96
|
+
color="blue-grey"
|
|
97
|
+
fab
|
|
98
|
+
large
|
|
99
|
+
dark
|
|
100
|
+
v-show="isCalling && showHangup"
|
|
101
|
+
@click="onShowLocalVideoBtnClick"
|
|
102
|
+
>
|
|
103
|
+
<v-icon v-if="localVideo.show">mdi-monitor</v-icon>
|
|
104
|
+
<v-icon v-else>mdi-monitor-multiple</v-icon>
|
|
105
|
+
<span class="btn-label">{{ localVideo.show ? '隐藏本地' : '显示本地' }}</span>
|
|
106
|
+
</v-btn> -->
|
|
62
107
|
</v-row>
|
|
63
108
|
|
|
64
109
|
<!-- 第二行按钮组 -->
|
|
@@ -69,11 +114,14 @@
|
|
|
69
114
|
v-show="isCalling && showHangup"
|
|
70
115
|
@click="onHangupBtnClick"
|
|
71
116
|
>
|
|
72
|
-
<img
|
|
73
|
-
<
|
|
117
|
+
<!-- <img :src="require('@/assets/call-down.png')" alt="hangup" width="80" height="80"> -->
|
|
118
|
+
<img src="https://kefu-gm-jc-dat.boc-samsunglife.cn/static/call-down.png" alt="hangup" width="80" height="80">
|
|
119
|
+
<span style="position: absolute; top: 73px; color: #FFFFFF;">挂断</span>
|
|
74
120
|
</v-btn>
|
|
121
|
+
|
|
75
122
|
<!-- 切换摄像头按钮 -->
|
|
76
123
|
<v-btn
|
|
124
|
+
style="opacity: .6; position: absolute; left: calc(50% + 80px);"
|
|
77
125
|
v-show="isCalling && showHangup"
|
|
78
126
|
@click="onSwitchCameraBtnClick"
|
|
79
127
|
class="transparent-btn"
|
|
@@ -82,6 +130,7 @@
|
|
|
82
130
|
</v-btn>
|
|
83
131
|
</v-row>
|
|
84
132
|
</div>
|
|
133
|
+
|
|
85
134
|
<!-- 视频容器区域 -->
|
|
86
135
|
<v-expand-transition>
|
|
87
136
|
<div class="sip-call-wrapper" v-show="showVideoCt" @click="onSipCallClick">
|
|
@@ -148,8 +197,25 @@
|
|
|
148
197
|
controls
|
|
149
198
|
></video>
|
|
150
199
|
</vue-draggable-resizable>
|
|
200
|
+
|
|
201
|
+
<!-- 视频控制区域 -->
|
|
202
|
+
<!-- <template v-if="!miniMode">
|
|
203
|
+
通话计时器
|
|
204
|
+
<span class="video-timer">
|
|
205
|
+
<img :src="require('@/assets/icon_Recording_Fill_Red_Active.svg')" alt="icon" width="24" height="24" class="mr-2">
|
|
206
|
+
{{duration}}
|
|
207
|
+
</span>
|
|
208
|
+
|
|
209
|
+
全屏切换按钮
|
|
210
|
+
<v-btn class="camera-switch-btn" dark text x-small width="24" height="24" min-width="24" @click="onChangeVideoFullScreenBtnClick">
|
|
211
|
+
<v-icon>mdi-box-shadow</v-icon>
|
|
212
|
+
<span class="btn-label">全屏</span>
|
|
213
|
+
</v-btn>
|
|
214
|
+
</template> -->
|
|
215
|
+
|
|
151
216
|
</div>
|
|
152
217
|
</v-expand-transition>
|
|
218
|
+
|
|
153
219
|
<!-- 拨号盘组件 -->
|
|
154
220
|
<v-expand-transition>
|
|
155
221
|
<dial-panel-mini
|
|
@@ -162,10 +228,12 @@
|
|
|
162
228
|
ref="dialPanelMini"
|
|
163
229
|
/>
|
|
164
230
|
</v-expand-transition>
|
|
231
|
+
|
|
165
232
|
<!-- 音频播放器(用于播放提示音) -->
|
|
166
233
|
<v-bottom-sheet v-model="showAudioPlayer" hide-overlay>
|
|
167
234
|
<audio :src="require('@/assets/outgoing-call2.mp3')" loop ref="audioPlayer"></audio>
|
|
168
235
|
</v-bottom-sheet>
|
|
236
|
+
|
|
169
237
|
<!-- 提示信息弹窗 -->
|
|
170
238
|
<v-snackbar v-model="showSnackbar" :timeout="2000">
|
|
171
239
|
{{snackbarText}}
|
|
@@ -523,17 +591,12 @@ export default {
|
|
|
523
591
|
}
|
|
524
592
|
|
|
525
593
|
const params = { target: this.dialNum }
|
|
526
|
-
console.log('paramsparams Data', params)
|
|
527
|
-
console.log('this.callData Data', this.callData)
|
|
528
|
-
console.log('window.config.videoParams', window.config.videoParams)
|
|
529
594
|
if (this.callType === 'videoOnly') {
|
|
530
|
-
console.log('videoOnly')
|
|
531
595
|
params.video = Object.assign({
|
|
532
596
|
facingMode: 'user'
|
|
533
597
|
}, window.config.videoParams)
|
|
534
598
|
params.audio = false
|
|
535
599
|
} else if (this.callType === 'video') {
|
|
536
|
-
console.log('video')
|
|
537
600
|
params.video = Object.assign({
|
|
538
601
|
facingMode: 'user'
|
|
539
602
|
}, window.config.videoParams)
|
|
@@ -545,7 +608,6 @@ export default {
|
|
|
545
608
|
|
|
546
609
|
if (this.callData) {
|
|
547
610
|
params.callData = this.callData
|
|
548
|
-
console.log('Call Da1ta', this.callData)
|
|
549
611
|
}
|
|
550
612
|
|
|
551
613
|
// console.info('Call Params', params)
|
|
@@ -567,6 +629,7 @@ export default {
|
|
|
567
629
|
}
|
|
568
630
|
|
|
569
631
|
},
|
|
632
|
+
|
|
570
633
|
onHangupBtnClick () {
|
|
571
634
|
this.sipMix.hangup();
|
|
572
635
|
// this.$emit('hangup-event', { imType: 0 });// 通知父组件
|
|
@@ -967,15 +1030,15 @@ export default {
|
|
|
967
1030
|
.btn-group {
|
|
968
1031
|
width: 100%;
|
|
969
1032
|
position: absolute;
|
|
970
|
-
bottom:
|
|
1033
|
+
bottom: 150px;
|
|
971
1034
|
z-index: 4000;
|
|
972
1035
|
}
|
|
973
1036
|
|
|
974
1037
|
@media screen and (min-width: 1024px) {
|
|
975
1038
|
.btn-group {
|
|
976
1039
|
position: absolute;
|
|
977
|
-
bottom:
|
|
978
|
-
width:
|
|
1040
|
+
bottom: 80px;
|
|
1041
|
+
width: 640px;
|
|
979
1042
|
z-index: 4000;
|
|
980
1043
|
}
|
|
981
1044
|
}
|
|
@@ -988,6 +1051,7 @@ export default {
|
|
|
988
1051
|
}
|
|
989
1052
|
|
|
990
1053
|
.video-panel {
|
|
1054
|
+
// touch-action: none;
|
|
991
1055
|
position: absolute;
|
|
992
1056
|
display: flex;
|
|
993
1057
|
flex-direction: column;
|
|
@@ -1094,68 +1158,10 @@ export default {
|
|
|
1094
1158
|
height: auto !important;
|
|
1095
1159
|
padding: 0 !important;
|
|
1096
1160
|
margin: 0 !important;
|
|
1097
|
-
opacity: .6 !important;
|
|
1098
|
-
position: absolute !important;
|
|
1099
|
-
left: calc(50% + 80px) !important;
|
|
1100
|
-
color: #FFFFFF;
|
|
1101
1161
|
}
|
|
1102
1162
|
.transparent-btn::before {
|
|
1103
1163
|
background-color: transparent !important;
|
|
1104
1164
|
opacity: 0 !important;
|
|
1105
1165
|
}
|
|
1106
1166
|
|
|
1107
|
-
.call-btn{
|
|
1108
|
-
margin-top:160px;
|
|
1109
|
-
}
|
|
1110
|
-
.call-img{
|
|
1111
|
-
width:100px;
|
|
1112
|
-
height:100px;
|
|
1113
|
-
border-radius: 50%;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
.call-label{
|
|
1118
|
-
font-size: 16px;
|
|
1119
|
-
color: #FFFFFF
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
.cancel-btn{
|
|
1123
|
-
opacity: 1;
|
|
1124
|
-
background: transparent !important;
|
|
1125
|
-
box-shadow: none !important;
|
|
1126
|
-
position: relative !important;
|
|
1127
|
-
margin-top: -50px !important;
|
|
1128
|
-
}
|
|
1129
|
-
.cancel-img {
|
|
1130
|
-
width: 80px;
|
|
1131
|
-
height: 80px;
|
|
1132
|
-
}
|
|
1133
|
-
.cancel-label{
|
|
1134
|
-
top: 78px;
|
|
1135
|
-
position: absolute; color: #FFFFFF;
|
|
1136
|
-
font-size: 16px;
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
.call-duration{
|
|
1141
|
-
font-size: 14px;margin-top: -12.5px; color: #FFFFFF;
|
|
1142
|
-
}
|
|
1143
|
-
.hangup-img{
|
|
1144
|
-
width: 80px;
|
|
1145
|
-
height: 80px;
|
|
1146
|
-
}
|
|
1147
|
-
.hangup-label{
|
|
1148
|
-
top: 73px;
|
|
1149
|
-
position: absolute; color: #FFFFFF;
|
|
1150
|
-
font-size: 14px;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
.img-open-close{
|
|
1154
|
-
width: 55px;
|
|
1155
|
-
height: 80px;
|
|
1156
|
-
}
|
|
1157
|
-
.mb-10 {
|
|
1158
|
-
margin-bottom: 80px;
|
|
1159
|
-
z-index: 1000;
|
|
1160
|
-
}
|
|
1161
1167
|
</style>
|