使用mp4的Jplayer视频不适用于Opera / FF / IE中的闪回后退

时间:2013-01-23 07:03:53

标签: html5 flash video jplayer

我的网站上的视频存在此问题,您可以在此链接中看到: http://video.resursecrestine.ro/predici/103445/nastere-din-nou-credinta-dragoste-in-aceasta-ordine

它在Chrome中工作得很好,但在其他任何浏览器中都没有。我知道Chrome对mp4有原生的HTML5支持,但其他浏览器应该回退到闪存而不是。

以下是我正在使用的代码:

<script type="text/javascript">
    //<![CDATA[
    $(document).ready(function(){

        $("#jquery_jplayer_1").jPlayer({
            ready: function () {
                $(this).jPlayer("setMedia", {
                    m4v: "http://www.resursecrestine.ro/download/41293"
                });
            },
            swfPath: "js",
            supplied: "m4v",
            size: {
                width: "580px",
                height: "360px",
                cssClass: "jp-video-360p"
            }
        });
    });
    //]]>
</script>
<div id="jp_container_1" class="jp-video jp-video-360p">
    <div class="jp-type-single">
        <div id="jquery_jplayer_1" class="jp-jplayer"></div>
        <div class="jp-gui">
            <div class="jp-video-play">
                <a href="javascript:;" class="jp-video-play-icon" tabindex="1">play</a>
            </div>
            <div class="jp-interface">
                <div class="jp-progress">
                    <div class="jp-seek-bar">
                        <div class="jp-play-bar"></div>
                    </div>
                </div>
                <div class="jp-current-time"></div>
                <div class="jp-duration"></div>
                <div class="jp-controls-holder">
                    <ul class="jp-controls">
                        <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
                        <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
                        <li><a href="javascript:;" class="jp-stop" tabindex="1">stop</a></li>
                        <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
                        <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
                        <li><a href="javascript:;" class="jp-volume-max" tabindex="1" title="max volume">max volume</a></li>
                    </ul>
                    <div class="jp-volume-bar">
                        <div class="jp-volume-bar-value"></div>
                    </div>
                    <ul class="jp-toggles">
                        <li><a href="javascript:;" class="jp-full-screen" tabindex="1" title="full screen">full screen</a></li>
                        <li><a href="javascript:;" class="jp-restore-screen" tabindex="1" title="restore screen">restore screen</a></li>
                        <li><a href="javascript:;" class="jp-repeat" tabindex="1" title="repeat">repeat</a></li>
                        <li><a href="javascript:;" class="jp-repeat-off" tabindex="1" title="repeat off">repeat off</a></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="jp-no-solution">
            <span>Update Required</span>
            To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
        </div>
    </div>
</div>
你能告诉我吗?

2 个答案:

答案 0 :(得分:0)

您的服务器看起来像是使用text/plain MIME类型而不是video/mp4发送视频。根据{{​​3}},这是导致仅影响Firefox和Opera的问题的常见原因。

答案 1 :(得分:0)

我在使用闪存解决方案时遇到了类似的问题。确保您的元数据位于视频的开头。为此,您可以使用此免费工具:

http://rndware.info/products/metadata-mover.html