Application-wide Embedding Events
Aggregated events concerning all embeddings such as recorder and player on a page.
Benefits
These events apply no matter where recording or playback occurs.
- 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
- Parameters of events depend on the particular event
- If you need to obtain additional data from the embedding, you can use the
embedding.getfunction, i.e.:embedding.get('video') - The difference between these events and embedding events is that these fire globally for all embeddings on your page.
List of events
Here is the full list of events.
- Media events 10/10
The list of all events that are connected to your media
Media can be recorded, played and re-recorded. This section will help you get the details about your media as it happens, telling you exactly what happens and where.
-
endedFires when a video has ended
- healthy true if healthy
ziggeoApp.embed_events.on("ended", function (embedding, healthy) { //Your code goes here }); -
invoke-skipSomeone skipped choosing the poster image
ziggeoApp.embed_events.on("invoke-skip", function (embedding) { //Your code goes here }); -
loadedTriggered when the media is loaded
ziggeoApp.embed_events.on("loaded", function (embedding) { //Your code goes here }); -
pausedFires when the pause button is clicked
ziggeoApp.embed_events.on("paused", function (embedding) { //Your code goes here }); -
playingFires after each play action is triggered (even if paused and then played, or if a seek operation is done)
ziggeoApp.embed_events.on("playing", function (embedding) { //Your code goes here }); -
recordingTriggered when a recording process has started
ziggeoApp.embed_events.on("recording", function (embedding) { //Your code goes here }); -
rerecordTriggered when a recorded video is discarded and is being re-recorded
ziggeoApp.embed_events.on("rerecord", function (embedding) { //Your code goes here }); -
seekTriggered when the user moves the progress indicator to continue video playback from a different position
- position position in video
ziggeoApp.embed_events.on("seek", function (embedding, position) { //Your code goes here }); -
select-imageFires once the cover image has been selected
- image the image object representing the selected image
ziggeoApp.embed_events.on("select-image", function (embedding, image) { //Your code goes here }); -
uploadingTriggered when a video is uploading
ziggeoApp.embed_events.on("uploading", function (embedding) { //Your code goes here });
- DOM related events 1/1
The list of events that are connected to DOM in some way
These events would usually fire as some change happens in the HTML (DOM tree). The DOM event can be specific to our embedding, or more global in its nature.
-
attachedFires when the embedding is attached to the DOM element
ziggeoApp.embed_events.on("attached", function (embedding) { //Your code goes here });
- Progress events 6/6
The list of events that inform you of different progress states
If you want to create something special, provide additional ways of keeping your visitors informed or attentive as things happen, you often need to know different states of progress. One good example is if you plan to build your own flashy upload progress bar.
That and all other events are shown here.
-
countdownTriggered while a video recorder counts down
- time Timer time
ziggeoApp.embed_events.on("countdown", function (embedding, time) { //Your code goes here }); -
processedProcessing completed
ziggeoApp.embed_events.on("processed", function (embedding) { //Your code goes here }); -
processingProcessing Progress
- percentage Percentage processed
ziggeoApp.embed_events.on("processing", function (embedding, percentage) { //Your code goes here }); -
recording_progressRecording Progress
- time Elapsed time while recording
- paused Only with WebRTC recorder, accept true value if recorder was paused, default is false
ziggeoApp.embed_events.on("recording_progress", function (embedding, time, paused) { //Your code goes here }); -
upload_progressUpload Progress
- uploaded Bytes uploaded
- total Bytes total
ziggeoApp.embed_events.on("upload_progress", function (embedding, uploaded, total) { //Your code goes here }); -
uploadedTriggered when a video has been uploaded / recorded (but not processed)
ziggeoApp.embed_events.on("uploaded", function (embedding) { //Your code goes here });
- Errors related events 7/7
The list of events that inform you when some forms of errors happen
Errors are common thing for any web and non web based systems. Some errors are actually notifications that we need to do something like plugging in our camera. Others can be more serious. These events help you know when these happen and react as you wish.
-
access_forbiddenTriggered when access to camera or microphone is not granted
- error Error data
ziggeoApp.embed_events.on("access_forbidden", function (embedding, error) { //Your code goes here }); -
access_grantedTriggered when access to camera and microphone is granted
ziggeoApp.embed_events.on("access_granted", function (embedding) { //Your code goes here }); -
camera_nosignalTriggered when camera has no signal.
- data The object data
ziggeoApp.embed_events.on("camera_nosignal", function (embedding, data) { //Your code goes here }); -
camera_unresponsiveTriggered when camera has become unresponsive.
- error Error data
ziggeoApp.embed_events.on("camera_unresponsive", function (embedding, error) { //Your code goes here }); -
errorTriggered when an embedding encounters an error
- error_type type of the error
- error_code code giving more details about the error
ziggeoApp.embed_events.on("error", function (embedding, error_type, error_code) { //Your code goes here }); -
no_cameraTriggered when no camera has been detected.
ziggeoApp.embed_events.on("no_camera", function (embedding) { //Your code goes here }); -
no_microphoneTriggered when no microphone has been detected.
ziggeoApp.embed_events.on("no_microphone", function (embedding) { //Your code goes here });
- Informational events 19/19
The list of events that inform you of different things that happen on your form
All events are informational in their nature. While the events are not specific as the ones above, they still offer you insight into different things that happen on your pages and around your embeddings.
-
boundHappens when hardware has been bound and is about to be ready to use
ziggeoApp.embed_events.on("bound", function (embedding) { //Your code goes here }); -
camera_signalTriggered when camera has signal.
ziggeoApp.embed_events.on("camera_signal", function (embedding) { //Your code goes here }); -
camerahealthTriggered when camera health changes.
- healthy true if healthy
ziggeoApp.embed_events.on("camerahealth", function (embedding, healthy) { //Your code goes here }); -
change-google-cast-volumeFires when volume is changed on playback on Google Cast
ziggeoApp.embed_events.on("change-google-cast-volume", function (embedding) { //Your code goes here }); -
has_cameraTriggered when a camera has been detected.
ziggeoApp.embed_events.on("has_camera", function (embedding) { //Your code goes here }); -
has_microphoneTriggered when a microphone has been detected.
ziggeoApp.embed_events.on("has_microphone", function (embedding) { //Your code goes here }); -
mainvideostreamendedFires once multistream capture is stopped.
ziggeoApp.embed_events.on("mainvideostreamended", function (embedding) { //Your code goes here }); -
manually_submittedTriggered when a video has been manually submitted
ziggeoApp.embed_events.on("manually_submitted", function (embedding) { //Your code goes here }); -
microphonehealthTriggered when microphone health changes.
- healthy true if healthy
ziggeoApp.embed_events.on("microphonehealth", function (embedding, healthy) { //Your code goes here }); -
pause-google-castFires when Google Cast is used to play the video and the video is paused
ziggeoApp.embed_events.on("pause-google-cast", function (embedding) { //Your code goes here }); -
play-google-castFires when Google Cast is used to play the video
ziggeoApp.embed_events.on("play-google-cast", function (embedding) { //Your code goes here }); -
ready_to_playTriggered when a video player is ready to play a video
ziggeoApp.embed_events.on("ready_to_play", function (embedding) { //Your code goes here }); -
ready_to_recordTriggered when a video recorder is ready to record a video
ziggeoApp.embed_events.on("ready_to_record", function (embedding) { //Your code goes here }); -
ready-to-trimTriggered when a video is waiting to be trimmed.
ziggeoApp.embed_events.on("ready-to-trim", function (embedding) { //Your code goes here }); -
recording_stoppedRecording Stopped
ziggeoApp.embed_events.on("recording_stopped", function (embedding) { //Your code goes here }); -
stoppedFires when playback is manually stopped
ziggeoApp.embed_events.on("stopped", function (embedding) { //Your code goes here }); -
upload_selectedTriggered when a file has been selected for upload
- file File object
ziggeoApp.embed_events.on("upload_selected", function (embedding, file) { //Your code goes here }); -
verifiedTriggered after video is uploaded and verified that it can be processed.
ziggeoApp.embed_events.on("verified", function (embedding) { //Your code goes here }); -
video-trimmedTriggered after a video is trimmed manually or using the trimming overlay.
- start Time in seconds where trimmed video should start
- end Time in seconds where trimmed video should end
- originalDuration Duration of the video before trimming
ziggeoApp.embed_events.on("video-trimmed", function (embedding, start, end, originalDuration) { //Your code goes here });