List of methods

Here is the list of methods exposed by the Nimbb Player. You can call them in your JavaScript code to communicate with the player.

Methods are accessible only if you specify your developer key as a parameter. See our tutorial for help.

getGuid() If in viewer mode, returns the currently loaded video's GUID. If in record mode, returns last recorded video's GUID. The GUID is a unique identifier of 10 characters.
getLanguage() Returns the current language of the player ('en' for English or 'fr' for French).
getLength() Returns the length of the video, in seconds. This method can be used in viewer mode or after a video has been saved.
getMode() Returns current mode of player ('view' or 'record').
getOverlayUrl() Returns the URL of the overlay image displayed over the player. Need a Gold or higher subscription.
getRecordLength() Returns the maximum recording time of a video, in seconds.
getState() Returns the current state of the player. Possible values: 'init', 'ready', 'busy', 'recording', 'playing', 'error'.
getVolume() Returns the current volume of the player (from 0 to 100).
isCaptureAllowed() Returns 'true' if the user has allowed access to camera/microphone in the Adobe Flash Player settings.
isReadOnly() Returns 'false' if the video can be saved.
playVideo(reset) Plays the video. If in record mode, plays the recorded video. Parameter reset is optional. If set to 'true', video plays from the beginning.
playVideoAt(position) Plays the video at the specified position (viewer mode only). Parameter position is the number of seconds from the start and it cannot be higher than the value returned by the getLength() method.
recordVideo() Start recording a video. Must be in record mode.
resize(width, height) Set the size of the player. Use this method mainly if you are embedding Nimbb into an Adobe Flash Professional application (see tutorial). Most of the time, it is better to simply resize the Flash container as the Nimbb Player automatically resize itself to the size of the container.
saveVideo() Save the video just recorded. You should test with idReadOnly() before saving.
setGuid(guid) Set video guid to use in viewer mode. Returns 'false' if trying to set this value in record mode.
setMode(mode) Set mode of the player ('view' or 'record').
setOverlayUrl(url) Set the URL of the overlay image displayed over the player. Need a Gold or higher subscription.
setRecordLength(seconds) Set the maximum recording time of a video, in seconds.
setVolume(volume) Set volume of the player (values from 0 to 100).
showCameraSettings() In record mode, show the camera settings window.
showMicroSettings() In record mode, show the microphone settings window.
showPrivacySettings() In record mode, show the privacy settings window. This allows to give access to the webcam and optionally always remember the setting.
stopVideo() Stop the playing or recording video.

For an example of using methods in your code, see our tutorial.

SIGN UP NOW 7-day free trial

Check out our Developer guide to get started with Nimbb.