iphone 中的 Ionic2 和 Aframe

Ionic2 and Aframe in iphone

我正在使用 Ionic2 和 Aframe 制作 VR 360 应用程序。这应该很容易,因为 Aframe 是您需要做的一切(您设置视频资产并从 videosphere 基元加载它)但我没有得到想要的结果。我遇到 Ios 的问题(在 Android 和浏览器中工作正常),当我 运行 我的 iphone 中的应用程序时,视频在 Iphone 中播放播放器而不是在我的应用程序中,因此我没有 360 效果。 我添加 playsinline 就像文档说的那样,我添加

<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>

我认为问题可能出在自动播放上,我已将其禁用,然后使用按钮触发 play,但结果相同。

知道我还能尝试什么吗?

谢谢。

难以置信,整个周末都在寻找答案,在我 post 我的问题之后我找到了它

我需要添加到我的 config.xml

这是对我有帮助的答案