Class ApideoViewer
public
class
ApideoViewer
Function Details
function hideDelay
public
void
hideDelay()
function onError
public
void
onError(Object
callback)
Please note that if there is no event handler defined for the played stream, the error is forwarded to the room. As soon as you define one event handler, the error event will no more be forwarded.
Example usage:
viewer.onError(function(category, type, msg) {
... your code goes here ...
});
The scope of the function is the current viewer, so "this" in the function refers to the ApideoViewer object.
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.
- limit - You reached an Apideo limit. Most likely, you tried to change the logo and you do not have a pro-account or you provided buggy parameters...
callback
function onSecurityError
public
boolean
onSecurityError(Object
callback)
Access to a stream can be rejected if the token settings prevent access to the stream (see Token-based security).
Please note that if there is no security error event handler defined for the camera stream, the error is forwarded to the security event handler of the room. As soon as you define one event handler, the error event will no more be forwarded.
Example usage:
viewer.onSecurityError(function(category, type, msg) {
... your code goes here ...
});
The scope of the function is the current camera, so "this" in the function refers to the ApideoViewer object.
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.
callback
function resize
public
void
resize(Object
width, Object
height)
The passed value are expressed in pixel.
You can also pass percentages, for instance:
viewer.resize("100%", "100%");
If you pass percentages, the size used will be relative to the viewer container. Please be sure to set the width and height of the container.
width
height
function showDelay
public
void
showDelay()
The live delay is defined on Adobe flash documentation as the network transmission delay (lag time) between the sender and the viewer.
Actually, after testing thoroughly, it seems the livedelay measure cannot be fully trusted. However, event if not completely precise, it is good enough to provide rating of the average quality of the video connection.
function unregisterOnError
public
void
unregisterOnError(Object
callback)
callback

The Viewer object is returned by ApideoRoom.playStream.