@zhangxuejing123./sip-phone-sdk 0.0.3 → 0.0.5
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 +97 -94
- package/dist/sip-phone-sdk.css +1 -1
- package/dist/sip-phone-sdk.umd.js +97 -94
- package/dist/sip-phone-sdk.umd.min.js +5 -5
- package/package.json +1 -1
- package/src/components/MobilePhone.vue +194 -209
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- 主模板:视频通话界面 -->
|
|
2
2
|
<template >
|
|
3
3
|
<!-- 主容器:使用flex垂直布局,内容居中对齐 -->
|
|
4
|
-
<div :class="isAPP ? 'my-APP' : ''" class="d-flex flex-column align-center justify-space-between sip-call-main">
|
|
4
|
+
<div :class="isAPP ? 'my-APP' : 'my-H5'" class="d-flex flex-column align-center justify-space-between sip-call-main">
|
|
5
5
|
<!-- 位置信息显示区域 -->
|
|
6
6
|
<div class="location-wrapper" v-if="showLocation">
|
|
7
7
|
<!-- 显示经纬度和海拔信息 -->
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<p class="mt-6 mb-0 call-label" >{{callPrompt}}</p>
|
|
18
18
|
</div>
|
|
19
19
|
<!-- 功能按钮区域 -->
|
|
20
|
-
<div class="pr-10 pl-10 btn-group" v-if="!miniMode && !showDialPad">
|
|
20
|
+
<div class="pr-10 pl-10 sip-btn-group" v-if="!miniMode && !showDialPad">
|
|
21
21
|
<v-row>
|
|
22
22
|
<v-col cols="12" class="text-center">
|
|
23
23
|
<!-- 通话计时器 -->
|
|
@@ -299,13 +299,13 @@ export default {
|
|
|
299
299
|
},
|
|
300
300
|
|
|
301
301
|
watch: {
|
|
302
|
-
isCalling (is) {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
},
|
|
302
|
+
// isCalling (is) {
|
|
303
|
+
// if (is) {
|
|
304
|
+
// this.startDurationCount()
|
|
305
|
+
// } else {
|
|
306
|
+
// this.stopDurationCount()
|
|
307
|
+
// }
|
|
308
|
+
// },
|
|
309
309
|
callId (id) {
|
|
310
310
|
this.lastCallId = id || this.lastCallId
|
|
311
311
|
},
|
|
@@ -736,6 +736,7 @@ export default {
|
|
|
736
736
|
// 处理通话失败事件
|
|
737
737
|
this.sipMix.on('failed', (e) => {
|
|
738
738
|
console.warn('通话失败', e)
|
|
739
|
+
this.stopDurationCount();// 停止计算视频时长
|
|
739
740
|
this.dealCallEndOrFail() // 清理通话相关状态
|
|
740
741
|
this.callPrompt = this.$t('cancelled') // 显示通话已取消提示
|
|
741
742
|
|
|
@@ -755,6 +756,7 @@ export default {
|
|
|
755
756
|
// 处理通话结束事件(对方挂断或通话正常结束)
|
|
756
757
|
this.sipMix.on('ended', () => {
|
|
757
758
|
console.warn('通话结束')
|
|
759
|
+
this.stopDurationCount();// 停止计算视频时长
|
|
758
760
|
this.dealCallEndOrFail() // 清理通话相关状态
|
|
759
761
|
this.callPrompt = this.$t('hangedUp') // 显示通话已挂断提示
|
|
760
762
|
|
|
@@ -842,6 +844,7 @@ export default {
|
|
|
842
844
|
})
|
|
843
845
|
|
|
844
846
|
this.sipMix.on('confirmed', () => {
|
|
847
|
+
this.startDurationCount(); // 开始计算视频时长
|
|
845
848
|
this.startSendPosition()
|
|
846
849
|
})
|
|
847
850
|
|
|
@@ -961,215 +964,197 @@ export default {
|
|
|
961
964
|
@import './vuetify.css';
|
|
962
965
|
</style> -->
|
|
963
966
|
<style lang="scss">
|
|
964
|
-
.
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
.sip-call-wrapper {
|
|
973
|
-
position: absolute;
|
|
974
|
-
left: 0;
|
|
975
|
-
top: 0;
|
|
976
|
-
width: 100vw;
|
|
977
|
-
height: 100vh;
|
|
978
|
-
z-index: 100;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
.btn-group {
|
|
982
|
-
width: 100%;
|
|
983
|
-
position: absolute;
|
|
984
|
-
bottom: 500px;
|
|
985
|
-
z-index: 4000;
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
@media screen and (min-width: 1024px) {
|
|
989
|
-
.btn-group {
|
|
967
|
+
.my-H5 {
|
|
968
|
+
.sip-call-main {
|
|
969
|
+
background-color: #737778;
|
|
970
|
+
padding: 25% 20px 20% !important;
|
|
971
|
+
width: 100vw;
|
|
972
|
+
height: 100vh;
|
|
973
|
+
overflow: hidden;
|
|
974
|
+
}
|
|
975
|
+
.sip-call-wrapper {
|
|
990
976
|
position: absolute;
|
|
991
|
-
|
|
992
|
-
|
|
977
|
+
left: 0;
|
|
978
|
+
top: 0;
|
|
979
|
+
width: 100vw;
|
|
980
|
+
height: 100vh;
|
|
981
|
+
z-index: 100;
|
|
982
|
+
}
|
|
983
|
+
.sip-btn-group {
|
|
984
|
+
width: 100%;
|
|
985
|
+
position: absolute;
|
|
986
|
+
bottom: 500px;
|
|
993
987
|
z-index: 4000;
|
|
994
988
|
}
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
.video-panel {
|
|
1005
|
-
position: absolute;
|
|
1006
|
-
display: flex;
|
|
1007
|
-
flex-direction: column;
|
|
1008
|
-
justify-content: space-around;
|
|
1009
|
-
align-items: center;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
.video-timer {
|
|
1013
|
-
background-color: rgba(255,255,255,0.80);
|
|
1014
|
-
position: absolute;
|
|
1015
|
-
top: 80px;
|
|
1016
|
-
left: 32px;
|
|
1017
|
-
font-size: 28px;
|
|
1018
|
-
font-weight: bold;
|
|
1019
|
-
padding: 4px 16px 4px 12px;
|
|
1020
|
-
border-radius: 24px;
|
|
1021
|
-
z-index: 2000;
|
|
1022
|
-
display: flex;
|
|
1023
|
-
justify-content: space-around;
|
|
1024
|
-
align-items: center;
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
.video-switch-btn {
|
|
1028
|
-
position: absolute !important;
|
|
1029
|
-
top: 80px;
|
|
1030
|
-
right: 160px;
|
|
1031
|
-
z-index: 2000;
|
|
1032
|
-
img {
|
|
1033
|
-
background-color: #000000;
|
|
1034
|
-
border-radius: 12px;
|
|
1035
|
-
border: 2px solid #000000;
|
|
989
|
+
@media screen and (min-width: 1024px) {
|
|
990
|
+
.sip-btn-group {
|
|
991
|
+
position: absolute;
|
|
992
|
+
bottom: 80px;
|
|
993
|
+
width: 640px;
|
|
994
|
+
z-index: 4000;
|
|
995
|
+
}
|
|
1036
996
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
.video-mini-mode {
|
|
1040
|
-
position: absolute !important;
|
|
1041
|
-
top: 80px;
|
|
1042
|
-
right: 96px;
|
|
1043
|
-
z-index: 2000;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
.camera-switch-btn {
|
|
1047
|
-
position: absolute !important;
|
|
1048
|
-
top: 80px;
|
|
1049
|
-
right: 32px;
|
|
1050
|
-
z-index: 2000;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
.video-normal-mode {
|
|
1054
|
-
position: absolute !important;
|
|
1055
|
-
top: 32px;
|
|
1056
|
-
right: 32px;
|
|
1057
|
-
z-index: 2000;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
.location-wrapper {
|
|
1061
|
-
position: absolute;
|
|
1062
|
-
top: 0;
|
|
1063
|
-
right: 0;
|
|
1064
|
-
width: 300px;
|
|
1065
|
-
background-color: #00000055;
|
|
1066
|
-
color: #FFFFFF;
|
|
1067
|
-
padding: 12px;
|
|
1068
|
-
p {
|
|
1069
|
-
font-size: 24px;
|
|
1070
|
-
margin: 0;
|
|
1071
|
-
padding: 0;
|
|
997
|
+
.sip-call-video {
|
|
1072
998
|
width: 100%;
|
|
1073
|
-
|
|
1074
|
-
|
|
999
|
+
height: 100%;
|
|
1000
|
+
object-fit: cover;
|
|
1001
|
+
background-color: #000000;
|
|
1002
|
+
}
|
|
1003
|
+
.video-panel {
|
|
1004
|
+
position: absolute;
|
|
1005
|
+
display: flex;
|
|
1006
|
+
flex-direction: column;
|
|
1007
|
+
justify-content: space-around;
|
|
1008
|
+
align-items: center;
|
|
1009
|
+
}
|
|
1010
|
+
.video-timer {
|
|
1011
|
+
background-color: rgba(255,255,255,0.80);
|
|
1012
|
+
position: absolute;
|
|
1013
|
+
top: 80px;
|
|
1014
|
+
left: 32px;
|
|
1015
|
+
font-size: 28px;
|
|
1016
|
+
font-weight: bold;
|
|
1017
|
+
padding: 4px 16px 4px 12px;
|
|
1018
|
+
border-radius: 24px;
|
|
1019
|
+
z-index: 2000;
|
|
1020
|
+
display: flex;
|
|
1021
|
+
justify-content: space-around;
|
|
1022
|
+
align-items: center;
|
|
1023
|
+
}
|
|
1024
|
+
.video-switch-btn {
|
|
1025
|
+
position: absolute !important;
|
|
1026
|
+
top: 80px;
|
|
1027
|
+
right: 160px;
|
|
1028
|
+
z-index: 2000;
|
|
1029
|
+
img {
|
|
1030
|
+
background-color: #000000;
|
|
1031
|
+
border-radius: 12px;
|
|
1032
|
+
border: 2px solid #000000;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
.video-mini-mode {
|
|
1036
|
+
position: absolute !important;
|
|
1037
|
+
top: 80px;
|
|
1038
|
+
right: 96px;
|
|
1039
|
+
z-index: 2000;
|
|
1040
|
+
}
|
|
1041
|
+
.camera-switch-btn {
|
|
1042
|
+
position: absolute !important;
|
|
1043
|
+
top: 80px;
|
|
1044
|
+
right: 32px;
|
|
1045
|
+
z-index: 2000;
|
|
1046
|
+
}
|
|
1047
|
+
.video-normal-mode {
|
|
1048
|
+
position: absolute !important;
|
|
1049
|
+
top: 32px;
|
|
1050
|
+
right: 32px;
|
|
1051
|
+
z-index: 2000;
|
|
1052
|
+
}
|
|
1053
|
+
.location-wrapper {
|
|
1054
|
+
position: absolute;
|
|
1055
|
+
top: 0;
|
|
1056
|
+
right: 0;
|
|
1057
|
+
width: 300px;
|
|
1058
|
+
background-color: #00000055;
|
|
1059
|
+
color: #FFFFFF;
|
|
1060
|
+
padding: 12px;
|
|
1061
|
+
p {
|
|
1062
|
+
font-size: 24px;
|
|
1063
|
+
margin: 0;
|
|
1064
|
+
padding: 0;
|
|
1065
|
+
width: 100%;
|
|
1066
|
+
white-space: nowrap;
|
|
1067
|
+
text-overflow: ellipsis;
|
|
1068
|
+
}
|
|
1075
1069
|
}
|
|
1076
1070
|
}
|
|
1077
1071
|
</style>
|
|
1078
|
-
<style scoped>
|
|
1079
|
-
.
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
/* 移除按钮悬停和激活状态的背景色 */
|
|
1091
|
-
.custom-mute-btn::before {
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
.custom-mute-btn:
|
|
1098
|
-
.custom-mute-btn:
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1072
|
+
<style scoped lang="scss">
|
|
1073
|
+
.my-H5 {
|
|
1074
|
+
.custom-mute-btn {
|
|
1075
|
+
background: transparent !important;
|
|
1076
|
+
box-shadow: none !important;
|
|
1077
|
+
z-index: 9999 !important;
|
|
1078
|
+
min-width: 0 !important;
|
|
1079
|
+
width: auto !important;
|
|
1080
|
+
height: auto !important;
|
|
1081
|
+
padding: 0 !important;
|
|
1082
|
+
margin: 0 !important;
|
|
1083
|
+
}
|
|
1084
|
+
/* 移除按钮悬停和激活状态的背景色 */
|
|
1085
|
+
.custom-mute-btn::before {
|
|
1086
|
+
background-color: transparent !important;
|
|
1087
|
+
opacity: 0 !important;
|
|
1088
|
+
}
|
|
1089
|
+
/* 移除按钮的点击效果 */
|
|
1090
|
+
.custom-mute-btn:hover::before,
|
|
1091
|
+
.custom-mute-btn:focus::before,
|
|
1092
|
+
.custom-mute-btn:active::before {
|
|
1093
|
+
opacity: 0 !important;
|
|
1094
|
+
}
|
|
1095
|
+
.transparent-btn {
|
|
1096
|
+
background: transparent !important;
|
|
1097
|
+
box-shadow: none !important;
|
|
1098
|
+
min-width: 0 !important;
|
|
1099
|
+
width: auto !important;
|
|
1100
|
+
height: auto !important;
|
|
1101
|
+
padding: 0 !important;
|
|
1102
|
+
margin: 0 !important;
|
|
1103
|
+
opacity: .6 !important;
|
|
1104
|
+
position: absolute !important;
|
|
1105
|
+
left: calc(50% + 160px) !important;
|
|
1106
|
+
color: #FFFFFF;
|
|
1107
|
+
}
|
|
1108
|
+
.transparent-btn::before {
|
|
1109
|
+
background-color: transparent !important;
|
|
1110
|
+
opacity: 0 !important;
|
|
1111
|
+
}
|
|
1112
|
+
.call-btn{
|
|
1113
|
+
margin-top:320px;
|
|
1114
|
+
}
|
|
1115
|
+
.call-img{
|
|
1116
|
+
width:200px;
|
|
1117
|
+
height:200px;
|
|
1118
|
+
border-radius: 50%;
|
|
1119
|
+
}
|
|
1120
|
+
.call-label{
|
|
1121
|
+
font-size: 32px;
|
|
1122
|
+
color: #FFFFFF
|
|
1123
|
+
}
|
|
1124
|
+
.cancel-btn{
|
|
1125
|
+
opacity: 1;
|
|
1104
1126
|
background: transparent !important;
|
|
1105
|
-
box-shadow: none !important;
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
.
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
.cancel-btn{
|
|
1137
|
-
opacity: 1;
|
|
1138
|
-
background: transparent !important;
|
|
1139
|
-
box-shadow: none !important;
|
|
1140
|
-
position: relative !important;
|
|
1141
|
-
margin-top: -100px !important;
|
|
1142
|
-
}
|
|
1143
|
-
.cancel-img {
|
|
1144
|
-
width: 160px;
|
|
1145
|
-
height: 160px;
|
|
1146
|
-
}
|
|
1147
|
-
.cancel-label{
|
|
1148
|
-
top: 156px;
|
|
1149
|
-
position: absolute; color: #FFFFFF;
|
|
1150
|
-
font-size: 32px;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
.call-duration{
|
|
1155
|
-
font-size: 28px;margin-top: -25px; color: #FFFFFF;
|
|
1156
|
-
}
|
|
1157
|
-
.hangup-img{
|
|
1158
|
-
width: 160px;
|
|
1159
|
-
height: 160px;
|
|
1160
|
-
}
|
|
1161
|
-
.hangup-label{
|
|
1162
|
-
top: 146px;
|
|
1163
|
-
position: absolute; color: #FFFFFF;
|
|
1164
|
-
font-size: 28px;
|
|
1165
|
-
}
|
|
1166
|
-
|
|
1167
|
-
.img-open-close{
|
|
1168
|
-
width: 110px;
|
|
1169
|
-
height: 160px;
|
|
1127
|
+
box-shadow: none !important;
|
|
1128
|
+
position: relative !important;
|
|
1129
|
+
margin-top: -100px !important;
|
|
1130
|
+
}
|
|
1131
|
+
.cancel-img {
|
|
1132
|
+
width: 160px;
|
|
1133
|
+
height: 160px;
|
|
1134
|
+
}
|
|
1135
|
+
.cancel-label{
|
|
1136
|
+
top: 156px;
|
|
1137
|
+
position: absolute; color: #FFFFFF;
|
|
1138
|
+
font-size: 32px;
|
|
1139
|
+
}
|
|
1140
|
+
.call-duration{
|
|
1141
|
+
font-size: 28px;margin-top: -25px; color: #FFFFFF;
|
|
1142
|
+
}
|
|
1143
|
+
.hangup-img{
|
|
1144
|
+
width: 160px;
|
|
1145
|
+
height: 160px;
|
|
1146
|
+
}
|
|
1147
|
+
.hangup-label{
|
|
1148
|
+
top: 146px;
|
|
1149
|
+
position: absolute; color: #FFFFFF;
|
|
1150
|
+
font-size: 28px;
|
|
1151
|
+
}
|
|
1152
|
+
.img-open-close{
|
|
1153
|
+
width: 110px;
|
|
1154
|
+
height: 160px;
|
|
1155
|
+
}
|
|
1170
1156
|
}
|
|
1171
1157
|
</style>
|
|
1172
|
-
|
|
1173
1158
|
<style lang="scss">
|
|
1174
1159
|
.my-APP {
|
|
1175
1160
|
.sip-call-main {
|
|
@@ -1187,14 +1172,14 @@ export default {
|
|
|
1187
1172
|
height: 100vh;
|
|
1188
1173
|
z-index: 100;
|
|
1189
1174
|
}
|
|
1190
|
-
.btn-group {
|
|
1175
|
+
.sip-btn-group {
|
|
1191
1176
|
width: 100%;
|
|
1192
1177
|
position: absolute;
|
|
1193
1178
|
bottom: 250px;
|
|
1194
1179
|
z-index: 4000;
|
|
1195
1180
|
}
|
|
1196
1181
|
@media screen and (min-width: 1024px) {
|
|
1197
|
-
.btn-group {
|
|
1182
|
+
.sip-btn-group {
|
|
1198
1183
|
position: absolute;
|
|
1199
1184
|
bottom: 40px;
|
|
1200
1185
|
width: 320px;
|