headless mode if you want to build your own user-interface on top of it.
If the player is initialized without a target, the UI will be disabled and it will be mounted at the end of the <body> tag.
Alternatively, you can set showUserInterface: false when initializing the player to disable the UI:
<video> tag).
If playerStyle: "video", showUserInterface: false is set then the <video> tag will show without any controls.
Overview
The simplest way to build your own UI is to repeatedly query the player instance and re-render. For example, you can getplayer.playbackState and player.currentTime then update your UI accordingly.
More complex features like progress bars can be built using this technique.
The simplest way to repeatedly query the player is by registering an event listener for all events:
currentTime being updated.
See Listening to Events and Player Events for more information.
Using React
If you’re using React, here’s how you might implement the above technique in a component:Using WordPress
If you’re using our WordPress plugin, it supports a ‘headless’ mode which hides the default UI. This feature is only available in private beta versions 4.x or greater. Please contact us for access. The player script tag will be added for you when using the WordPress plugin so do not add it manually. WordPress supports a filter calledbeyondwords_player_script_onload which can be used to initialize your UI:
Using JavaScript
If you’re using plain Javascript, here’s a working example that implements the above technique. The user-interface in this example is very simple but should demonstrate the core technique. Note that you will need to replace projectId and contentId with valid identifiers from your project. If you’re using the WordPress plugin (see above) then you can remove the line containingnew BeyondWords.Player(...).
Style overrides
Instead of building a completely custom user-interface, you might just want to tweak the player styles. For example, if you don’t want the rounded corners, you could add a CSS rule to your site to remove them:Segment style overrides
If you want to override the highlight color of segments, you can use the following CSS:.bwp.bwp.bwp... selector in this case
because that is only needed for the player user interface and for the segment
widget.