Aframe: Add 360掳 video player template

Created on 14 Oct 2015  路  4Comments  路  Source: aframevr/aframe

Enables devs to create 360掳 video players.

Features should be in line with what we had in pre-refactor <vr-video> and <vr-video360> components, and with the HTML5 <video> spec.

Dev can specify:

  • Video source
  • Autoplay boolean
  • Looping boolean
  • Height
  • Width
  • Muted boolean
  • Controls boolean (shows or hides controls for playback)

Please add anything missing from the above. Looking at the <video> element spec, I'm not sure how important autobuffer, crossorigin, and poster are, for example.

While the image is loading, nothing is visible. Should look at adding preloaders and/or placeholders in the future.

Most helpful comment

Hi @cvan , I tried to add the controls attribute to video element which is used as the texture for a-videosphere, but it seems the video controls are not displayed? my code is as below:

<html>
<head>
  <title>My A-Frame Scene</title>
  <script src="node_modules/aframe/dist/aframe.min.js"></script>
</head>
<body>
<a-scene>
  <a-assets>
    <video id="antarctica" autoplay loop="true" controls src="video/MaryOculus.webm"/>
  </a-assets>

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

</a-scene>

</body>
</html>

Can you please advice where was wrong?

All 4 comments

Controls can be limited to a play/pause toggle initially. Longer term we can imagine adding:

  • Time indicator
  • Volume control

This is done.

Hi @cvan , I tried to add the controls attribute to video element which is used as the texture for a-videosphere, but it seems the video controls are not displayed? my code is as below:

<html>
<head>
  <title>My A-Frame Scene</title>
  <script src="node_modules/aframe/dist/aframe.min.js"></script>
</head>
<body>
<a-scene>
  <a-assets>
    <video id="antarctica" autoplay loop="true" controls src="video/MaryOculus.webm"/>
  </a-assets>

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

</a-scene>

</body>
</html>

Can you please advice where was wrong?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eng1neer picture eng1neer  路  6Comments

micahnut picture micahnut  路  5Comments

beyerz picture beyerz  路  3Comments

ngokevin picture ngokevin  路  5Comments

RangerMauve picture RangerMauve  路  4Comments