External Control

External Control

📣 Special thanks to the Tech team at GOLF for requesting this one!

ParOne exposes functions to allow external control of the player. These functions can be accessed by obtaining a reference to the ParOne element.

player.play()Begin content playback
player.pause()Pause content playback

// Control a player with javascript

const player = document.querySelector('parone-video-block')

Controlling multiple players on the page

If there are multiple players on a page, you can give each one an ID. and then access it viadocument.querySelector(‘#playerOne’)`.

<!-- Give ID of playerOne -->
<parone-video-block id='playerOne'></parone-video-block>
// Target playerOne