video.test.playing

description

Tests whether the video stream is playing at the moment when the test command gets evaluated.

syntax

getVideo(ELEMENT_NAME).test.playing()

example(s)


@newVideo("myVideo", "file.mp4")
@  .print()
@,
@newButton("Next")
@  .print()
@  .wait(
$    getVideo("myVideo").test.playing()
$    .failure( newText("Please let the video finish first").print() )
@  )
  • After the button Next is pressed and the printed video is still playing, the program will throw error saying that the video should be finished first.