我试图在加载我的 html 对象(视频)时显示一些文本。曾经有一个备用属性,但现在已弃用。我在加载对象时无法显示这个简单的单词。发生的情况是在单击时,单词 Loading 变得可见,然后在对象加载时消失。有人知道快速解决方案吗?
HTML:
<div id="vidcontainer" class="half-embed" >
<div id="loading" style="text-align:center; color: lightgray; position: absolute; z-index:-1;width: 480px; height: 300px;">LOADING ...</div>
<img src="images/vidoverlay.jpg" style="cursor:pointer; width: 480px; height: 300px; opacity: .7; " />
</div>
CSS:
.half-embed
{
display:inline;
float:right;
position:relative;
margin-right:-260px;
margin-left:15px;
padding:15px 0px;
}
jQuery:
$('#vidcontainer').click(function() {
$('#vidcontainer img').fadeOut('slow');
$('#vidcontainer').html("<object id='openingVideo' class='BrightcoveExperience'><param name='bgcolor' value='#FFFFFF' /><param name='width' value='480' /><param name='height' value='300' /><param name='playerID' value='xxx' /><param name='playerKey' value='xxx' /><param name='isVid' value='true' /><param name='isUI' value='true' /><param name='dynamicStreaming' value='true' /><param name='autoStart' value='true' /><param name='@videoPlayer' value='xxx' /></object>");
brightcove.createExperiences();
});