Documentation

  • Filter
  • JavaScript Version
  • JavaScript Revision

The great thing about events is that you do not need to monitor when something happens, nor make any other forms of checks. The reason for that is because our SDK will raise the events as they happen so you can just prepare what code you wish to run at that time.

The event can give you access to different parameters depending on the event itself, however the data parameter is available in all v1 events. It includes all parameters that were passed on to the embedding as well as video and possibly stream as sub objects (which again depends on the event itself).

If you are using v2 then you can use .get() function within any event to get the entire data object, or be specific as embedding.get('video') to get video token - it is available in all v2 events.

To get `embedding` you would need to run the following code first (because it is not available globally):

Recorder embedding
var element = document.getElementById('elementID');
var embedding = ZiggeoApi.V2.Recorder.findByElement(element);
Player embedding
var element = document.getElementById('elementID');
var embedding = ZiggeoApi.V2.Player.findByElement(element);
* Some V2 events require everything to be loaded on the page first, in which case you should wrap them into global event "system_ready". You can see more about the same on the embedding methods page under "JavaScript embedding examples".
  1. attached

    Fires when the embedding is attached to the element, however it has not yet loaded

    Example:
    ZiggeoApi.Events.on("attached", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("attached", function () {
        //Your code goes here
    });
  2. loaded

    Triggered when the player / recorder is loaded for the first time

    Example:
    ZiggeoApi.Events.on("loaded", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("loaded", function () {
        //Your code goes here
    });
  3. play

    Triggered when a video is playing

    Example:
    ZiggeoApi.Events.on("play", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("play", function () {
        //Your code goes here
    });
  4. playing

    Fires after each play action is triggered (even if it was paused then played again, or if a seek operation is done)

    Example:
    ZiggeoApi.Events.on("playing", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("playing", function () {
        //Your code goes here
    });
  5. pause

    Triggered when a playing video is paused

    Example:
    ZiggeoApi.Events.on("pause", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("pause", function () {
        //Your code goes here
    });
  6. paused

    Fires when the pause button is clicked and when the video reaches the end

    Example:
    ZiggeoApi.Events.on("paused", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("paused", function () {
        //Your code goes here
    });
  7. ended

    Fires when the video has reached the end (right after the 'paused' event)

    Example:
    ZiggeoApi.Events.on("ended", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("ended", function () {
        //Your code goes here
    });
  8. stop

    Triggered when a playing video is stopped

    Example:
    ZiggeoApi.Events.on("stop", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("stop", function () {
        //Your code goes here
    });
  9. error

    Triggered when an embedding encounters an error

    Example:
    ZiggeoApi.Events.on("error", function ( error ) {
        //Your code goes here
    });
    Example:
    embedding.on("error", function ( error ) {
        //Your code goes here
    });
  10. error_player

    Triggered when the video player encounters an error

    Example:
    ZiggeoApi.Events.on("error_player", function ( data, error ) {
        //Your code goes here
    });
    Example:
    embedding.on("error_player", function ( error ) {
        //Your code goes here
    });
  11. submitted

    Triggered when a video has been uploaded / recorded and processed

    Example:
    ZiggeoApi.Events.on("submitted", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("submitted", function () {
        //Your code goes here
    });
  12. manually_submitted

    Triggered when a video has been manually submitted by a user

    Example:
    ZiggeoApi.Events.on("manually_submitted", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("manually_submitted", function () {
        //Your code goes here
    });
  13. uploaded

    Triggered when a video has been uploaded / recorded (but not processed)

    Example:
    ZiggeoApi.Events.on("uploaded", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("uploaded", function () {
        //Your code goes here
    });
  14. upload_selected

    Triggered when a file has been selected for upload

    Example:
    ZiggeoApi.Events.on("upload_selected", function ( file, data ) {
        //Your code goes here
    });
    Example:
    embedding.on("upload_selected", function ( file ) {
        //Your code goes here
    });
  15. recording

    Triggered when the recording process has been started

    Example:
    ZiggeoApi.Events.on("recording", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("recording", function () {
        //Your code goes here
    });
  16. uploading

    Triggered when the video is uploading

    Example:
    ZiggeoApi.Events.on("uploading", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("uploading", function () {
        //Your code goes here
    });
  17. finished

    Triggered when the recording process has finished

    Example:
    ZiggeoApi.Events.on("finished", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("finished", function () {
        //Your code goes here
    });
  18. seek

    Triggered when someone goes to the time position in video playback that is different than the currently played time position

    Example:
    ZiggeoApi.Events.on("seek", function ( position ) {
        //Your code goes here
    });
    Example:
    embedding.on("seek", function ( position ) {
        //Your code goes here
    });
  19. rerecord

    Triggered when a recorded video has been discarded and is being re-recorded

    Example:
    ZiggeoApi.Events.on("rerecord", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("rerecord", function () {
        //Your code goes here
    });
  20. discarded

    Triggered when a recorded video has been discarded and is being re-recorded

    Example:
    ZiggeoApi.Events.on("discarded", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("discarded", function () {
        //Your code goes here
    });
  21. error_recorder

    Triggered when the video recorder encounters an error

    Example:
    ZiggeoApi.Events.on("error_recorder", function ( data, error ) {
        //Your code goes here
    });
    Example:
    embedding.on("error_recorder", function ( error ) {
        //Your code goes here
    });
  22. countdown

    Triggered while the video recorder counts down

    Example:
    ZiggeoApi.Events.on("countdown", function ( time, data ) {
        //Your code goes here
    });
    Example:
    embedding.on("countdown", function ( time ) {
        //Your code goes here
    });
  23. elapsed

    Triggered while the video recorder records the video

    Example:
    ZiggeoApi.Events.on("elapsed", function ( time, data ) {
        //Your code goes here
    });
    Example:
    embedding.on("elapsed", function ( time ) {
        //Your code goes here
    });
  24. recording_progress

    Triggered while the video recorder records the video

    Example:
    ZiggeoApi.Events.on("recording_progress", function ( time ) {
        //Your code goes here
    });
    Example:
    embedding.on("recording_progress", function ( time ) {
        //Your code goes here
    });
  25. upload_progress

    Upload progress events

    Example:
    ZiggeoApi.Events.on("upload_progress", function ( uploaded, total, data ) {
        //Your code goes here
    });
    Example:
    embedding.on("upload_progress", function ( uploaded, total ) {
        //Your code goes here
    });
  26. processing_progress

    Processing progress events

    Example:
    ZiggeoApi.Events.on("processing_progress", function ( percentage, data ) {
        //Your code goes here
    });
    Example:
    embedding.on("processing_progress", function ( percentage ) {
        //Your code goes here
    });
  27. processing

    Processing progress events

    Example:
    ZiggeoApi.Events.on("processing", function ( percentage ) {
        //Your code goes here
    });
    Example:
    embedding.on("processing", function ( percentage ) {
        //Your code goes here
    });
  28. processed

    Finished processing event

    Example:
    ZiggeoApi.Events.on("processed", function (  ) {
        //Your code goes here
    });
    Example:
    embedding.on("processed", function () {
        //Your code goes here
    });
  29. ready_to_record

    Triggered when a video recorder is ready to record a video

    Example:
    ZiggeoApi.Events.on("ready_to_record", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("ready_to_record", function () {
        //Your code goes here
    });
  30. ready_to_play

    Triggered when a video play is ready to play a video

    Example:
    ZiggeoApi.Events.on("ready_to_play", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("ready_to_play", function () {
        //Your code goes here
    });
  31. access_forbidden

    Triggered when the user does not grant access to the camera

    Example:
    ZiggeoApi.Events.on("access_forbidden", function ( data, error ) {
        //Your code goes here
    });
    Example:
    embedding.on("access_forbidden", function ( error ) {
        //Your code goes here
    });
  32. access_granted

    Triggered when the user grants access to the camera

    Example:
    ZiggeoApi.Events.on("access_granted", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("access_granted", function () {
        //Your code goes here
    });
  33. access_revoked

    Triggered when the user revokes access to the camera while recording

    Example:
    ZiggeoApi.Events.on("access_revoked", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("access_revoked", function () {
        //Your code goes here
    });
  34. flash_hibernate

    Triggered when the browser puts Flash into hibernation mode

    Example:
    ZiggeoApi.Events.on("flash_hibernate", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("flash_hibernate", function () {
        //Your code goes here
    });
  35. camera_unresponsive

    Triggered when the camera has become unresponsive.

    Example:
    ZiggeoApi.Events.on("camera_unresponsive", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("camera_unresponsive", function () {
        //Your code goes here
    });
  36. camera_nosignal

    Triggered when the camera has no signal.

    Example:
    ZiggeoApi.Events.on("camera_nosignal", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("camera_nosignal", function () {
        //Your code goes here
    });
  37. verified

    Triggered after video was uploaded and verified that it can be processed.

    Example:
    ZiggeoApi.Events.on("verified", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("verified", function () {
        //Your code goes here
    });
  38. no_camera

    Triggered when the camera has no signal.

    Example:
    ZiggeoApi.Events.on("no_camera", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("no_camera", function () {
        //Your code goes here
    });
  39. no_microphone

    Triggered when the microphone has no signal.

    Example:
    ZiggeoApi.Events.on("no_microphone", function ( data ) {
        //Your code goes here
    });
    Example:
    embedding.on("no_microphone", function () {
        //Your code goes here
    });