First Steps
Installation
The first step is to create an account and generate some content. Next, choose your installation method:How the embed script works
The script tag downloads the code for BeyondWords player and instantiates a new player instance. Theasync and defer attributes mean that the browser won’t stall while it downloads the script code.
The onload attribute initializes a JavaScript class called BeyondWords.Player.
By setting target: this, the player will be added immediately after the script tag in the <body>. That means it will appear at the position where you copy the script tag into your page.
How to configure it
The preferred way to configure the player is by logging into the BeyondWords dashboard, going to the Player tab, and changing its settings. However, you can also override properties at the script level, for example:How NPM installation works
The initialization is almost identical to how the embed script works except we set target:#beyondwords-player.
This instructs the player to initialize inside the DOM node with id='beyondwords-player'.
Note that the DOM node must be on the page when the initializer is called or the player won’t load.
How to configure it
The preferred way to configure the player is by logging into the BeyondWords dashboard and changing its settings. However, you can also override properties in the initializer, for example:JavaScript Github repository
JavaScript SDK Documentation
View the JavaScript SDK documentation in our GitHub repository