03-28-2012 08:15 AM
Just got thrown into a project that needs to embed videos from my company's BrightCove account.
Using the test accout I have, I was able to upload a video, copy the publish code, and have it run on my ASPX page.
After that, nothing seems to work. Trying to use the API calls just never seems to do anything.
The js files are being loaded, for good measure I added *.brightcove to my trusted sites and such just to make sure but it is almost like it just gets ignored.
Fearing it was a strange asp.net issue I built a basic HTM page and still nothing. I am mainly trying to use the API to capture the fact that the video ended and maybe just keep track of where the video is so a user could restart where they left off.
<html>
<head>
<script type="text/javascript">
var player;
var video, content, exp, menu, ads, social;
var videoList;
function onTemplateLoaded(experienceID) {
alert("onTemplateLoaded");
video = player.getModule(APIModules.VIDEO_PLAYER);
exp = player.getModule(APIModules.EXPERIENCE);
exp.addEventListener(BCExperienceEvent.TEMPLATE_RE ADY, onTemplateReady);
video.addEventListener(BCVideoEvent.VIDEO_COMPLETE , onVideoComplete);
}
function onTemplateReady(e) {
alert("onTemplateReady");
}
function onVideoComplete(e) {
alert("onVideoComplete")
}
</script>
</head>
<body>
<!-- Start of Brightcove Player -->
<div style="display:none">
</div>
<!--
By use of this code snippet, I agree to the Brightcove Publisher T and C
found at https://accounts.brightcove.com/en/terms-and-condi tions/.
-->
<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperienc es.js"></script>
<script type="text/javascript" src="http://admin.brightcove.com/js/APIModules_all.js"></script>
<object id="myExperience1533035056001" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="480" />
<param name="height" value="270" />
<param name="playerID" value="1386786377001" />
<param name="playerKey" value="AQ~~,AAABQuUYCTk~,-ndnvKvL5fyVXxLM_ehPKEv0p 4cxoSeV" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="@videoPlayer" value="1533035056001" />
</object>
<!--
This script tag will cause the Brightcove Players defined above it to be created as soon
as the line is read by the browser. If you wish to have the player instantiated only after
the rest of the HTML is processed and the page load is complete, remove the line.
-->
<script type="text/javascript">
brightcove.createExperiences();
</script>
<!-- End of Brightcove Player -->
</body>
</html>
What am I missing? Probably something very silly.
03-28-2012 08:37 AM
I am using the basic Chromeless player if that helps. I don't seem to be able to change it or even know if it publishes using the API checked option. I suspect this is my issue.
03-28-2012 11:12 AM
Hello,
Have you double checked that within the Player Settings you have enabled APIs?
Thanks
03-28-2012 11:19 AM
It sounds like you haven't turned on the API for this player in the Publishing module.
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.
