I want to set up VideoJS to handle RTMP streaming using VideoJS-SWF player as flash-fallback, which does seem to have some support for it.
This is how I'd set up VideoJS for normal MP4 videos:
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(); });
});
But how do you set up VideoJS to play an RTMP stream? Do you use the same tags, or is there some other way to specify the RTMP provider and stream url?