11-08-2011 03:42 PM - edited 11-11-2011 02:12 PM
So I need to retreive any videos reference ID number (something we created for each video ourselfs) with the player API.
Inside the plugin I'm working on (the GoogleAnalytics swf) I see these lines, and hoping for a similar way to get the reference ID:
var experienceId:Number = _bcExperience.getExperienceID(); var playerName:String = _bcExperience.getPlayerName(); var video:Object = _bcVideo.getCurrentVideo(); var playlistId:Number = video.lineupId; var videoId:Number = video.id; var videoName:String = video.displayName;
Solved! Go to Solution.
11-08-2011 04:40 PM
Hi Leon,
It should come back as referenceId in the videoDTO returned by getCurrentVideo()
Robert
11-10-2011 11:48 AM - edited 11-10-2011 05:22 PM
Hi Robert this is what I've tried, but I'm getting an error:
refID = _bcVideo.referenceId(); //refID = _bcVideo.getCurrentVideo().referenceId(); var experienceId:Number = _bcExperience.getExperienceID(); var playerName:String = _bcExperience.getPlayerName();
Error:
1061: Call to a possibly undefined method referenceId through a reference with static type com.brightcove.api.modules:VideoPlayerModule.
Update: Doing a bit more research it seems that referenceID is a keyword only used in the MediaAPI? Can it be used by the VideoAPI?
Additional info
So this is how we're at this crossroads, I need to do a check on our reference ID / Video ID in order to serve a tracking pixel.
Currently how the part of our Embed code looks like that our PHP dev created:
<param name="@videoPlayer" value="ref:TS_950" />
Our problem would be easily solved if I could just grab the reference ID right here, however I believe the @ symbol is causing problems. Nothing comes in when I try:
videoID = this._bcStage.root.loaderInfo.parameters.@videoPlayer;
Alternately we could make another param, but we're basically adding another line containing the same content :( so figured let's use the Player API to get the video's reference ID. However this is where I'm stuck still...
11-17-2011 06:45 PM
Hi,
How are you defining your _bcvideo ?
I have an working example using javascript, where I have the following :
video = player.getModule(APIModules.VIDEO_PLAYER); // MY video Object
and then I have put an alert inside my onTemplateReady() as follows :
alert("Reference ID is =" +video.getCurrentVideo().referenceId); // Using the video Object
which gives me the value of reference ID (which is the value in studio as shown in the image by you )
Let me know if this helps.
11-18-2011 12:37 PM - edited 11-18-2011 12:38 PM
That worked!!!! Thank you!
ok I found out what the problem was, instead of "ref:TS_950" it spat out TS_950
but that's all I need, I can just run a check againts that!

11-21-2011 03:30 PM
Awesome...Glad to help !
Great balls of fire !!!
Brightcove Inc., a leading global provider of cloud content services, provides a family of products used to publish and distribute the world's professional digital media. The company's products include Brightcove Video Cloud, the market-leading online video platform, and Brightcove App Cloud, the pioneering content app platform. Together, more than 4,200 customers in 50 countries rely on Brightcove's cloud content services to build and operate exceptional media experiences across PCs, smartphones, tablets and connected TVs.
Brightcove Inc.
© 2012 Brightcove Inc.
