Embedding Streams
Embedding a websocket stream can be done through an iframe or using a GET request. You can even proxy it through another web engine because the embed URL will only start a stream after it gets the websocket library
http://xxx.xxx.xxx.xxx/[API KEY]/embed/[GROUP KEY]/[MONITOR ID]
You can add jQuery
with this method
http://xxx.xxx.xxx.xxx/[API KEY]/embed/[GROUP KEY]/[MONITOR ID]/jquery
It's good for :
-
Direct access from a browser tab.
-
In an iframe
-
On a page without jQuery
You can embed with jQuery like this
$.get('http://xxx.xxx.xxx.xxx/[API KEY]/embed/[GROUP KEY]/[MONITOR ID]',function(data){ $('body').append(data) })
You can use it in an iframe like this
<iframe src="http://xxx.xxx.xxx.xxx/[API KEY]/embed/[GROUP KEY]/[MONITOR ID]/jquery|fullscreen"></iframe>
other available options are as follows. You must separate them with |
-
jquery : this addon adds jquery to the embed page. By default jquery is not loaded in case you have already loaded it where you are embedding the stream.
-
fullscreen : This adds CSS rules to fullscreen the stream element. This is good when embedding with an iframe.
-
gui : Extra CSS rules are added to display other information the Shinobi engine might have to provide.
You cannot use the URL like this
<img src="http://xxx.xxx.xxx.xxx/[API KEY]/embed/[GROUP KEY]/[MONITOR ID]">
Embedding on WordPress? You may need to set jQuery like this before the embed code for the feature to work
$=jQuery