Cannot get FMS to produce DVR stream
I have FMS 3.5 (Dev. Edition) and I'm trying to get it to add DVR features to an existing feed on another server (that I do not control). I've created the following application on the server:
var nc = new NetConnection();
var localStream = Stream.get("dvr-148");
nc.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success" && nc.isConnected) {
trace("We are connected");
playVideo();
}
}
nc.connect("rtmp://127.0.0.1:1934/live/");
function playVideo() {
localStream.record("record");
localStream.play("camera-148.stream", 0, -1, true, nc);
}
Basically, load the stream, record it, and play it. From what I've read, this should give me the ability in the client to use DVR-like features on the stream.
In my client I have the following code:
nsPlayer = new NetStream(nc);
nsPlayer.client = this;
nsPlayer.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nsPlayer.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
nsPlayer.play("dvr-148", 0, -1);
The issue is, when I run this code, I get a "StreamNotFound", if i change the "0" to a "-1" in the play() call, I get the stream (as a live feed) but cannot seek() in this stream.
I know I'm missing something obvious, but I cannot figure it out. Any help would be appreciated.
-pete
