The standard way to deliver closed captions with the Accessible Video Player uses a custom metadata field that contains the URL of the captions file. Video Cloud's standard closed captioning plug-in requires this custom metadata field. Since custom metadata fields are available only for Video Cloud Pro and Enterprise publishers, this method of delivering closed captions won't work for Video Cloud Express publishers. This topic describes some other approaches you can take that are available to all Video Cloud publishers.
The basis approach described in this article involves editing the source code for the standard closed caption plug-in so that instead of depending on a specific custom metadata field for the URL of the closed caption file, it gets the URL in some other way. In order to use this approach, you'll need to be familiar with writing and compiling ActionScript code.
Here are the main steps:
As with the standard closed caption plug-in, you must create and host a closed caption file for each video. The Video Cloud player supports only DFXP format caption files. Read more about creating caption files.
The standard closed caption plug-in includes these lines that determine where to find the closed caption file for the video. We look for a custom metadata field named dfxppath and load the closed captions file from the URL in that field.
var video:VideoDTO = mVideoPlayer.getCurrentVideo();
if (video && video.customFields.hasOwnProperty("dfxppath")) {
mCaptionsModule.loadDFXP(video.customFields.dfxppath, video.id);
If you can't use custom metadata fields, you need to find some other way to get the closed caption file. Here are three possible approaches:
var video:VideoDTO = mVideoPlayer.getCurrentVideo();
if (video) {
mCaptionsModule.loadDFXP("http://domain/script?id=" + video.id, video.id);
var video:VideoDTO = mVideoPlayer.getCurrentVideo();
if (video) {
mCaptionsModule.loadDFXP("http://domain/path/captions" + video.id + ".dfxp", video.id);
<param name=”dfxppath” value=”http://domain/path/file.dfxp” />
Then you can use the Player API to access the file path like this:
var video:VideoDTO = mVideoPlayer.getCurrentVideo();
var path:String = mExperienceModule.getPlayerParameter("dfxppath");
if (video && path) {
mCaptionsModule.loadDFXP(path, video.id);
These are just three possibilities, but hopefully they demonstrate that with only a slight change to the plug-in, you can re-use it to work with however you store your closed caption files, whether you are a Video Cloud Express publisher or not, making the Accessible Video Player one that is available to allVideo Cloud customers.