videosphere原始容易添加一个360度的视频背景场景或显示一个360度的视频。是一个实体规定一个大球体与视频纹理映射到内部。      

例子

<a-scene>
  <a-assets>
    <video id="antarctica" autoplay loop="true" src="antarctica.mp4">
  </a-assets>

  <!-- Using the asset management system. -->
  <a-videosphere src="#antarctica"></a-videosphere>

  <!-- Defining the URL inline. Not recommended but more comfortable for web developers. -->
  <a-videosphere src="africa.mp4"></a-videosphere>
</a-scene>

属性

注意,videosphere原始网格属性继承常见 mesh attributes

属性 组件映射 默认值
autoplay <video>.autoplay true
crossOrigin <video>.crossOrigin anonymous
loop <video>.loop true
radius geometry.radius 5000
segments-height geometry.segmentsHeight 64
segments-width geometry.segmentsWidth 64

Equirectangular Video

为了是无缝的,应该equirectangular视频 equirectangular.

警告

iOS有很多限制在浏览器中播放视频。玩一个内联视频纹理,我们必须:

  • Set the meta tag (will be injected if missing).
  • Set the webkit-playsinline attribute to the video element.
  • Pin the webpage to the iOS homescreen.