audio.test.hasPlayed

description

Tests whether the audio stream has played at least once before in the trial.

syntax

getAudio(ELEMENT_NAME).test.hasPlayed()

example(s)


@newAudio("test.mp3")
@  .print()
@  .play()
@  .test.hasPlayed()
@  .log()
  • Checks whether the audio was played at least once. In this case it would return the result as correct.
  • Note that you can use this command as a conditional to the other functions.