Install via NPM

The BeyondWords Player is automatically installed with the following integrations:

1. Add the player NPM package:

npm add @beyondwords/player

2. Add a target div in your web app:

<div id='beyondwords-player'></div>

3. Initialize the player:

import BeyondWords from '@beyondwords/player';

new BeyondWords.Player({ target: '#beyondwords-player', projectID: <ID>, contentId: '<ID>' });

You will need to replace the project ID and content ID with your projectId and contentId. You can use any of the following properties in conjunction with the projectId to initialize the player:

contentId

Unique UUID string for the audio content.

You can also pass the previous integer audio id as a string for users migrating across from the legacy API.

sourceId

The externally-provided source identifier for a content item.

For instance, this could be the id of the content in your CMS that you submitted to the source_id property when you generated the audio using the API or the <guid> from an <item> if you generated the audio using the RSS Feed Importer or the post id if you generated the audio using the WordPress Plugin etc.

sourceUrl

The URL that contains the source content.

For instance, this could be the public URL of the content that you submitted to the source_url property when you generated the audio using the API or the <link> from an <item> if you generated the audio using the RSS Feed Importer or the post url if you generated the audio using the WordPress Plugin.

playlistId

The unique id for a playlist that you created in the dashboard or through the API.

Last updated