|
@@ -321,10 +321,6 @@
|
|
|
<script type="text/javascript" src="rtcEngine.min.js"></script>
|
|
|
<script
|
|
|
type="text/javascript"
|
|
|
- src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"
|
|
|
- ></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"
|
|
|
></script>
|
|
|
<script type="text/javascript">
|
|
@@ -427,12 +423,20 @@
|
|
|
}, delay);
|
|
|
};
|
|
|
}
|
|
|
-
|
|
|
+ // 判断是否是苹果手机
|
|
|
+ let isiPhone = /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent);
|
|
|
+ // 判断是否支持webRTC
|
|
|
let isVideo = !!(
|
|
|
typeof RTCPeerConnection !== 'undefined' &&
|
|
|
typeof RTCIceCandidate !== 'undefined' &&
|
|
|
typeof RTCSessionDescription !== 'undefined'
|
|
|
);
|
|
|
+ // 判断是否是uc浏览器
|
|
|
+ let isUc = navigator.userAgent.indexOf('UCBrowser') > -1;
|
|
|
+ // 判断是否是QQ浏览器
|
|
|
+ let isQQ = navigator.userAgent.indexOf('MQQBrowser') > -1;
|
|
|
+ // 如果是苹果手机、且是uc浏览器或者是QQ浏览器,就不显示webRTC
|
|
|
+ let isShowiPhoneWebRTC = isiPhone && (isUc || isQQ)
|
|
|
let engine = null;
|
|
|
let connectData = null;
|
|
|
let debounceSwitchingScreens = debounce(
|
|
@@ -453,7 +457,7 @@
|
|
|
);
|
|
|
window.addEventListener('message', function (e) {
|
|
|
let data = e.data;
|
|
|
- if (data.bool && isVideo && !$('#playCanvas').is(':visible')) {
|
|
|
+ if (data.bool && isVideo && !$('#playCanvas').is(':visible') && !isShowiPhoneWebRTC) {
|
|
|
document.getElementById('playVideo').play();
|
|
|
debounceSwitchingScreens();
|
|
|
}
|
|
@@ -1315,7 +1319,7 @@
|
|
|
}
|
|
|
let extranetIp, extranetPort;
|
|
|
function doConnectBusiness(res) {
|
|
|
- if (isVideo) {
|
|
|
+ if (isVideo && !isShowiPhoneWebRTC) {
|
|
|
var url0 = url[0]; //协议
|
|
|
let ip = res.data.internetIp; //服务器拿到的ip
|
|
|
let port = res.data.internetVideoPort; //服务器拿到的端口
|
|
@@ -1969,9 +1973,12 @@
|
|
|
// uni.webView.navigateBack({
|
|
|
// delta: 1,
|
|
|
// });
|
|
|
- parent.postMessage({
|
|
|
- type: 'exit'
|
|
|
- }, '*')
|
|
|
+ parent.postMessage(
|
|
|
+ {
|
|
|
+ type: 'exit',
|
|
|
+ },
|
|
|
+ '*',
|
|
|
+ );
|
|
|
}
|
|
|
}
|
|
|
|