Ambisonics Surround Audio for VR

Play and pan ambisonics audio tracks with VR Video

1st order Ambisonics audio for surround audio and panning with 360 video is possible through the browser's audio api.

Browsers firstly require to support multi channel audio so two channels ore more. IOS Safari does not support multi channel audio yet so this feature won't work with it yet and so requires an alternative source.

The Amibsonics channel order requires to be in ACN Channel Ordering. The default channel map is therefore 0,1,2,3 / W,Y,Z,X which can be reconfigured.

For FuMa Channel Ordering follows the order W,X,Y,Z therefore the channel map requires to be changed to 0, 3, 1, 2. Many Amibsonics authoring tools now follow this order.

More info Ambisonics.ch.

The clip is required to be identified with ambisonics support with the config property ambisonics

    
   <div class="flex w-full">
          <div id="ambisonics" class=""></div>
  </div>
  <script type="text/javascript">
  	var player = flowplayer("#ambisonics", {
    "clip": {
        "ambisonics": true,
        "sources": [
            {
                "src": "//videos.electroteque.org/360/ultra_light_flight_720p.webm",
                "type": "video/webm"
            },
            {
                "src": "//videos.electroteque.org/360/ultra_light_flight_720p.mp4",
                "type": "video/mp4"
            },
            {
                "src": "//videos.electroteque.org/360/ultra_light_flight_720p.ogv",
                "type": "video/ogg"
            }
        ]
    },
    "share": false,
    "vrvideo": {
        "ambisonicsOrder": 1
    }
});

player.on("xrsessionstart", function(e, session) {
console.log("XR Session Start: ", session);
}).on("xrsessionstop", function(e) {
console.log("XR Session Stop");
}).on("xrsupported", function(e) {
console.log("XR Device Supported");
}).on("xrnotsupported", function(e) {
console.log("XR Not Available");
}).on("xrdevicechange", function(e) {
console.log("XR Device Changed");
}).on("xrvisibilitychange", function(e, state) {
console.log("XR Device Visible State: ", state);
}).on("orientationrequest", function(e, permission) {
console.log("Orientation Permission Request: ", permission);
}).on("audioready", function(e) {
console.log("Audio Decoder Ready");
}).on("audioready", function(e, error) {
console.log("Audio Decoder Error ", error);
});
  </script>