我想知道如何检测视频播放器何时加载。基本上我想隐藏包含 videoPlayer 的选择器并在播放器加载时显示它......
这个我试过了。。
$(playerIDDiv).append('<div id="playerH" style="display:none"><object id="homesPlayer" class="BrightcoveExperience"><param name="bgcolor" value="#000" /><param name="width" value="480" /><param name="height" value="333" /><param name="playerID" value="'+playerID+'" /><param name="playerKey" value="'+playerKey+'" /><param name="isVid" value="true" /><param name="isUI" value="true" /><param name="dynamicStreaming" value="true" /><param name="wmode" value="opaque" /><param name="templateLoadHandler" value="myTemplateLoaded"><param name="includeAPI" value="true" /></object></div>');
brightcove.createExperiences();
function myTemplateLoaded(experienceID) {
player = brightcove.api.getExperience(experienceID);
modVP = player.getModule(brightcove.api.modules.APIModules.VIDEO_PLAYER);
modExp = player.getModule(brightcove.api.modules.APIModules.EXPERIENCE);
modCon = player.getModule(brightcove.api.modules.APIModules.CONTENT);
modExp.addEventListener(brightcove.api.events.ExperienceEvent.TEMPLATE_READY, onTemplateReady);
}
function onTemplateReady(evt) {
$('#playerH').show('slow');
}
它根本不起作用