Reference IDs: How to Assign Content to Video Players
Tech Talk
Publishing videos via the Quick Publish tool in the Media module is fast and easy. But for those of you with large content libraries and a large number of video players throughout your web properties, there's a trick that can save you time. This post will show you how to use the Reference ID feature of the Studio to simplify the process of programmatically assigning content to players.
Programmatically Assigning Content to Players
You may have noticed that all Brightcove publishing code follows a standard format. What this means is that you can programmatically swap out a few ID fields and change what the embed code brings up:
- PlayerID parameter. Determines which video player is displayed.
- @videoPlayer parameter. Determines which video is displayed (single video players only).
- @playlistTabs parameter. Determines which playlists are displayed (tabbed playlist players only).
- @playlistCombo parameter. Determines which playlists are displayed (players with dropdown playlist selection only).
Next, let's look at how to use the Reference ID to simplify the process of programmatically assigning content.
Using the Reference ID in Place of ID Numbers
All videos, playlists, and players are assigned a unique ID number that's used for identification purposes, specifically with the parameters I mentioned above. The Reference ID allows you to add another unique ID to use in place of that number. This can dramatically simplify the process of adding a new player to your site, since you won't need to constantly refer back to the studio to get the ID numbers.
The Reference ID can also be handy if you're managing your videos and web pages in a content management system (CMS). You can assign a Reference ID to a video that matches the ID used by your CMS, so you can easily match up the same info in the CMS and the studio.
Remember: You can also assign a Reference ID to playlists and assign playlists to your video players via the embed code instead of going through the Studio. Just be sure to keep all your Reference IDs unique so that Brightcove knows which video or playlist to display.
How to Edit the Reference ID
This step is simple: Just select your video in the Media Module, click on Edit at the bottom of your screen, and check the box next to "Reference ID." A small text box will pop up, allowing you to enter a reference ID.