Skip to main content
The BeyondWords Player API lets you control and interact with the player programmatically—controlling playback, reading state, listening to events, and updating player properties at runtime. The API is available on all player platforms. On iOS and Android, the native SDKs expose the same properties and methods through their PlayerView wrappers. When you set a property both in the dashboard and in your embed code or SDK configuration, the value passed at initialization takes precedence. See programmatic control for override order details.

Player properties

Read and set player configuration and state.

Player events

Listen and respond to player lifecycle events.

Programmatic control

Control playback, navigation, and player behavior from your code.

Getting a player instance

Before you can use the API, you need a reference to the player instance. Embed script:
<script async defer
  src="https://proxy.beyondwords.io/npm/@beyondwords/player@latest/dist/umd.js"
  onload="const player = new BeyondWords.Player({
    target: this,
    projectId: YOUR_PROJECT_ID,
    contentId: 'YOUR_CONTENT_ID',
  })">
</script>
NPM:
import BeyondWords from '@beyondwords/player';

const player = new BeyondWords.Player({
  target: '#beyondwords-player',
  projectId: YOUR_PROJECT_ID,
  contentId: 'YOUR_CONTENT_ID',
});
Once you have a player instance, you can use the properties, events, and methods documented in the sections below.