Using Reference IDs

Video CloudNew StudioExpress I, Express II, Express III, Professional, Enterprise

This topic will show you how to use video reference IDs to simplify the process of programmatically assigning content to players.

Programmatically assigning content to players

You may have noticed that all Video Cloud publishing code follows a standard format. What this means is that you can programmatically swap out a few parameters to change what the embed code brings up:

  • data-player: determines which video player is displayed
  • data-video-id: determines which video is displayed (single video players only)
  • data-playlist-id: determines which playlist is displayed

For more detailed information on how to use the parameters listed above, take a look at the following documents:

The rest of this article will focus on how you can 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 can be used for identification purposes, specifically with the parameters 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 Video Cloud Studio to get the ID numbers.

Note: Reference IDs are currently available for videos and playlists.

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.

For example, the code below assigns the Reference ID "Lionfish" to the video player. If you regularly post videos to your website, you might find that this method will save you a lot of time. Using this method, you can bypass going through the Media Module, finding the video, and using the Publish button to generate the embed code. Instead, you can simply take the embed code from a previous post and replace the data-video-id value with "ref:Lionfish" (make sure to add the ref: tag before the Reference ID value).

 <video data-video-id="ref:Lionfish"
controls width="640" height="360">
<script src="//"></script>

You can also assign a Reference ID to playlists, and assign playlists to your video players via the embed code instead of going through Video Cloud Studio. Just be sure to keep all your Reference IDs unique so that Video Cloud knows which video or playlist to display!

How to edit the Reference ID

Editing a Reference ID is simple. Just select your video in the Media Module, select the Edit button in the Video Information section and add a Reference ID.

Reference ID in Media Module