用videojs播放.swf文件

时间:2017-02-24 00:07:19

标签: video.js

我正在尝试使用Videojs播放.swf文件,但收到无法加载媒体或服务器或网络失败的消息,或者因为格式不受支持。这是我的代码:

    <link href="/html/js/video/videojs/video-js-5.17.0/video-js.css" rel="stylesheet">
<script type="text/javascript" src="/html/js/video/videojs/video-js-5.17.0/video.min.js"></script>
<script>videojs.options.flash.swf = "/html/js/vendor/video-js-swf-5.3.0/dist/video-js.swf"</script>

<div style="display:block; margin-top: [[margin_top]]px; color: #fff; border:none;">
    <video id="vidojs-player-swf"
           class="video-js vjs-default-skin vjs-big-play-centered"
           controls
           preload="auto"
           width="[[width]]"
           height="[[height]]"
           data-setup="{}">
        <source src="/path/to/swf/file" type="video/x-flv"></source>

        <p class="vjs-no-js">
            To view this video please enable JavaScript, and consider upgrading to a
            web browser that
            <a href="http://videojs.com/html5-video-support/" target="_blank">
                supports HTML5 video
            </a>
        </p>
    </video>
</div>

0 个答案:

没有答案