<a-video>
Note: This documentation is for the old 0.2.0 version of A-Frame. Check out the documentation for the current 1.6.0 version
The video primitive displays a video on a flat plane as a texture. It is an entity that prescribes the geometry with its geometric primitive set to plane
.
Example
<a-scene> |
Attributes
Note that the video primitive inherits common mesh attributes.
Attribute | Component Mapping | Default Value |
---|---|---|
height | geometry.height | 1.75 |
width | geometry.width | 3 |
Caveats
iOS has a lot of restrictions on playing videos in the browser. To play an inline video texture, we must:
- Set the
<meta name="apple-mobile-web-app-capable" content="yes">
meta tag (will be injected if missing). - Set the
webkit-playsinline
attribute to the video element. - Pin the webpage to the iOS homescreen.