隐藏媒体元素jquery的控件

时间:2016-07-04 00:15:54

标签: javascript jquery mediaelement.js

有没有办法隐藏媒体元素jquery的控件? 我只想使用圆形按钮。 我的代码如

    <video width="100%" height="760" id="player2" poster="video/loader.jpg"  preload="none" style="width: 100%; height: 100%;" data-mejsoptions='{"alwaysShowControls": false}'>
        <!-- MP4 source must come first for iOS -->
        <source type="video/mp4" src="video/inspiration-1.mp4" />
        <!-- WebM for Firefox 4 and Opera -->
        <source type="video/webm" src="../media/echo-hereweare.webm" />
        <!-- OGG for Firefox 3 -->
        <source type="video/ogg" src="../media/echo-hereweare.ogv" />
        <!-- Fallback flash player for no-HTML5 browsers with JavaScript turned off -->
        <object width="100%" height="760" type="application/x-shockwave-flash" data="../build/flashmediaelement.swf">       
        <param name="movie" value="css.video/flashmediaelement.swf" /> 
        <param name="flashvars" value="controls=true&amp;file=video/inspiration-1.mp4" />       
        <!-- Image fall back for non-HTML5 browser with JavaScript turned off and no Flash player installed -->
        <img src="img/loader.jpg" width="100%" height="360" alt="Here we are"                           title="No video playback capabilities" />
        </object>   
   </video>
<script>

$('audio,video').mediaelementplayer({
    //mode: 'shim',
    success: function(player, node) {
        $('#' + node.id + '-mode').html('mode: ' + player.pluginType);
    }
});

</script>

这段代码对我有用,控制器仍然显示出来。如何摆脱它?

1 个答案:

答案 0 :(得分:0)

从最简单的表单开始,然后从那里添加以查看问题出现的位置。只需使用纯HTML并确保您使用HTML5(<!DOCTYPE html>

<video src='video/inspiration-1.mp4' poster="video/loader.jpg" preload="none"></video>