0
我的代碼如下。控件(播放暫停按鈕)不會顯示在視頻中。
的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個類似的問題和答案,但我沒有從中得到解決方案。
有人可以告訴我這可能是什麼問題?