Orbiter Quick Start
To create connected content and applications with Orbiter, follow these steps.
Step 1: Add Orbiter to Your Web Page
For instructions on adding Orbiter to your web page, see Installing Hosted Orbiter.
Step 2: Connect to Union Server
After the <script> tag you added in Step 1, add the following code to your .html file.
<script type="text/javascript">
// Create Orbiter object
var orbiter = new net.user1.orbiter.Orbiter();
// Register for connection events
orbiter.addEventListener(net.user1.orbiter.OrbiterEvent.READY, readyListener, this);
orbiter.addEventListener(net.user1.orbiter.OrbiterEvent.CLOSE, closeListener, this);
// Connect to Union
orbiter.connect("tryunion.com", 80);
// Connection event listeners
function readyListener (e) {
alert("Orbiter connected to Union!");
}
function closeListener (e) {
alert("Orbiter connection closed.");
}
</script>
Step 3: Communicate with Union Server
Orbiter applications communicate with Union Server using the Orbiter API.
For example, the following code creates a room on Union Server, and then joins that room:
var chatRoom = orbiter.getRoomManager().createRoom("chatRoom");
chatRoom.join();
Step 4: Learn By Example
To see the steps in this quick start assembled into a fully functional example, see Orbiter examples.
Step 5: Get Support
If you have questions or need help, visit the Union Platform forums. Priority support is also available for Union Member licence holders.