In this walkthrough you will:

Figure 2. Completed DVR-enabled video publisher
Set the Document class property to the following (see Figure 3):
com.realeyes.dvr.FlashConsumerPublisher

Figure 3. Setting the Document class property
In the FlashConsumerPublisher class, locate the following comment:
// Declare connection path and video ID
Declare a public String property named connURI and set it equal to the rtmp:// path to the dvr application on your
server:
// Declare connection path and video ID
public var connURI:String = "rtmp://{your server}/dvr";
Declare the public String property vidID and set it equal
to "myDVR":
// Declare connection path and video ID
public var connURI:String = "rtmp://{your server}/dvr";
public var vidID:String = "myDVR";
Open the VideoPublisher.as file in the {start files}/DVR-FlashConsumerPublisher/com/realeyes/dvr/ directory and locate the following comment that begins:
//Attach cam
attachCamera() method
on the _ns NetStream object and pass it the cam variable:
//Attach cam, audio, and publish, also display in video for monitoring _ns.attachCamera( cam );
Attach
the sound by calling the attachAudio() method on the _ns NetStream object and pass it the result of the call to Microphone.getMicrophone():
//Attach cam, audio, and publish, also display in video for monitoring _ns.attachCamera( cam ); _ns.attachAudio( Microphone.getMicrophone() );
Call the publish() method on the _ns method and pass it the vidID property as the
first parameter and the String "record" as the second
parameter:
//Attach cam, audio, and publish, also display in video for monitoring _ns.attachCamera( cam ); _ns.attachAudio( Microphone.getMicrophone() ); _ns.publish( vidID, "record");
To
complete the _onPublish() method, call the attachCamera() method
on the publisherVideo Video object and pass it the cam variable as its only parameter:
//Attach cam, audio, and publish, also display in video for monitoring _ns.attachCamera( cam ); _ns.attachAudio( Microphone.getMicrophone() ); _ns.publish( vidID, "record"); publisherVideo.attachCamera( cam );
Now you have created the functionality to publish your video to the server and record it. Next, you need to create the functionality for consuming video that has been DVR-enabled. Once you are done with the next walkthrough, you will be able to play back the DVR-enabled video.