0

我有一个使用固定大小的 Flash 播放器播放的 Flash 视频库。我想使用 mediaelementjs 至少有一个播放器,我可以在其中选择大小 - 以添加响应大小和移动播放选项作为后期阶段。

我已将网站上的示例最小化为此,但它根本不播放示例文件。

<html>
    <head>
        <code>
            <script src="mediaelementjs/jquery.js"></script>
            <script src="mediaelementjs/mediaelement-and-player.min.js"></script>
            <link rel="stylesheet" href="mediaelementjs/mediaelementplayer.css" />
        </code>
    </head>
    <body>

        <div class="myvids" id="viddivap1" width="50%" style="width:100%;position:relative;">
        <video width="320" height="240" controls="controls" preload="none" style="max-width:100%;height:100%;">
            <!-- Flash fallback for non-HTML5 browsers without JavaScript -->
            <object width="320" height="240" type="application/x-shockwave-flash" data="mediaelementjs/flashmediaelement.swf">
                <param name="movie" value="mediaelementjs/flashmediaelement.swf" />
                <param name="flashvars" value="controls=true&file=echo-hereweare.mp4" />
                <!-- Image as a last resort -->
                <img src="myvideo.jpg" width="320" height="240" title="No video playback capabilities" />
            </object>
        </video>
        </div>

    </body>

</html>
4

1 回答 1

1

您的示例缺少“源”标签:

<html>
    <head>
        <code>
            <script src="mediaelementjs/jquery.js"></script>
            <script src="mediaelementjs/mediaelement-and-player.min.js"></script>
            <link rel="stylesheet" href="mediaelementjs/mediaelementplayer.css" />
        </code>
    </head>
    <body>
        <div class="myvids" id="viddivap1" width="50%" style="width:100%;position:relative;">
        <video width="320" height="240" controls="controls" preload="none" style="max-width:100%;height:100%;">
            <source type="video/mp4" src="echo-hereweare.mp4" />
            <!-- Flash fallback for non-HTML5 browsers without JavaScript -->
            <object width="320" height="240" type="application/x-shockwave-flash" data="mediaelementjs/flashmediaelement.swf">
                <param name="movie" value="mediaelementjs/flashmediaelement.swf" />
                <param name="flashvars" value="controls=true&file=echo-hereweare.mp4" />
                <!-- Image as a last resort -->
                <img src="myvideo.jpg" width="320" height="240" title="No video playback capabilities" />
            </object>
        </video>
        </div>
    </body>
</html>
于 2012-10-01T11:36:58.447 回答