Embeding a <room>

Below are instructions on how to embed your room into a webpage.

Embedding with HTML (static)?
Embeding with JS (dynamic)?

Embedding a <room> with HTML

First, make sure you have the cameratag.js and cameratag.css files included in the header of your site. The following <script> tag should appear at the bottom of your page's <head> tag

<script src='//www.cameratag.com/v14/js/cameratag.min.js' type='text/javascript'></script>
<link rel='stylesheet' href='//www.cameratag.com/static/14/CameraTag.css'>
Next, create a new <room> somehwere in your <body> like the one below.
<room id='[INSTANCE_ID]' data-app-id='[YOUR_APP_UUID]' data-room='[YOUR_ROOM_NAME]'></room>
You will need to replace the values denoted by brackets in the above example.

You will replace [YOUR_ROOM_NAME] with a room name of your choosing. This defines the room to enter when the user connects.

You will replace [YOUR_APP_UUID] with the UUID of the CameraTag App you would like to use with this <room>. This can be found under the name of your App on any of the App pages on CameraTag.com.

You will replace [INSTANCE_ID] with a unique id for that instance of the <room>. This will allow you specifically refernce that <room> on the page in case you decide to embed multiple rooms.

Please note:

  • Each room on a page MUST HAVE A UNIQUE INSTANCE ID however multiple rooms on a page may be attached to the same App UUID.

  • If you choose to enable signature level security for rooms in your app settings you will also need to include the data-signature and data-signature-expirtion attributes to your <room>

Dynamically adding a <room> to the DOM?

If you want to embed at a room after the page has loaded simply add the <room> element to the DOM as described above then call
CameraTag.setup();
This will rescan the DOM for any uninitialized <room> tags.