Resource Base
Table of contents

Class Feedback

The Feedback class is designed to facilitate both audio and haptic feedback functionalities, enabling applications to provide users with auditory signals through beeps and tactile sensations through vibrations.

Name Description
static beep() Initiates a beep sound upon invocation.
static beepSoundSource Returns or sets the beep’s sound source.
static vibrate() Activates device vibration upon invocation.
static vibrateDuration Determines the vibration’s duration in milliseconds.

beep

Initiates a beep sound upon invocation.

static beep(): void;

Parameter

None.

Return value

None.

Code Snippet

Dynamsoft.DCE.Feedback.beep();

beepSoundSource

Returns or sets the beep’s sound source. The value is either a base64 encoded string that represents the sound or a URL to the sound file.

static beepSoundSource: string;

Code Snippet

Dynamsoft.DCE.Feedback.beepSoundSource = "path/to/beepSound.mp3";

vibrate

Activates device vibration upon invocation.

This method requires Sticky user activation as a security measure. More details can be found on the MDN Web Docs.

static vibrate(): void;

Parameter

None.

Return value

None.

Code Snippet

Dynamsoft.DCE.Feedback.vibrate();

vibrateDuration

Determines the vibration’s duration in milliseconds.

static vibrateDuration: number;

Code Snippet

Dynamsoft.DCE.Feedback.vibrateDuration = 1000;

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version(4.0.2)
  • Version 4.x
    • Version 4.0.1
    • Version 4.0.0
  • Version 3.x
    • Version 3.3.10
    • Version 3.3.9
    • Version 3.3.8
    • Version 3.3.7
    • Version 3.3.6
    • Version 3.3.5
    • Version 3.3.4
    • Version 3.3.3
    • Version 3.3.2
    • Version 3.3.1
    • Version 3.3.0
    • Version 3.2.0
    • Version 3.1.0
    • Version 3.0.1
    • Version 3.0.0
  • Version 2.x
    • Version 2.3.5
    • Version 2.3.2
    • Version 2.3.1
    • Version 2.3.0
    • Version 2.1.4
    • Version 2.1.3
    • Version 2.1.0
    • Version 2.0.0
Change +