BeyondWords.js (beta)

To get started, you will need to have a BeyondWords account and create a project.

BeyondWords.js is a lightweight client-side integration and the simplest way to integrate BeyondWords.

To get started, include the BeyondWords.js script on each article webpage where you want audio generated and player embedded.

Once the webpage is loaded for the first time, the article content is extracted, the audio narration generated, and then once the audio is generated, the player embedded.

On first page load, BeyondWords.js extracts the article content, sends it to BeyondWords to generate the audio narration, and embeds the audio player once the audio is generated.

BeyondWords.js script

Add the BeyondWords.js script to the <body> of your web page:

<script async defer src="https://proxy.beyondwords.io/npm/@beyondwords/player@latest/dist/umd.js"
  onload="new BeyondWords.Player({
    target: this,
    projectId: <ID>,
    clientSideEnabled: true
  })">
</script>

You will need to replace <ID> with your BeyondWords project id in the snippet above.

With target: this, the player embeds after the script tag. To place it elsewhere, define a different target.

Set allowed domains

Add your site domains to ensure requests only come from your approved sites e.g. `yourwebsite.com`.

Set request headers (optional)

For paywalled or staging websites requiring authentication, configure HTTP headers so that BeyondWords can extract the full content of the article on the webpage.

Activate the BeyondWords.js script

Once you have added the script to your article webpage, set the allowed domains, and enabled the integration by toggling the switch, then visit the webpage to start generating audio and embedding the player.

Last updated