|
@@ -212,12 +212,20 @@
|
|
|
camera.lookAt(that.controlStarPosition.x, that.controlStarPosition.y, that.controlStarPosition.z);
|
|
|
starRender(); //启动渲染
|
|
|
// var guideMask = document.querySelector('#guide-mask');
|
|
|
- document.addEventListener("touchstart", ()=> {
|
|
|
- // guideMask.classList.add('guide-mask-hide');
|
|
|
- setTimeout(()=>{
|
|
|
- videoHandle();
|
|
|
- },200)
|
|
|
- }, false);
|
|
|
+
|
|
|
+ if(that.isIOS){
|
|
|
+ document.addEventListener("WeixinJSBridgeReady", function (){
|
|
|
+ videoHandle();
|
|
|
+ }, false)
|
|
|
+ }else{
|
|
|
+ document.addEventListener("touchstart", ()=> {
|
|
|
+ // guideMask.classList.add('guide-mask-hide');
|
|
|
+ setTimeout(()=>{
|
|
|
+ videoHandle();
|
|
|
+ },200)
|
|
|
+ }, false);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function videoHandle() {
|
|
@@ -225,11 +233,22 @@
|
|
|
return false
|
|
|
}
|
|
|
// 创建视频元素
|
|
|
- var video = document.createElement('video');
|
|
|
+ // var video = document.createElement('video');
|
|
|
+ var video = document.getElementById('myvideo');
|
|
|
video.src = that.videoUrl; // 视频文件的路径
|
|
|
video.setAttribute("crossOrigin", "Anonymous");
|
|
|
video.loop = true;
|
|
|
video.muted = true;
|
|
|
+ video.controls = true;
|
|
|
+ video.setAttribute('webkit-playsinline', true);
|
|
|
+ video.setAttribute('playsinline', true);
|
|
|
+ // video['custom-cache'] = false;
|
|
|
+ // video['x5-playsinline'] = '';
|
|
|
+ // video['webkit-playsinline'] = true;
|
|
|
+ // video['playsinline'] = true;
|
|
|
+ // video['x-webkit-airplay'] = '';
|
|
|
+ // // video['x5-video-player-fullscreen'] = false;
|
|
|
+ // video['x5-video-player-type'] = 'h5-page';
|
|
|
video.play();
|
|
|
|
|
|
console.warn("***video***",video,video.width);
|
|
@@ -452,6 +471,7 @@
|
|
|
// showCancelButton: true
|
|
|
// });
|
|
|
// window.open(shottingImg, "_blank");
|
|
|
+ window.location.href = shottingImg
|
|
|
},
|
|
|
navbarBackClk() {
|
|
|
|
|
@@ -467,6 +487,7 @@
|
|
|
// this.clientY = 0;
|
|
|
this.startX = e.changedTouches[0].clientX;
|
|
|
this.startY = e.changedTouches[0].clientY;
|
|
|
+ e.preventDefault();
|
|
|
},
|
|
|
mytouchmove(e) {
|
|
|
let startX = this.startX; // 开始x坐标
|
|
@@ -476,6 +497,7 @@
|
|
|
// this.clientX = touchMoveX - startX;
|
|
|
// this.clientY = touchMoveY - startY;
|
|
|
this.widthHandle(touchMoveX,1);
|
|
|
+ e.preventDefault();
|
|
|
},
|
|
|
mytouchend(e) {
|
|
|
|