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.get
function, 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.
-
ended
Fires when a video has ended
- healthy true if healthy
ziggeoApp.embed_events.on("ended", function (embedding, healthy) { //Your code goes here });
-
invoke-skip
Someone skipped choosing the poster image
ziggeoApp.embed_events.on("invoke-skip", function (embedding) { //Your code goes here });
-
loaded
Triggered when the media is loaded
ziggeoApp.embed_events.on("loaded", function (embedding) { //Your code goes here });
-
paused
Fires when the pause button is clicked
ziggeoApp.embed_events.on("paused", function (embedding) { //Your code goes here });
-
playing
Fires 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 });
-
recording
Triggered when a recording process has started
ziggeoApp.embed_events.on("recording", function (embedding) { //Your code goes here });
-
rerecord
Triggered when a recorded video is discarded and is being re-recorded
ziggeoApp.embed_events.on("rerecord", function (embedding) { //Your code goes here });
-
seek
Triggered 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-image
Fires 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 });
-
uploading
Triggered 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.
-
attached
Fires 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.
-
countdown
Triggered while a video recorder counts down
- time Timer time
ziggeoApp.embed_events.on("countdown", function (embedding, time) { //Your code goes here });
-
processed
Processing completed
ziggeoApp.embed_events.on("processed", function (embedding) { //Your code goes here });
-
processing
Processing Progress
- percentage Percentage processed
ziggeoApp.embed_events.on("processing", function (embedding, percentage) { //Your code goes here });
-
recording_progress
Recording 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_progress
Upload Progress
- uploaded Bytes uploaded
- total Bytes total
ziggeoApp.embed_events.on("upload_progress", function (embedding, uploaded, total) { //Your code goes here });
-
uploaded
Triggered 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_forbidden
Triggered 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_granted
Triggered when access to camera and microphone is granted
ziggeoApp.embed_events.on("access_granted", function (embedding) { //Your code goes here });
-
camera_nosignal
Triggered when camera has no signal.
- data The object data
ziggeoApp.embed_events.on("camera_nosignal", function (embedding, data) { //Your code goes here });
-
camera_unresponsive
Triggered when camera has become unresponsive.
- error Error data
ziggeoApp.embed_events.on("camera_unresponsive", function (embedding, error) { //Your code goes here });
-
error
Triggered 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_camera
Triggered when no camera has been detected.
ziggeoApp.embed_events.on("no_camera", function (embedding) { //Your code goes here });
-
no_microphone
Triggered 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.
-
bound
Happens 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_signal
Triggered when camera has signal.
ziggeoApp.embed_events.on("camera_signal", function (embedding) { //Your code goes here });
-
camerahealth
Triggered when camera health changes.
- healthy true if healthy
ziggeoApp.embed_events.on("camerahealth", function (embedding, healthy) { //Your code goes here });
-
change-google-cast-volume
Fires when volume is changed on playback on Google Cast
ziggeoApp.embed_events.on("change-google-cast-volume", function (embedding) { //Your code goes here });
-
has_camera
Triggered when a camera has been detected.
ziggeoApp.embed_events.on("has_camera", function (embedding) { //Your code goes here });
-
has_microphone
Triggered when a microphone has been detected.
ziggeoApp.embed_events.on("has_microphone", function (embedding) { //Your code goes here });
-
mainvideostreamended
Fires once multistream capture is stopped.
ziggeoApp.embed_events.on("mainvideostreamended", function (embedding) { //Your code goes here });
-
manually_submitted
Triggered when a video has been manually submitted
ziggeoApp.embed_events.on("manually_submitted", function (embedding) { //Your code goes here });
-
microphonehealth
Triggered when microphone health changes.
- healthy true if healthy
ziggeoApp.embed_events.on("microphonehealth", function (embedding, healthy) { //Your code goes here });
-
pause-google-cast
Fires 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-cast
Fires when Google Cast is used to play the video
ziggeoApp.embed_events.on("play-google-cast", function (embedding) { //Your code goes here });
-
ready_to_play
Triggered 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_record
Triggered 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-trim
Triggered when a video is waiting to be trimmed.
ziggeoApp.embed_events.on("ready-to-trim", function (embedding) { //Your code goes here });
-
recording_stopped
Recording Stopped
ziggeoApp.embed_events.on("recording_stopped", function (embedding) { //Your code goes here });
-
stopped
Fires when playback is manually stopped
ziggeoApp.embed_events.on("stopped", function (embedding) { //Your code goes here });
-
upload_selected
Triggered when a file has been selected for upload
- file File object
ziggeoApp.embed_events.on("upload_selected", function (embedding, file) { //Your code goes here });
-
verified
Triggered after video is uploaded and verified that it can be processed.
ziggeoApp.embed_events.on("verified", function (embedding) { //Your code goes here });
-
video-trimmed
Triggered 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 });