In this topic, you will learn to create a Brightcove Player that plays your content in audio-only mode. The video still image is displayed during playback, so you will not see the video content, but you will hear the audio track.
Here is the recommended development sequence:
- Use the In-Page embed player implementation to test the functionality of your player, plugin and CSS (if CSS is needed)
- Deploy the plugin code and CSS to your server once you have worked out any errors
- Use Studio to add the plugin and CSS to your player
- Replace the In-Page embed player implementation if you determine that the iframe implementation is a better fit (detailed in next section)
For details about these steps, review the Step-by-Step: Plugin Development guide.
iframe or In-Page embed
When developing enhancements for the Brightcove Player you will need to decide if the code is a best fit for the iframe or In-Page embed implementation. The best practice recommendation is to build a plugin for use with an iframe implementation. The advantages of using the iframe player are:
- Automatically responsive
- The iframe eases use in social media apps (or whenever the video will need to "travel" into other apps)
Although integrating the In-Page embed player can be more complex, there are times when you will plan your code around that implementation. To generalize, this approach is best when the containing page needs to communicate to the player. Specifically, here are some examples:
- Code in the containing page needs to listen for and act on player events
- The player uses styles from the containing page
- The iframe will cause app logic to fail, like a redirect from the containing page
Either an in-page or iframe player will work for this sample. Here, the iframe player is used
How it works
Publishing audio content in this way does not require any modification to your player. Just add an audio file to your Video Cloud library. Your audio content must be in the form of a MP4 video with no video track.
Create the player
To create a player and assign a video to it, follow these steps:
- In the Players module, create a new player or use an existing one.
- In the Media module, select an audio-only item and publish it with this player.Assign audio content to the player and publish it.
- Copy either the basic (iframe) or the advanced (In-Page) embed code and paste it into a new HTML file.