Skip to main content
New Participant
May 12, 2016

Oculus API

What is the API for Oculus Rift? That is to say, what protocol or language does it use to talk to the player? Is it HTML5? Is there are a method of using a Flash-based API?

    6 replies

    Inspiring
    May 13, 2016
    The core API is in C++. You can interface with C++ engines or frameworks directly (for example if you use OpenGL or DirectX). You may be able to create a DLL plugin for some alternate languages. 

    However, most developers will use either Unity or Unreal Engine, which come with native support for VR and the Oculus hardware. 

    HTML5 or Flash will be difficult because of security and sandbox restrictions that make it hard to execute native code or get low level access to hardware. I believe there are some VR branches for popular web browsers, and you may want to investigate this option.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Inspiring
    May 13, 2016
    The implementation is C++ but the API is written in C.  
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Inspiring
    May 13, 2016
    Hey @jherico , you're alive and correct.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    ngsvriftAuthor
    New Participant
    May 13, 2016
    Thanks guys, these responses alone are a big help. Unfortunately for this project we can't go through an engine and we're working with an RTMP stream, which is flash-based. We need to find a way to make it go from the web-based player (which is HTML5-based) to the headset.
    New Participant
    May 13, 2016
    Hello from Mozilla!  There are indeed VR enabled experimental browser builds.  You can use WebGL to render content into the Oculus, use three.js, or if you prefer something declarative, try out A-Frame (http://aframe.io).

    Links to builds are at http://webvr.info

    Some demos are up at http://mozvr.com

    There is a WebVR community on slack at https://webvr-slack.herokuapp.com

    I hope this helps!

    Zenbane
    Honored Contributor
    July 9, 2016
    I just found this video which is pretty great for an introduction:
    https://channel9.msdn.com/blogs/misslivirose/Building-the-VR-Web-with-A-Frame

    I used the basic concepts to set up a beginners VR site for myself here:
    http://mystrock.com/vr

    And now I'm looking to try out A-Frames ability to display 360-degree videos on a VR Headset with ease.