
76
Example
The following example shows how to publish and record a video, and then play it back.
connection = new NetConnection();
connection.connect("rtmp://myServer.myDomain.com/appName/appInstance");
srcStream = new NetStream(connection);
srcStream.publish("stephen", "record");
srcStream.attachVideo(Camera.get());
// To stop publishing and recording
srcStream.publish(false);
// To play the recorded stream
srcStream.play("stephen");
See also
NetConnection.connect, NetStream.play, Video.attachVideo
NetStream.receiveAudio
Availability
• Flash Player 6.
• Flash Communication Server MX.
Usage
myStream.receiveAudio(receive)
Parameters
receive A Boolean value that specifies whether incoming audio plays on the specified stream
(
true) or not (false). The default value is true.
Returns
Nothing.
Description
Method; specifies whether incoming audio plays on the specified stream. This method is available
only to clients subscribed to the specified stream, not to the stream’s publisher.
You can call this method before or after you call the
NetStream.play method and actually begin
receiving the stream. For example, you can attach these methods to a button the user clicks to
mute and unmute the incoming audio stream.
See also
NetStream.receiveVideo
NetStream.receiveVideo
Availability
• Flash Player 6.
• Flash Communication Server MX.
Usage
myStream.receiveVideo(receive | FPS)
Comentários a estes Manuais