Application Level Events
Events concerning an application rather than a particular embedding or video resource.
Benefits
System-wide events unrelated to individual or collective recordings/playbacks.
- Ziggeo's SDK raises events in real time
- Simply prepare code to run at requested times
- No need to monitor or institute checks for particular occurrences
Preface
You can set up an application as follows:
var ziggeoApp = new ZiggeoApi.V2.Application( {token:"YOUR_APPLICATION_TOKEN"} );
You can refer to a previously created application like so:
var ziggeoApp = ZiggeoApi.V2.Application.getDefault();
If you have multiple applications, you can lookup a specific application as follows:
var ziggeoApp = ZiggeoApi.V2.Application.getByToken("YOUR_APPLICATION_TOKEN");
Available Events
Simply copy and paste the following codes.
-
error
Fires on application error.
- status_code Holds the status code that represents the error that had happened.
- message Holds the message that we have on the error, giving more details to the status code.
Example:ziggeoApp.on("error", function (status_code, message) { //Your code goes here });
-
ready
Fires when the Ziggeo system is ready to be used.
Example:ziggeoApp.on("ready", function () { //Your code goes here });