- 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.
-
toggleFaceOutlineToggles the face outline
embedding.toggleFaceOutline();
-
toggle_settingsToggles 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.
-
aspectRatioReturns float value of current aspect ratio.
embedding.aspectRatio();
-
audioErrorReturns audio error if any happened
embedding.audioError();
-
averageFrameRateReturns average frame rate.
embedding.averageFrameRate();
-
destroyedTells you if the embedding is destroyed (true) or not (false)
embedding.destroyed();
-
getReturns property value (if specified) or entire object
- object_property Optional argument to get specific info from within video data.
embedding.get(object_property);
-
getCurrentPositionReturns time the playback is in at this very moment (in seconds).
embedding.getCurrentPosition();
-
getPlaybackCountGet integer of how many times this player played this video
embedding.getPlaybackCount();
-
hasKeyConfirms if key exists
embedding.hasKey();
-
imageErrorReturns image error if any happened
embedding.imageError();
-
imageHeightReturns height of image itself
embedding.imageHeight();
-
imageWidthReturns width of image itself
embedding.imageWidth();
-
isFlashThis tells if embedding is using flash
embedding.isFlash();
-
isHDIs this video of HD resolution?
embedding.isHD();
-
isMobileTells you if the embedding is used on a mobile device
embedding.isMobile();
-
isRecordingMethod to check if recording is in progress
embedding.isRecording();
-
isSDTells you if you are playing SD quality video
embedding.isSD();
-
isWebrtcStreamingThis tells if embedding is using WebRTC Streaming
embedding.isWebrtcStreaming();
-
lightLevelReturns value indicating quality of lighting during recording
embedding.lightLevel();
-
videoErrorReturns video error if any happened
embedding.videoError();
-
videoHeightReturns height of video itself
embedding.videoHeight();
-
videoLoadedReturns true if video is loaded, false if not
embedding.videoLoaded();
-
videoWidthReturns 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.
-
activateActivates embedding
embedding.activate();
-
activatedReturns true if embedding is activated or false if it is not.
embedding.activated();
-
cancelCancel media upload
embedding.cancel();
-
destroyDestroys and removes embedding from DOM and memory
embedding.destroy();
-
executeA 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);
-
pausePause playback of video or pause recording
embedding.pause();
-
pause_recorderPause recording
embedding.pause_recorder();
-
playStart playback of recorded video.
embedding.play();
-
reattachImageReloads the image (poster) using same details
embedding.reattachImage();
-
reattachVideoReloads the video using same details
embedding.reattachVideo();
-
recordStart recording process
embedding.record();
-
record_audioStarts microphone recording
embedding.record_audio();
-
record_screenStarts screen recording
embedding.record_screen();
-
record_videoStarts camera recording
embedding.record_video();
-
rerecordTrigger re-recording process
embedding.rerecord();
-
resumeResume recording (if it was paused)
embedding.resume();
-
seekSeeks 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);
-
setAllows 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_speedSets the speed of playback
- speed The speed you would like to set
embedding.set_speed(speed);
-
set_volumeSets the volume for plaback sound (0-1)
- amount amount to set the valume to
embedding.set_volume(amount);
-
soundLevelReturns value indicating quality of sound during recording
embedding.soundLevel();
-
stopStop active playback and active recording
embedding.stop();
-
toggleFullscreenToggle embedding to go into or out of fullscreen
embedding.toggleFullscreen();
-
toggleSubtitlesShow or hide subtitles
embedding.toggleSubtitles();
-
toggle_face_modeToggles the face mode on or off
embedding.toggle_face_mode();
-
toggle_playerToggles the player mode
embedding.toggle_player();
-
upload_audioStarts the upload of an audio file
- file The File Object to start the file upload
embedding.upload_audio(file);
-
upload_covershotStarts the upload of an image file
- file The File Object to start the file upload
embedding.upload_covershot(file);
-
upload_text_tracksUpload the transcription data
embedding.upload_text_tracks();
-
upload_videoStarts 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.
-
activeElementReturns HTML reference to the embedding in DOM.
embedding.activeElement();
-
parentAspectRatioReturns aspect ratio of the element holding the embedding
embedding.parentAspectRatio();
-
parentHeightReturns height of the element holding the embedding
embedding.parentHeight();
-
parentWidthReturns width of the element holding the embedding
embedding.parentWidth();
-
resetReset embedding to initial state
embedding.reset();
-
videoAttachedTells you if video is attached to the embedding or not
embedding.videoAttached();