Show a Video Ad with the Brightcove player
This page is an example of using Prebid Video with a specific player. For a general guide to showing video ads with Prebid.js, see Show Video Ads with DFP.
This page contains:
invokeVideoPlayerto set up and access the Brightcove Player instance.
- Using the catalog API to load a media file dynamically.
bc()to make sure all the necessary scripts are loaded before playing an ad.
- Playing an ad using Brightcove's ima3 plugin.
- Configuring the player's ima3 settings on page.
- For this demo we'll be configuring the player's ima3 settings on the page instead of in Video Cloud. Make sure you load the ima3 script and CSS file in addition to your player script.
- On the publish page for the player, choose the Advanced embed code (not Standard).
- If you're playing a preroll ad, do not include the videoID in the video element.
Click here to view a demo page with this example.
Click Edit in JSFiddle (below) to open the example in a new tab.
Troubleshooting Common Issues
For tips and troublshooting info, see: