Class Apideo
public
class
Apideo
Function Details
function connect
public static
ApideoConnection
connect(string
key)
key
- Your Apideo key. function onError
public
void
onError(Object
callback)
The event handler will catch any error that has not been catched by more specialized event handlers (for instance, by room error event handlers, camera error event handlers or viewers error event handlers).
For more specialized error event handlers, please see ApideoRoom.onError, ApideoCamera.onError and ApideoViewer.onError functions.
Please note that if there is no default event handler, Apideo will provide a default one: a simple alert box will be displayed. As soon as you define one event handler, the default event handler is discarded.
Example usage:
Apideo.onError(function(category, type, msg) {
... your code goes here ...
});
The parameters passed to the callback function are:
- category {string} - The category of the error.
- type {string} - The technical type of the error.
- msg {string} - The message of the error.
The most important parameter is the category. It can be one of:
- connect - An error occured while connecting to the room.
- disconnect - An connection error occured: the room has been disconnected.
- error - An internal error occured.
- server - An error occured on the server-side.
- camera - An error occured with a camera started in this room. This kind of error is thrown only if no event handler is attached to the camera.
- viewer - An error occured with a stream viewed in this room. This kind of error is thrown only if no event handler is attached to the stream played.
callback
function unregisterOnError
public
void
unregisterOnError(Object
callback)
callback


