1

私は現在 JWplayer 6 を使用していますが、JWPlayer 5 と 6 には構成の「違い」があると考えました。

JWPlayer 6 のプライマリとフォールバックを設定する方法を知っている人はいますか?

スクリプトを次のように設定しました。

out.println("<div id=\"myElement\">Loading the player...</div>");
out.println("<script type=\"text/javascript\">");
out.println("jwplayer(\"myElement\").setup({");
out.println("sources:[");
out.println("{'file': \"rtmp://s2y3u5i4t1fkbz.cloudfront.net:1935/cfx/st/mp4:XXXXX.mp4\"},");
out.println("{'file': \"http://dkgitv33rxgy.cloudfront.net/XXXXX.mp4\"},");
out.println("],");
out.println("width: \"720\",");
out.println("height: \"480\"");
out.println("});");
out.println("</script>");

パソコンのブラウザでホームページを確認すると表示されません。ただし、iPhoneを使用した場合は表示されます。http をコメントアウトすると、ブラウザはビデオを表示できますが、iPhone は表示できません。rtmp をコメントアウトすると、iPhone でビデオを表示できます。しかし、プライマリとしてストリーム サポートが必要でした。

誰かが以前にこの問題を抱えていましたか?

ありがとう

編集: 'primary':'flash' を幅 720 の直前と ] の直後に使用します (角括弧を閉じます)。PC とハンドヘルド デバイスの両方のストリームと HTML で動作します。

4

1 に答える 1

2

これを試してみてください。JwPlayer 6.3 で動作します。

        jwplayer("<?php echo $this->id?>").setup({

                autostart: 'true' ,
                flashplayer: "<?php echo CHtml::asset($this->_path.'/jwplayer.flash.swf')?>",
                width:<?php echo $this->width?>,
                height:<?php echo $this->height?>,
                playlist: [{
                    sources: [
                    {
                       //Desktop: Use RTMP protocol and played by flash.
                        file: "<?php echo $this->rtmpPath;?>"
                    },
                    {
                        //Mobile: Use HLS protocol and played by HTML5
                        file: "<?php echo $this->hlsPath;?>",
                    }
                    ]
                }],
                primary:"flash",
            });

参照: 直接ダウンロードへのフォールバック

于 2013-06-04T15:36:59.043 に答える