This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Public Method Assess API

audioPlayer()

Allows access to the global Assess API audio player. This can be used to play audio files programmatically.

Examples

assessApp.audioPlayer()
    .then(function (player) {
        player.volume.set(0.5);
        player.play('MP3_file.mp3');
    })
    .catch(function () {
        console.log('Cannot get assess audio player');
    });

Arguments

None.

Return value

Value promise

Properties

  • then function
    Takes a success callback function that resolves the promise with the Assess API audio player as its parameter.
  • catch function
    Takes a rejection callback function that rejects the promise with an error as its parameter.
Was this article helpful?