控件(播放暂停按钮)不会显示在视频中。
问题描述:
我的代码如下。控件(播放暂停按钮)不会显示在视频中。
的Html部分
<div id="div_video">
<div class="div_vol">
<a href="#" onclick="sound_adjustment()"><img id="sound_img" src="<?=bloginfo('template_url')?>/images/muted.png"></a>
</div>
<img style="margin-left: 100px; margin-top: 40px" id="loading_vidio" src="<?php bloginfo('template_url')?>/images/video_loading.gif"/>
<video height="341" width="620" poster="<?php bloginfo('template_url')?>/images/video.png" id="banner_advideo">
<source type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' src="<?php bloginfo('template_url')?>/video/<?php echo $videoname?>" />
</video>
<div class="videoPunch"><h2>Making froth at a touch of a button couldn't be easier.</h2></div>
</div>
的Javascript部分
var me=new MediaElement('banner_advideo', {
// shows debug errors on screen
enablePluginDebug: false,
// remove or reorder to change plugin priority
plugins: ['flash'],
// specify to force MediaElement to use a particular video or audio type
features: ['playpause','progress','current','duration','tracks','volume','fullscreen'],
success: function (mediaElement, domObject) {
// call the play method
$('#loading_vidio').show();
$('#div_video').show();
mediaElement.addEventListener('loadeddata', function(e) {
$('#loading_vidio').hide();
}, false);
mediaElement.play();
mediaElement.setMuted(true);
},
// fires when a problem is detected
error: function() {
}
});
现在我的控件(播放暂停按钮)没有在我的视频。我读了2个类似的问题和答案,但我没有从中得到解决方案。
有人可以告诉我这可能是什么问题?
答
控件是MediaElementPlayer对象的属性。所以我做了它的对象,所以它现在以适当的方式显示所有的控制。