|
@@ -110,6 +110,7 @@
|
|
|
console.warn("***webgl_rxdz_roam-options***", this.$route.query)
|
|
|
this.isIOS = !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
|
|
|
this.videoUrl = this.$route.query.videoUrl || '';
|
|
|
+ // this.videoUrl = this.$route.query.videoUrl || 'https://dm.static.elab-plus.com/miniProgram/002.mp4';
|
|
|
this.bgUrl = this.$route.query.bgUrl ||
|
|
|
'https://dm.static.elab-plus.com/miniProgram/tears_of_steel_bridge_2k.jpg';
|
|
|
this.coordinate = this.$route.query.coordinate || '';
|
|
@@ -217,7 +218,27 @@
|
|
|
}
|
|
|
starRender(); //启动渲染
|
|
|
if (that.isIOS) {
|
|
|
- document.addEventListener("WeixinJSBridgeReady", function() {
|
|
|
+ // document.addEventListener("WeixinJSBridgeReady", function() {
|
|
|
+ // if (that.type) {
|
|
|
+ // moreTest()
|
|
|
+ // } else {
|
|
|
+ // videoHandle({
|
|
|
+ // videoUrl: that.videoUrl,
|
|
|
+ // coordinate: that.coordinate,
|
|
|
+ // muted: that.muted
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }, false)
|
|
|
+ wx.config({
|
|
|
+ debug: false,
|
|
|
+ appId: '',
|
|
|
+ timestamp: '',
|
|
|
+ nonceStr: '',
|
|
|
+ signature: '',
|
|
|
+ jsApiList: []
|
|
|
+ })
|
|
|
+ wx.ready(function() {
|
|
|
+ // 在这里面进行操作即可,估计应该是微信的sdk对Safari的内核做了一些对应的操作吧
|
|
|
if (that.type) {
|
|
|
moreTest()
|
|
|
} else {
|
|
@@ -227,14 +248,13 @@
|
|
|
muted: that.muted
|
|
|
});
|
|
|
}
|
|
|
- }, false)
|
|
|
+ })
|
|
|
}
|
|
|
var guideMask = document.querySelector('#guide-mask');
|
|
|
document.addEventListener("touchend", function() {
|
|
|
guideMask.classList.add('guide-mask-hide');
|
|
|
if (!that.isIOS && that.hasOneTouch == false) {
|
|
|
that.hasOneTouch = true;
|
|
|
- // setTimeout(()=>{
|
|
|
if (that.type) {
|
|
|
moreTest()
|
|
|
} else {
|
|
@@ -244,7 +264,6 @@
|
|
|
muted: that.muted
|
|
|
});
|
|
|
}
|
|
|
- // },2000)
|
|
|
}
|
|
|
}, false);
|
|
|
}
|
|
@@ -375,11 +394,17 @@
|
|
|
return false;
|
|
|
}
|
|
|
// 创建视频元素
|
|
|
- var video = document.createElement('video');
|
|
|
+ // var video = document.createElement('video');
|
|
|
+ var video;
|
|
|
+ if(that.type){
|
|
|
+ video = document.createElement('video');
|
|
|
+ }else{
|
|
|
+ video = document.getElementById('myvideo');
|
|
|
+ }
|
|
|
video.src = item.videoUrl; // 视频文件的路径
|
|
|
video.setAttribute("crossOrigin", "Anonymous");
|
|
|
video.loop = true;
|
|
|
- video.muted = item.muted;
|
|
|
+ video.muted = that.type?item.muted:that.muted;
|
|
|
video.controls = false;
|
|
|
video.autoplay = true;
|
|
|
video.preload = 'auto';
|
|
@@ -636,6 +661,9 @@
|
|
|
clearHandle() {
|
|
|
this.clearEvent();
|
|
|
},
|
|
|
+ updateMuted(){
|
|
|
+ this.muted = !this.muted;
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|