NetStream class
105
If the specified stream contains only audio data, passing a value of
false
to this method stops
NetStream.time
from further incrementing.
See also
NetStream.receiveVideo()
,
NetStream.time
NetStream.receiveVideo()
Availability
■
Flash Player 6.
■
Flash Communication Server MX 1.0.
Usage
public receiveVideo(
receive
: Boolean
| FPS
: Number) : Void
Parameters
receive
A Boolean value that specifies whether incoming video plays on the specified
stream (
true
) or not (
false
). The default value is
true
.
FPS
A number that specifies the frame rate per second of the incoming video. The default
rate is the frame rate of the FLV file or live stream being played.
Returns
Nothing.
Description
Method; specifies whether incoming video will play on the specified stream, or specifies the
frame rate of the video. 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
presses to show or hide the incoming video stream.
To stop receiving video, pass 0 for
FPS
. (This has the same effect as passing
false
.) To
determine the current frame rate, use
NetStream.currentFps
.
If you call
NetStream.receiveVideo()
with a frame rate after calling
NetStream.receiveVideo(false)
, an implicit call to
NetStream.receiveVideo(true)
is issued.
If the specified stream contains only video data, then passing a value of
false
to this method
stops
NetStream.time
from further incrementing.