Overview

Implementation of A-Frame 360 VR into AMP.

AMP uses Aframe https://aframe.io/ WebVR Framework as the main VR mechanism. This AMP plug-in allows the following video formats

  • video/mp4

  • application/x-mpegURL (HLS)

  • application/dash+xml (Dash)

  • video/webm

VR experience is limited to the following devices and browsers. Please check here for more information https://webvr.rocks/

The plugin can be implemented by providing a aframe object in the player config:

var config = {
	autoplay: "muted",
	plugins: {
		aframe: {
			resources: [
				{ src: "//aframe.io/releases/1.6.0/aframe.min.js", debug: "//aframe.io/releases/1.6.0/aframe.min.js", type: "text/javascript", async: true },
				{ src: "${paths.plugins}aframe/Aframe.min.js", debug: "${paths.plugins}aframe/Aframe.js", type: "text/javascript", async: true },
				{ src: "${paths.plugins}aframe/Aframe.min.css", debug: "${paths.plugins}aframe/Aframe.css", type: "text/css", async: true }
				],
			rotation: "0 270 0",
			vrmode: true
			}
   		}
};
akamai.amp.AMP.create("amp", config);