3

VideoJS-SWF プレーヤーをフラッシュ フォールバックとして使用して RTMP ストリーミングを処理するように VideoJS をセットアップしたいと考えています。

これは、通常の MP4 ビデオ用に VideoJS をセットアップする方法です。

var tag = document.createElement("video");
tag.id = "vid1";
tag.controls = true;
tag.className = "video-js";
tag.preload = "auto";
tag.width = "640";
tag.height = "264";
tag.poster = "http://video-js.zencoder.com/oceans-clip.png";

var source1 = document.createElement("source");
source1.src = "http://video-js.zencoder.com/oceans-clip.mp4";
source1.type = "video/mp4";
tag.appendChild(source1);

// Add more sources, etc...

document.getElementById('player').appendChild(tag);

var player = _V_(tag, {width:640, height:264, techOrder:['flash', 'html5']}, function() {
    var that = this;
    this.addEvent('loadstart', function { that.play(); });
});

しかし、RTMP ストリームを再生するように VideoJS を設定するにはどうすればよいでしょうか? 同じタグを使用していますか、それとも RTMP プロバイダーとストリーム URL を指定する別の方法がありますか?

4

1 に答える 1

1

参考までに - RTMP ストリーミングは VideoJS ではまだ利用できませんが、最近の変更 ( https://github.com/videojs/video.js/pull/605など) は、間もなく利用可能になることを示しています。

更新については、 https://github.com/videojs/video.js/issues/559の機能リクエストに注意してください。

于 2013-07-02T18:10:38.857 に答える