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

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.

toggleFaceOutlinedefault: —

Toggles the face outline

video recorder

toggle_settingsdefault: —

Toggles if settings are shown or not

video player

Informational methods / functions

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.

aspectRatiodefault: —

Returns float value of current aspect ratio.

This is equal to (width/height). See .videoWidth() and .videoHeight()

image capture, image viewer, video player

audioErrordefault: —

Returns audio error if any happened

audio player, audio recorder

averageFrameRatedefault: —

Returns average frame rate.

audio player, audio recorder, image capture, image viewer, video player, video recorder

destroyeddefault: —

Tells you if the embedding is destroyed (true) or not (false)

audio player, audio recorder, image capture, image viewer, video player, video recorder

getdefault: —

Returns property value (if specified) or entire object

  • object_property — Optional argument to get specific info from within video data.

audio player, audio recorder, image capture, image viewer, video player, video recorder

getCurrentPositiondefault: —

Returns time the playback is in at this very moment (in seconds).

Please note that it will return NaN if playback did not start.

audio player, video player

getPlaybackCountdefault: —

Get integer of how many times this player played this video

Resets on refresh and destroy();

audio player, video player

hasKeydefault: —

Confirms if key exists

If you are using embedding.get(key); this will tell you if such key exists or not.

audio player, video player

imageErrordefault: —

Returns image error if any happened

image capture, image viewer

imageHeightdefault: —

Returns height of image itself

image capture, image viewer

imageWidthdefault: —

Returns width of image itself

image capture, image viewer

isFlashdefault: —

This tells if embedding is using flash

video recorder

isHDdefault: —

Is this video of HD resolution?

video player

isMobiledefault: —

Tells you if the embedding is used on a mobile device

video player, video recorder

isRecordingdefault: —

Method to check if recording is in progress

video recorder

isSDdefault: —

Tells you if you are playing SD quality video

video player

isWebrtcStreamingdefault: —

This tells if embedding is using WebRTC Streaming

video recorder

lightLeveldefault: —

Returns value indicating quality of lighting during recording

image capture, video recorder

videoErrordefault: —

Returns video error if any happened

video player, video recorder

videoHeightdefault: —

Returns height of video itself

video player

videoLoadeddefault: —

Returns true if video is loaded, false if not

audio player, video player

videoWidthdefault: —

Returns width of video itself

video player

Operational methods / functions

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.

activatedefault: —

Activates embedding

audio player, audio recorder, image capture, image viewer, video player, video recorder

activateddefault: —

Returns true if embedding is activated or false if it is not.

audio player, audio recorder, image capture, image viewer, video player, video recorder

canceldefault: —

Cancel media upload

audio recorder, video recorder

destroydefault: —

Destroys and removes embedding from DOM and memory

audio player, audio recorder, image viewer, video player

executedefault: —

A way to execute a command

All events here can be run through this, add comma to pass parameter. Make sure however to use try catch as it will raise error on bad command.

  • method — The name of the method to run
  • argument — Argument that would be passed to the method (optional)

audio player, audio recorder, image capture, image viewer, video player, video recorder

pausedefault: —

Pause playback of video or pause recording

Pausing recording is possible only since r34

audio player, audio recorder, video player, video recorder

pause_recorderdefault: —

Pause recording

video recorder

playdefault: —

Start playback of recorded video.

audio player, audio recorder, video player, video recorder

reattachImagedefault: —

Reloads the image (poster) using same details

image viewer, video player

reattachVideodefault: —

Reloads the video using same details

video player

recorddefault: —

Start recording process

audio recorder, image capture, video recorder

record_audiodefault: —

Starts microphone recording

Note: Permission must be received first by the end-user

audio recorder

record_screendefault: —

Starts screen recording

Firefox offers direct recording however Chrome and other WebKit based browsers require that you install the plugin first. Use our extension builder to have yours automatically created for you.

video recorder

record_videodefault: —

Starts camera recording

Note: Permission must be received first by the end-user

video recorder

rerecorddefault: —

Trigger re-recording process

audio player, audio recorder, image capture, image viewer, video player, video recorder

resumedefault: —

Resume recording (if it was paused)

video recorder

seekdefault: —

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

audio player, video player

setdefault: —

Allows you to set some properties during the use of embedding.

  • key — parameter to set
  • value — value to set the key to

audio player, audio recorder, image capture, image viewer, video player, video recorder

set_speeddefault: —

Sets the speed of playback

Any float or integer number that represents how fast the player should play back the video (at what speed). Higher the value, faster the playback.

  • speed — The speed you would like to set

audio player, video player

set_volumedefault: —

Sets the volume for plaback sound (0-1)

The number is anything between 0 and 1. For example 50% is set by passing 0.5

  • amount — amount to set the valume to

audio player, audio recorder, image capture, image viewer, video player, video recorder

soundLeveldefault: —

Returns value indicating quality of sound during recording

audio recorder, video recorder

stopdefault: —

Stop active playback and active recording

audio player, audio recorder, video player, video recorder

toggleFullscreendefault: —

Toggle embedding to go into or out of fullscreen

video player

toggleSubtitlesdefault: —

Show or hide subtitles

audio player, video player

toggle_face_modedefault: —

Toggles the face mode on or off

Tries to switch to the camera facing the face

video recorder

toggle_playerdefault: —

Toggles the player mode

video player

upload_audiodefault: —

Starts the upload of an audio file

  • file — The File Object to start the file upload

audio recorder

upload_covershotdefault: —

Starts the upload of an image file

  • file — The File Object to start the file upload

video recorder

upload_text_tracksdefault: —

Upload the transcription data

video player

upload_videodefault: —

Starts the upload of a video file

  • file — The File Object to start the file upload

video recorder

Popup methods / functions

The list of methods that are connected to popups

Every page is different. We realize that sometimes the only way to make something part of your design is to pop out of it. These methods allow you to do just that.

popupAttrsdefault: —

Returns attributes such as width, height, stretch, autoplay of popup.

audio player, audio recorder, image capture, image viewer, video player, video recorder

DOM methods / functions

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.

activeElementdefault: —

Returns HTML reference to the embedding in DOM.

audio player, audio recorder, image capture, image viewer, video player, video recorder

parentAspectRatiodefault: —

Returns aspect ratio of the element holding the embedding

audio recorder, image capture, video player

parentHeightdefault: —

Returns height of the element holding the embedding

audio recorder, image capture, image viewer, video player

parentWidthdefault: —

Returns width of the element holding the embedding

audio recorder, image capture, image viewer, video player

resetdefault: —

Reset embedding to initial state

audio recorder, image capture, video recorder

videoAttacheddefault: —

Tells you if video is attached to the embedding or not

audio player, video player