Skip to main content

What JavaScript methods are available for Video Player?

Question

What JavaScript methods may be used for controlling the behavior of Video Player?

Answer

The following table describes the available actions and JavaScript methods available for controlling VideoPlayer:

Action

Description

JavaScript

Play

Play video

powa.play()

Pause

Pause video

powa.pause()

Jump Forward

Jump forward n seconds

powa.jump(n)

Jump Backward

Jump backward n seconds

powa.jump(-n)

Seek Time

Jump to a time in seconds

powa.seekTime(<seconds>)

Seek Position

Jump to a % location using decimal 0.0-1.0

powa.seekPosition(<0.0-1.0>)

Seek Live

Jump to live in a live stream

powa.seekLive()

Show specified subtitles

Show subtitles specified by label/language

powa.showSubtitles('<language>')

Show first/default subtitles

Show first available subtitles

powa.showSubtitles()

Hide subtitles

Hide subtitles

powa.hideSubtitles()

Toggle subtitles

Toggle subtitles

powa.toggleSubtitles()