- Filter This box allows you to search for keyword if present, even if it is not shown
- JavaScript Revision Select the revision that you are interested in
Callable Methods
These methods allow you to customize and trigger particular behavior on our embeddings such as playing back a video via JavaScript.
In order to reference a recorder embedding, you'll need to look it up as follows:
<ziggeorecorder id="id-of-my-embedding" ...></ziggeorecorder>
<script>
var embedding = ZiggeoApi.V2.Recorder.findByElement( document.getElementById('id-of-my-embedding') );
</script>
In order to reference a player embedding, you'll need to look it up as follows:
<ziggeoplayer id="id-of-my-embedding" ...></ziggeoplayer>
<script>
var embedding = ZiggeoApi.V2.Player.findByElement( document.getElementById('id-of-my-embedding') );
</script>
- Presentational methods / functions 2/2
Methods you can call to change some presentational aspect.
The embedding can do many things. Usually you would set this up using your parameters, however what if you want to change or set something in a different way?
Our presentational methods allow you to do this in a dynamic way, some even after the embedding has been created.
-
toggleFaceOutline
Toggles the face outline
embedding.toggleFaceOutline();
-
toggle_settings
Toggles if settings are shown or not
embedding.toggle_settings();
- Informational methods / functions 22/22
The list of methods to get some values.
Sometimes you want to make a call to get some info. Well with the following list of methods you can do just that.
-
aspectRatio
Returns float value of current aspect ratio.
embedding.aspectRatio();
-
audioError
Returns audio error if any happened
embedding.audioError();
-
averageFrameRate
Returns average frame rate.
embedding.averageFrameRate();
-
destroyed
Tells you if the embedding is destroyed (true) or not (false)
embedding.destroyed();
-
get
Returns property value (if specified) or entire object
- object_property Optional argument to get specific info from within video data.
embedding.get(object_property);
-
getCurrentPosition
Returns time the playback is in at this very moment (in seconds).
embedding.getCurrentPosition();
-
getPlaybackCount
Get integer of how many times this player played this video
embedding.getPlaybackCount();
-
hasKey
Confirms if key exists
embedding.hasKey();
-
imageError
Returns image error if any happened
embedding.imageError();
-
imageHeight
Returns height of image itself
embedding.imageHeight();
-
imageWidth
Returns width of image itself
embedding.imageWidth();
-
isFlash
This tells if embedding is using flash
embedding.isFlash();
-
isHD
Is this video of HD resolution?
embedding.isHD();
-
isMobile
Tells you if the embedding is used on a mobile device
embedding.isMobile();
-
isRecording
Method to check if recording is in progress
embedding.isRecording();
-
isSD
Tells you if you are playing SD quality video
embedding.isSD();
-
isWebrtcStreaming
This tells if embedding is using WebRTC Streaming
embedding.isWebrtcStreaming();
-
lightLevel
Returns value indicating quality of lighting during recording
embedding.lightLevel();
-
videoError
Returns video error if any happened
embedding.videoError();
-
videoHeight
Returns height of video itself
embedding.videoHeight();
-
videoLoaded
Returns true if video is loaded, false if not
embedding.videoLoaded();
-
videoWidth
Returns width of video itself
embedding.videoWidth();
- Operational methods / functions 30/30
The list of methods that change how embeddings operate
Changing how something happens is a very nice way to fine tune the experience. Especially so if you combine this with other things such as events.
-
activate
Activates embedding
embedding.activate();
-
activated
Returns true if embedding is activated or false if it is not.
embedding.activated();
-
cancel
Cancel media upload
embedding.cancel();
-
destroy
Destroys and removes embedding from DOM and memory
embedding.destroy();
-
execute
A way to execute a command
- method The name of the method to run
- argument Argument that would be passed to the method (optional)
embedding.execute(method, argument);
-
pause
Pause playback of video or pause recording
embedding.pause();
-
pause_recorder
Pause recording
embedding.pause_recorder();
-
play
Start playback of recorded video.
embedding.play();
-
reattachImage
Reloads the image (poster) using same details
embedding.reattachImage();
-
reattachVideo
Reloads the video using same details
embedding.reattachVideo();
-
record
Start recording process
embedding.record();
-
record_audio
Starts microphone recording
embedding.record_audio();
-
record_screen
Starts screen recording
embedding.record_screen();
-
record_video
Starts camera recording
embedding.record_video();
-
rerecord
Trigger re-recording process
embedding.rerecord();
-
resume
Resume recording (if it was paused)
embedding.resume();
-
seek
Seeks to certain time in seconds (counts from 0 regardless of current position or initial seek)
- position time in seconds of the video to which to go to
embedding.seek(position);
-
set
Allows you to set some properties during the use of embedding.
- key parameter to set
- value value to set the key to
embedding.set(key, value);
-
set_speed
Sets the speed of playback
- speed The speed you would like to set
embedding.set_speed(speed);
-
set_volume
Sets the volume for plaback sound (0-1)
- amount amount to set the valume to
embedding.set_volume(amount);
-
soundLevel
Returns value indicating quality of sound during recording
embedding.soundLevel();
-
stop
Stop active playback and active recording
embedding.stop();
-
toggleFullscreen
Toggle embedding to go into or out of fullscreen
embedding.toggleFullscreen();
-
toggleSubtitles
Show or hide subtitles
embedding.toggleSubtitles();
-
toggle_face_mode
Toggles the face mode on or off
embedding.toggle_face_mode();
-
toggle_player
Toggles the player mode
embedding.toggle_player();
-
upload_audio
Starts the upload of an audio file
- file The File Object to start the file upload
embedding.upload_audio(file);
-
upload_covershot
Starts the upload of an image file
- file The File Object to start the file upload
embedding.upload_covershot(file);
-
upload_text_tracks
Upload the transcription data
embedding.upload_text_tracks();
-
upload_video
Starts the upload of a video file
- file The File Object to start the file upload
embedding.upload_video(file);
- DOM methods / functions 6/6
The list of methods that are connected to the DOM tree
Most of the events that our embeddings fire are about the embedding. Sometimes they might however be connected to DOM a tiny bit more.
Since they allow you to make different types of calls, you can see them here.
-
activeElement
Returns HTML reference to the embedding in DOM.
embedding.activeElement();
-
parentAspectRatio
Returns aspect ratio of the element holding the embedding
embedding.parentAspectRatio();
-
parentHeight
Returns height of the element holding the embedding
embedding.parentHeight();
-
parentWidth
Returns width of the element holding the embedding
embedding.parentWidth();
-
reset
Reset embedding to initial state
embedding.reset();
-
videoAttached
Tells you if video is attached to the embedding or not
embedding.videoAttached();