2017-01-23 76 views
0

我正在使用Ionic2和Aframe製作VR 360應用程序。這應該很容易,因爲Aframe是你需要做的一切(你設置了一個視頻資源並從視頻層原語中加載它),但我沒有得到期望的結果。我有Ios(在Android和瀏覽器中工作正常)的問題,當我在iPhone上運行應用程序時,視頻在Iphone播放器中播放,而不是在我的應用程序中播放,因此我沒有360效果。 我添加playsinline像文件說,我想補充iPhone中的Ionic2和Aframe

<meta name="apple-mobile-web-app-capable" content="yes"/> 

過,但不起作用。我用下面的代碼:

<a-scene> 

    <a-assets> 
    <video id="video" src="assets/img/video1.mp4" loop crossorigin playsinline></video> 
    <img id="cubes-thumb" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/thumb-cubes.jpg"> 
    <img id="cubes" crossorigin="anonymous" src="https://cdn.aframe.io/360-image-gallery-boilerplate/img/cubes.jpg"> 

    </a-assets> 

    <a-videosphere src="#video" rotation="0 180 0"></a-videosphere> 
    <a-image class="link" src="#cubes" position="0 0 -1"></a-image> 
    <!--<a-entity id="links" layout="type: line; margin: 1.5" position="0 -1 -4"> 
    <a-entity template="src: #cubes" data-src="#cubes" data-thumb="#cubes-thumb"></a-entity> 
    </a-entity>--> 

    <a-entity camera look-controls> 
    <a-cursor id="cursor" 
     animation__click="property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1 1 1; dur: 150" 
     animation__fusing="property: fusing; startEvents: fusing; from: 1 1 1; to: 0.1 0.1 0.1; dur: 1500" 
     event-set__1="_event: mouseenter; color: green" 
     event-set__2="_event: mouseleave; color: black" 
     raycaster="objects: .link" 
     material="color:black"> 
    </a-cursor> 
    </a-entity> 


</a-scene> 

我想這個問題可能是自動播放,我有禁用它,我觸發發揮一個按鈕,但我也有同樣的結果。

Anyidea我還能試試什麼?

謝謝。

回答