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.
errordefault:—Fires on application error.
Various errors will be reported here, such as trying to play or record video without specifying the application token first.
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.
readydefault:—Fires when the Ziggeo system is ready to be used.
This event uses DOM ready and fires once our system is completely loaded. As such it will always fire after DOM ready, however it should be set before DOM ready in order to fire properly.