@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhangxuejing123./sip-phone-sdk",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
package/public/index.html CHANGED
@@ -19,7 +19,6 @@
19
19
  height: { min: 640, max: 640 }
20
20
  },
21
21
  videoCodec: 'h264',
22
- isAPP:false,
23
22
  }
24
23
  </script>
25
24
  </head>
package/src/App.vue CHANGED
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-app style="background-color: rgba(5,29,63)" :class="isAPP ? 'my-APP' : ''">
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
- .sip-call-main {
951
- background-color: #737778;
952
- padding: 25% 20px 20% !important;
953
- width: 100vw;
954
- height: 100vh;
955
- overflow: hidden;
956
- }
957
-
958
- .sip-call-wrapper {
959
- position: absolute;
960
- left: 0;
961
- top: 0;
962
- width: 100vw;
963
- height: 100vh;
964
- z-index: 100;
965
- }
966
-
967
- .btn-group {
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: 80px;
978
- width: 640px;
983
+ bottom: 500px;
979
984
  z-index: 4000;
980
985
  }
981
- }
982
-
983
- .sip-call-video {
984
- width: 100%;
985
- height: 100%;
986
- object-fit: cover;
987
- background-color: #000000;
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
- white-space: nowrap;
1060
- text-overflow: ellipsis;
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
- .custom-mute-btn {
1066
- background: transparent !important;
1067
- box-shadow: none !important;
1068
- z-index: 9999 !important;
1069
- min-width: 0 !important;
1070
- width: auto !important;
1071
- height: auto !important;
1072
- padding: 0 !important;
1073
- margin: 0 !important;
1074
- }
1075
-
1076
- /* 移除按钮悬停和激活状态的背景色 */
1077
- .custom-mute-btn::before {
1078
- background-color: transparent !important;
1079
- opacity: 0 !important;
1080
- }
1081
-
1082
- /* 移除按钮的点击效果 */
1083
- .custom-mute-btn:hover::before,
1084
- .custom-mute-btn:focus::before,
1085
- .custom-mute-btn:active::before {
1086
- opacity: 0 !important;
1087
- }
1088
-
1089
- .transparent-btn {
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
- min-width: 0 !important;
1093
- width: auto !important;
1094
- height: auto !important;
1095
- padding: 0 !important;
1096
- margin: 0 !important;
1097
- opacity: .6 !important;
1098
- position: absolute !important;
1099
- left: calc(50% + 160px) !important;
1100
- }
1101
- .transparent-btn::before {
1102
- background-color: transparent !important;
1103
- opacity: 0 !important;
1104
- }
1105
-
1106
- .call-btn{
1107
- margin-top:320px;
1108
- }
1109
- .call-img{
1110
- width:200px;
1111
- height:200px;
1112
- border-radius: 50%;
1113
- }
1114
-
1115
-
1116
- .call-label{
1117
- font-size: 32px;
1118
- color: #FFFFFF
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
- background: transparent !important;
1296
- box-shadow: none !important;
1297
- min-width: 0 !important;
1298
- width: auto !important;
1299
- height: auto !important;
1300
- padding: 0 !important;
1301
- margin: 0 !important;
1302
- opacity: .6 !important;
1303
- position: absolute !important;
1304
- left: calc(50% + 80px) !important;
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;
@@ -4666,7 +4666,8 @@ html.overflow-y-hidden {
4666
4666
  }
4667
4667
 
4668
4668
  .v-application .mb-10 {
4669
- margin-bottom: 40px !important;
4669
+ margin-bottom: 160px !important;
4670
+ z-index: 1000 !important;
4670
4671
  }
4671
4672
 
4672
4673
  .v-application .mb-11 {