@zhangxuejing123./sip-phone-sdk 0.0.2 → 0.0.4
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 +104 -87
- package/dist/sip-phone-sdk.css +1 -1
- package/dist/sip-phone-sdk.umd.js +104 -87
- package/dist/sip-phone-sdk.umd.min.js +5 -5
- package/package.json +1 -1
- package/public/index.html +0 -1
- package/src/App.vue +1 -4
- package/src/components/MobilePhone.vue +211 -213
- package/src/components/vuetify.css +2 -1
package/package.json
CHANGED
package/public/index.html
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-app style="background-color: rgba(5,29,63)"
|
|
2
|
+
<v-app style="background-color: rgba(5,29,63)" >
|
|
3
3
|
|
|
4
4
|
<!-- <button @click="onMakeCall">拨号</button> -->
|
|
5
5
|
<v-main>
|
|
@@ -34,7 +34,6 @@ export default {
|
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
data: () => ({
|
|
37
|
-
isAPP:false,
|
|
38
37
|
debug: false,
|
|
39
38
|
password: '',
|
|
40
39
|
calledNum: '',
|
|
@@ -77,8 +76,6 @@ export default {
|
|
|
77
76
|
},
|
|
78
77
|
|
|
79
78
|
mounted () {
|
|
80
|
-
this.isAPP = window.config.isAPP;
|
|
81
|
-
console.log("isAPP22",this.isAPP)
|
|
82
79
|
let {
|
|
83
80
|
calledNum = '0000021000021001',
|
|
84
81
|
//calledNum = '000001100002011001',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- 主模板:视频通话界面 -->
|
|
2
|
-
<template>
|
|
2
|
+
<template >
|
|
3
3
|
<!-- 主容器:使用flex垂直布局,内容居中对齐 -->
|
|
4
|
-
<div 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
|
<!-- 通话计时器 -->
|
|
@@ -240,6 +240,7 @@ export default {
|
|
|
240
240
|
|
|
241
241
|
data: function () {
|
|
242
242
|
return {
|
|
243
|
+
isAPP:false,
|
|
243
244
|
prompt: `${this.$t('serverConnecting')}...`,
|
|
244
245
|
callPrompt: this.$t('pleaseBePatient'),
|
|
245
246
|
|
|
@@ -915,10 +916,23 @@ export default {
|
|
|
915
916
|
|
|
916
917
|
stopSendPosition () {
|
|
917
918
|
clearTimeout(this.sendPositionHandler)
|
|
918
|
-
}
|
|
919
|
+
},
|
|
920
|
+
isAPPIF(){
|
|
921
|
+
if (/android/i.test(navigator.userAgent)) {
|
|
922
|
+
this.isAPP = true;
|
|
923
|
+
console.log("当前为Android App");
|
|
924
|
+
} else if (/iphone|ipad|ipod/i.test(navigator.userAgent)) {
|
|
925
|
+
console.log("当前为iOS App");
|
|
926
|
+
this.isAPP = true;
|
|
927
|
+
} else {
|
|
928
|
+
this.isAPP = false;
|
|
929
|
+
console.log("当前为H5页面");
|
|
930
|
+
}
|
|
931
|
+
},
|
|
919
932
|
},
|
|
920
933
|
|
|
921
934
|
async mounted() {
|
|
935
|
+
// this.isAPPIF()
|
|
922
936
|
console.info('MobilePhone mounted')
|
|
923
937
|
await this.checkBrowser().catch(e => {
|
|
924
938
|
this.showSnackbar = true
|
|
@@ -947,214 +961,197 @@ export default {
|
|
|
947
961
|
@import './vuetify.css';
|
|
948
962
|
</style> -->
|
|
949
963
|
<style lang="scss">
|
|
950
|
-
.
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
.sip-call-wrapper {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
width: 100%;
|
|
969
|
-
position: absolute;
|
|
970
|
-
bottom: 500px;
|
|
971
|
-
z-index: 4000;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
@media screen and (min-width: 1024px) {
|
|
975
|
-
.btn-group {
|
|
964
|
+
.my-H5 {
|
|
965
|
+
.sip-call-main {
|
|
966
|
+
background-color: #737778;
|
|
967
|
+
padding: 25% 20px 20% !important;
|
|
968
|
+
width: 100vw;
|
|
969
|
+
height: 100vh;
|
|
970
|
+
overflow: hidden;
|
|
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
|
+
.sip-btn-group {
|
|
981
|
+
width: 100%;
|
|
976
982
|
position: absolute;
|
|
977
|
-
bottom:
|
|
978
|
-
width: 640px;
|
|
983
|
+
bottom: 500px;
|
|
979
984
|
z-index: 4000;
|
|
980
985
|
}
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
.video-panel {
|
|
991
|
-
position: absolute;
|
|
992
|
-
display: flex;
|
|
993
|
-
flex-direction: column;
|
|
994
|
-
justify-content: space-around;
|
|
995
|
-
align-items: center;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
.video-timer {
|
|
999
|
-
background-color: rgba(255,255,255,0.80);
|
|
1000
|
-
position: absolute;
|
|
1001
|
-
top: 80px;
|
|
1002
|
-
left: 32px;
|
|
1003
|
-
font-size: 28px;
|
|
1004
|
-
font-weight: bold;
|
|
1005
|
-
padding: 4px 16px 4px 12px;
|
|
1006
|
-
border-radius: 24px;
|
|
1007
|
-
z-index: 2000;
|
|
1008
|
-
display: flex;
|
|
1009
|
-
justify-content: space-around;
|
|
1010
|
-
align-items: center;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
.video-switch-btn {
|
|
1014
|
-
position: absolute !important;
|
|
1015
|
-
top: 80px;
|
|
1016
|
-
right: 160px;
|
|
1017
|
-
z-index: 2000;
|
|
1018
|
-
img {
|
|
1019
|
-
background-color: #000000;
|
|
1020
|
-
border-radius: 12px;
|
|
1021
|
-
border: 2px solid #000000;
|
|
986
|
+
@media screen and (min-width: 1024px) {
|
|
987
|
+
.sip-btn-group {
|
|
988
|
+
position: absolute;
|
|
989
|
+
bottom: 80px;
|
|
990
|
+
width: 640px;
|
|
991
|
+
z-index: 4000;
|
|
992
|
+
}
|
|
1022
993
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
.video-mini-mode {
|
|
1026
|
-
position: absolute !important;
|
|
1027
|
-
top: 80px;
|
|
1028
|
-
right: 96px;
|
|
1029
|
-
z-index: 2000;
|
|
1030
|
-
}
|
|
1031
|
-
|
|
1032
|
-
.camera-switch-btn {
|
|
1033
|
-
position: absolute !important;
|
|
1034
|
-
top: 80px;
|
|
1035
|
-
right: 32px;
|
|
1036
|
-
z-index: 2000;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
.video-normal-mode {
|
|
1040
|
-
position: absolute !important;
|
|
1041
|
-
top: 32px;
|
|
1042
|
-
right: 32px;
|
|
1043
|
-
z-index: 2000;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
.location-wrapper {
|
|
1047
|
-
position: absolute;
|
|
1048
|
-
top: 0;
|
|
1049
|
-
right: 0;
|
|
1050
|
-
width: 300px;
|
|
1051
|
-
background-color: #00000055;
|
|
1052
|
-
color: #FFFFFF;
|
|
1053
|
-
padding: 12px;
|
|
1054
|
-
p {
|
|
1055
|
-
font-size: 24px;
|
|
1056
|
-
margin: 0;
|
|
1057
|
-
padding: 0;
|
|
994
|
+
.sip-call-video {
|
|
1058
995
|
width: 100%;
|
|
1059
|
-
|
|
1060
|
-
|
|
996
|
+
height: 100%;
|
|
997
|
+
object-fit: cover;
|
|
998
|
+
background-color: #000000;
|
|
999
|
+
}
|
|
1000
|
+
.video-panel {
|
|
1001
|
+
position: absolute;
|
|
1002
|
+
display: flex;
|
|
1003
|
+
flex-direction: column;
|
|
1004
|
+
justify-content: space-around;
|
|
1005
|
+
align-items: center;
|
|
1006
|
+
}
|
|
1007
|
+
.video-timer {
|
|
1008
|
+
background-color: rgba(255,255,255,0.80);
|
|
1009
|
+
position: absolute;
|
|
1010
|
+
top: 80px;
|
|
1011
|
+
left: 32px;
|
|
1012
|
+
font-size: 28px;
|
|
1013
|
+
font-weight: bold;
|
|
1014
|
+
padding: 4px 16px 4px 12px;
|
|
1015
|
+
border-radius: 24px;
|
|
1016
|
+
z-index: 2000;
|
|
1017
|
+
display: flex;
|
|
1018
|
+
justify-content: space-around;
|
|
1019
|
+
align-items: center;
|
|
1020
|
+
}
|
|
1021
|
+
.video-switch-btn {
|
|
1022
|
+
position: absolute !important;
|
|
1023
|
+
top: 80px;
|
|
1024
|
+
right: 160px;
|
|
1025
|
+
z-index: 2000;
|
|
1026
|
+
img {
|
|
1027
|
+
background-color: #000000;
|
|
1028
|
+
border-radius: 12px;
|
|
1029
|
+
border: 2px solid #000000;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
.video-mini-mode {
|
|
1033
|
+
position: absolute !important;
|
|
1034
|
+
top: 80px;
|
|
1035
|
+
right: 96px;
|
|
1036
|
+
z-index: 2000;
|
|
1037
|
+
}
|
|
1038
|
+
.camera-switch-btn {
|
|
1039
|
+
position: absolute !important;
|
|
1040
|
+
top: 80px;
|
|
1041
|
+
right: 32px;
|
|
1042
|
+
z-index: 2000;
|
|
1043
|
+
}
|
|
1044
|
+
.video-normal-mode {
|
|
1045
|
+
position: absolute !important;
|
|
1046
|
+
top: 32px;
|
|
1047
|
+
right: 32px;
|
|
1048
|
+
z-index: 2000;
|
|
1049
|
+
}
|
|
1050
|
+
.location-wrapper {
|
|
1051
|
+
position: absolute;
|
|
1052
|
+
top: 0;
|
|
1053
|
+
right: 0;
|
|
1054
|
+
width: 300px;
|
|
1055
|
+
background-color: #00000055;
|
|
1056
|
+
color: #FFFFFF;
|
|
1057
|
+
padding: 12px;
|
|
1058
|
+
p {
|
|
1059
|
+
font-size: 24px;
|
|
1060
|
+
margin: 0;
|
|
1061
|
+
padding: 0;
|
|
1062
|
+
width: 100%;
|
|
1063
|
+
white-space: nowrap;
|
|
1064
|
+
text-overflow: ellipsis;
|
|
1065
|
+
}
|
|
1061
1066
|
}
|
|
1062
1067
|
}
|
|
1063
1068
|
</style>
|
|
1064
|
-
<style scoped>
|
|
1065
|
-
.
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
/* 移除按钮悬停和激活状态的背景色 */
|
|
1077
|
-
.custom-mute-btn::before {
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
.custom-mute-btn:
|
|
1084
|
-
.custom-mute-btn:
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1069
|
+
<style scoped lang="scss">
|
|
1070
|
+
.my-H5 {
|
|
1071
|
+
.custom-mute-btn {
|
|
1072
|
+
background: transparent !important;
|
|
1073
|
+
box-shadow: none !important;
|
|
1074
|
+
z-index: 9999 !important;
|
|
1075
|
+
min-width: 0 !important;
|
|
1076
|
+
width: auto !important;
|
|
1077
|
+
height: auto !important;
|
|
1078
|
+
padding: 0 !important;
|
|
1079
|
+
margin: 0 !important;
|
|
1080
|
+
}
|
|
1081
|
+
/* 移除按钮悬停和激活状态的背景色 */
|
|
1082
|
+
.custom-mute-btn::before {
|
|
1083
|
+
background-color: transparent !important;
|
|
1084
|
+
opacity: 0 !important;
|
|
1085
|
+
}
|
|
1086
|
+
/* 移除按钮的点击效果 */
|
|
1087
|
+
.custom-mute-btn:hover::before,
|
|
1088
|
+
.custom-mute-btn:focus::before,
|
|
1089
|
+
.custom-mute-btn:active::before {
|
|
1090
|
+
opacity: 0 !important;
|
|
1091
|
+
}
|
|
1092
|
+
.transparent-btn {
|
|
1093
|
+
background: transparent !important;
|
|
1094
|
+
box-shadow: none !important;
|
|
1095
|
+
min-width: 0 !important;
|
|
1096
|
+
width: auto !important;
|
|
1097
|
+
height: auto !important;
|
|
1098
|
+
padding: 0 !important;
|
|
1099
|
+
margin: 0 !important;
|
|
1100
|
+
opacity: .6 !important;
|
|
1101
|
+
position: absolute !important;
|
|
1102
|
+
left: calc(50% + 160px) !important;
|
|
1103
|
+
color: #FFFFFF;
|
|
1104
|
+
}
|
|
1105
|
+
.transparent-btn::before {
|
|
1106
|
+
background-color: transparent !important;
|
|
1107
|
+
opacity: 0 !important;
|
|
1108
|
+
}
|
|
1109
|
+
.call-btn{
|
|
1110
|
+
margin-top:320px;
|
|
1111
|
+
}
|
|
1112
|
+
.call-img{
|
|
1113
|
+
width:200px;
|
|
1114
|
+
height:200px;
|
|
1115
|
+
border-radius: 50%;
|
|
1116
|
+
}
|
|
1117
|
+
.call-label{
|
|
1118
|
+
font-size: 32px;
|
|
1119
|
+
color: #FFFFFF
|
|
1120
|
+
}
|
|
1121
|
+
.cancel-btn{
|
|
1122
|
+
opacity: 1;
|
|
1090
1123
|
background: transparent !important;
|
|
1091
|
-
box-shadow: none !important;
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
.
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
.cancel-btn{
|
|
1122
|
-
opacity: 1;
|
|
1123
|
-
background: transparent !important;
|
|
1124
|
-
box-shadow: none !important;
|
|
1125
|
-
position: relative !important;
|
|
1126
|
-
margin-top: -100px !important;
|
|
1127
|
-
}
|
|
1128
|
-
.cancel-img {
|
|
1129
|
-
width: 160px;
|
|
1130
|
-
height: 160px;
|
|
1131
|
-
}
|
|
1132
|
-
.cancel-label{
|
|
1133
|
-
top: 156px;
|
|
1134
|
-
position: absolute; color: #FFFFFF;
|
|
1135
|
-
font-size: 32px;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
.call-duration{
|
|
1140
|
-
font-size: 28px;margin-top: -25px; color: #FFFFFF;
|
|
1141
|
-
}
|
|
1142
|
-
.hangup-img{
|
|
1143
|
-
width: 160px;
|
|
1144
|
-
height: 160px;
|
|
1145
|
-
}
|
|
1146
|
-
.hangup-label{
|
|
1147
|
-
top: 146px;
|
|
1148
|
-
position: absolute; color: #FFFFFF;
|
|
1149
|
-
font-size: 28px;
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
.img-open-close{
|
|
1153
|
-
width: 110px;
|
|
1154
|
-
height: 160px;
|
|
1124
|
+
box-shadow: none !important;
|
|
1125
|
+
position: relative !important;
|
|
1126
|
+
margin-top: -100px !important;
|
|
1127
|
+
}
|
|
1128
|
+
.cancel-img {
|
|
1129
|
+
width: 160px;
|
|
1130
|
+
height: 160px;
|
|
1131
|
+
}
|
|
1132
|
+
.cancel-label{
|
|
1133
|
+
top: 156px;
|
|
1134
|
+
position: absolute; color: #FFFFFF;
|
|
1135
|
+
font-size: 32px;
|
|
1136
|
+
}
|
|
1137
|
+
.call-duration{
|
|
1138
|
+
font-size: 28px;margin-top: -25px; color: #FFFFFF;
|
|
1139
|
+
}
|
|
1140
|
+
.hangup-img{
|
|
1141
|
+
width: 160px;
|
|
1142
|
+
height: 160px;
|
|
1143
|
+
}
|
|
1144
|
+
.hangup-label{
|
|
1145
|
+
top: 146px;
|
|
1146
|
+
position: absolute; color: #FFFFFF;
|
|
1147
|
+
font-size: 28px;
|
|
1148
|
+
}
|
|
1149
|
+
.img-open-close{
|
|
1150
|
+
width: 110px;
|
|
1151
|
+
height: 160px;
|
|
1152
|
+
}
|
|
1155
1153
|
}
|
|
1156
1154
|
</style>
|
|
1157
|
-
|
|
1158
1155
|
<style lang="scss">
|
|
1159
1156
|
.my-APP {
|
|
1160
1157
|
.sip-call-main {
|
|
@@ -1172,14 +1169,14 @@ export default {
|
|
|
1172
1169
|
height: 100vh;
|
|
1173
1170
|
z-index: 100;
|
|
1174
1171
|
}
|
|
1175
|
-
.btn-group {
|
|
1172
|
+
.sip-btn-group {
|
|
1176
1173
|
width: 100%;
|
|
1177
1174
|
position: absolute;
|
|
1178
1175
|
bottom: 250px;
|
|
1179
1176
|
z-index: 4000;
|
|
1180
1177
|
}
|
|
1181
1178
|
@media screen and (min-width: 1024px) {
|
|
1182
|
-
.btn-group {
|
|
1179
|
+
.sip-btn-group {
|
|
1183
1180
|
position: absolute;
|
|
1184
1181
|
bottom: 40px;
|
|
1185
1182
|
width: 320px;
|
|
@@ -1292,16 +1289,17 @@ export default {
|
|
|
1292
1289
|
}
|
|
1293
1290
|
|
|
1294
1291
|
.transparent-btn {
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1292
|
+
background: transparent !important;
|
|
1293
|
+
box-shadow: none !important;
|
|
1294
|
+
min-width: 0 !important;
|
|
1295
|
+
width: auto !important;
|
|
1296
|
+
height: auto !important;
|
|
1297
|
+
padding: 0 !important;
|
|
1298
|
+
margin: 0 !important;
|
|
1299
|
+
opacity: .6 !important;
|
|
1300
|
+
position: absolute !important;
|
|
1301
|
+
left: calc(50% + 160px) !important;
|
|
1302
|
+
color: #FFFFFF;
|
|
1305
1303
|
}
|
|
1306
1304
|
.transparent-btn::before {
|
|
1307
1305
|
background-color: transparent !important;
|