I'm implementing a custom player for a project. I first thought it could be some of changes I made ( which were minor ) but all players seem to be failing when rendering the HTML version. Does anyone one have any experience with getting this up and running, this is my first time working with BrightCove. Here is my code. The player is in a modal that sites at the bottom of the page and the reference ID is grabbed dynamically to load up the video once the modal is opened.
HTML
<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>
<object id="myExperience" class="BrightcoveExperience">
<param name="bgcolor" value="0x01000000" />
<param name="width" value="602" />
<param name="height" value="451" />
<param name="playerID" value="2346987014001" />
<param name="playerKey" value="AQ~~,AAAACNNhjOE~,7GG4lXihTUWE4HZdWRznisBnhfUh1o33" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="includeAPI" value="true" />
<param name="forceHTML" value="true" />
<param name="templateLoadHandler" value="onTemplateLoad" />
</object>
<script type="text/javascript">brightcove.createExperiences();
</script>
<script language="JavaScript" type="text/javascript">
var player, modVP, expMod;
function onTemplateLoad(experienceID) {
player = brightcove.api.getExperience(experienceID);
modVP = player.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
}
</script>
JS
var waitForModVp = function () {
if( typeof modVP == 'object' ) {
modVP.loadVideoByReferenceID(newSrc);
$(window).on('resize.size-video', function(){
expMod = player.getModule(brightcove.api.modules.APIModules.EXPERIENCE);
var width = window.innerWidth*0.8,
height = (window.innerWidth*0.8)*0.7491694352;
if (width < 610) {
expMod.setSize(width, height);
$('.fullscreen-interior-video').css({
'width' : width+'px',
'height' : height+'px'
});
}
})
} else {
window.setTimeout( waitForModVp, 250 );
}
}
if ( thisData.templateReference == "brightcovePlayer") {
waitForModVp();
}
Any help will be greatly appreciated, Thanks.
This seems to be the issue:
<param name="bgcolor" value="0x01000000" />
Changed to:
<param name="bgcolor" value="#000000" />
The player is now working across all platforms.