onTimeCoordInfo not found Error while doing DVR
While streaming the DVR i get the following error "ReferenceError: Error #1069: Property onTimeCoordInfo not found on dvrlive and there is no default value." here i have attached the code i did am i want to do anything more? i didnt use any server side code. Any help appreciated thanks in advance.
DVR publishing script
public function DVR():void
{
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.connect("rtmp://192.168.172.111/dvr");
}
private function onNetStatus(event:NetStatusEvent):void{
trace(event.info.code);
switch(event.info.code){
case "NetConnection.Connect.Success":
publishCamera();
displayPublishingVideo();
break;
}
}
private function displayPublishingVideo():void {
vid = new Video(cam.width, cam.height);
vid1.x = 10;
vid1.y = 10;
vid.attachCamera(cam);
vid1.width=cam.width;
vid1.height=cam.height;
vid1.addChild(vid);
this.addChild(vid1);
}
private function publishCamera():void {
cam = Camera.getCamera();
mic = Microphone.getMicrophone();
ns = new NetStream(nc);
ns.client = this;
ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
ns.attachCamera(cam);
ns.attachAudio(mic);
// Publish the stream to the server
ns.publish("video", "record");
}
Streaming side
public function DVR():void
{
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nc.connect("rtmp://192.168.172.111/dvr");
}
private function onNetStatus(event:NetStatusEvent):void{
trace(event.info.code);
switch(event.info.code){
case "NetConnection.Connect.Success":
displayVideoPlay();
break;
}
}
public function onMetaData(info:Object):void {
trace("metadata:duration = " + info.duration);
stamp = getTimer();
trace("stamp: " + stamp);
duration = info.duration;
}
private function displayVideoPlay():void
{
nsPlayer = new NetStream(nc);
nsPlayer.client = this;
nsPlayer.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
nsPlayer.play("video", 0, -1);
vidPlayer = new Video(200,150);
vidPlayer.attachNetStream(nsPlayer);
vidPlay1.width=200;
vidPlay1.height=100;
vidPlay1.x=350;
vidPlay1.addChild(vidPlayer);
this.addChild(vidPlay1);
}
