Adobe® AIR® API Reference for HTML Developers
Home  |  Show Classes List |  Index  |  Appendixes

Language Reference only       
VideoStreamSettings 
3D:
Context3D
Context3DBlendFactor
Context3DClearMask
Context3DCompareMode
Context3DProgramType
Context3DRenderMode
Context3DStencilAction
Context3DTextureFormat
Context3DTriangleFace
Context3DVertexBufferFormat
CubeTexture
IndexBuffer3D
Program3D
Stage3D
Texture
VertexBuffer3D
Air.net:
ServiceMonitor
SocketMonitor
URLMonitor
Air.update:
ApplicationUpdater
ApplicationUpdaterUI
DownloadErrorEvent
StatusFileUpdateErrorEvent
StatusFileUpdateEvent
StatusUpdateErrorEvent
StatusUpdateEvent
UpdateEvent
Data:
EncryptedLocalStore
SQLCollationType
SQLColumnNameStyle
SQLColumnSchema
SQLConnection
SQLError
SQLErrorEvent
SQLErrorOperation
SQLEvent
SQLIndexSchema
SQLMode
SQLResult
SQLSchema
SQLSchemaResult
SQLStatement
SQLTableSchema
SQLTransactionLockType
SQLTriggerSchema
SQLUpdateEvent
SQLViewSchema
Desktop:
Clipboard
ClipboardFormats
ClipboardTransferMode
DockIcon
Icon
InteractiveIcon
NativeApplication
NativeProcess
NativeProcessStartupInfo
NotificationType
SystemTrayIcon
Display:
BitmapData
NativeMenu
NativeMenuItem
Screen
Stage
StageDisplayState
StageQuality
Events:
ActivityEvent
AsyncErrorEvent
BrowserInvokeEvent
DataEvent
DatagramSocketDataEvent
DNSResolverEvent
DRMAuthenticateEvent
DRMStatusEvent
ErrorEvent
Event
EventDispatcher
FileListEvent
HTTPStatusEvent
InvokeEvent
InvokeEventReason
IOErrorEvent
LocationChangeEvent
MouseEvent
NativeProcessExitEvent
NetDataEvent
NetMonitorEvent
NetStatusEvent
OutputProgressEvent
ProgressEvent
SampleDataEvent
SecurityErrorEvent
ServerSocketConnectEvent
StatusEvent
StorageVolumeChangeEvent
TimerEvent
UncaughtErrorEvent
UncaughtErrorEvents
File:
File
FileMode
FileStream
StorageVolume
StorageVolumeInfo
Functions:
trace()
generateRandomBytes()
navigateToURL()
sendToURL()
Geom:
Matrix
Point
Rectangle
Media:
AudioDecoder
AudioPlaybackMode
H264Level
H264Profile
H264VideoStreamSettings
ID3Info
InputMediaStream
Microphone
MicrophoneEnhancedMode
MicrophoneEnhancedOptions
Sound
SoundChannel
SoundCodec
SoundLoaderContext
SoundMixer
SoundTransform
VideoCodec
VideoStatus
VideoStreamSettings
Native window:
NativeWindow
NativeWindowBoundsEvent
NativeWindowDisplayState
NativeWindowDisplayStateEvent
NativeWindowInitOptions
NativeWindowRenderMode
NativeWindowResize
NativeWindowSystemChrome
NativeWindowType
Net:
AAAARecord
ARecord
CertificateStatus
DatagramSocket
DNSResolver
FileFilter
InterfaceAddress
IPVersion
LocalConnection
MXRecord
NetConnection
NetMonitor
NetStreamAppendBytesAction
NetStreamMulticastInfo
NetworkInfo
NetworkInterface
ObjectEncoding
PTRRecord
ResourceRecord
Responder
SecureSocket
ServerSocket
SharedObject
SharedObjectFlushStatus
Socket
SRVRecord
URLLoader
URLLoaderDataFormat
URLRequest
URLRequestDefaults
URLRequestHeader
URLRequestMethod
URLStream
URLVariables
XMLSocket
Security:
ReferencesValidationSetting
RevocationCheckSettings
SignatureStatus
SignerTrustSettings
X500DistinguishedName
X509Certificate
XMLSignatureValidator
System:
Capabilities
Security
System
Updater
Ui:
Keyboard
KeyboardType
KeyLocation
Mouse
MouseCursorData
Utils:
Vector
ByteArray
Collator
CollatorMode
CompressionAlgorithm
CurrencyFormatter
CurrencyParseResult
DateTimeFormatter
DateTimeNameContext
DateTimeNameStyle
DateTimeStyle
Endian
HTMLLoader
HTMLPDFCapability
LastOperationStatus
LocaleID
NationalDigitsType
NumberFormatter
NumberParseResult
StringTools
Timer
window.runtime propertywindow.runtime.flash.media.VideoStreamSettings
InheritanceVideoStreamSettings Inheritance Object

Runtime Versions:  3

The VideoStreamSettings class enables specifying video compression settings for each NetStream. All parameters (resolution, frame rate, bandwidth, etc.) are gated by Camera capture parameters. You can use methods (setMode(), etc.) to specify desired encoder parameters and you can use the properties (width, etc.) to retrieve the actual compression parameters used. Properties will be validated once Camera is attached to NetStream object and compression has started.

Note Current implementation does not support setting properties per NetStream and Camera parameters will be used instead for each publishing NetStream.



Properties
 PropertyDefined By
  bandwidth : int
[read-only] Retrieve the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second.
VideoStreamSettings
  codec : String
[read-only] Video codec used for compression.
VideoStreamSettings
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  fps : Number
[read-only] The maximum frame rate at which the video frames are encoded, in frames per second.
VideoStreamSettings
  height : int
[read-only] The current encoded height, in pixels.
VideoStreamSettings
  keyFrameInterval : int
[read-only] The number of video frames transmitted in full (called keyframes or IDR frames) instead of being interpolated by the video compression algorithm.
VideoStreamSettings
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  quality : int
[read-only] The required level of picture quality, as determined by the amount of compression being applied to each video frame.
VideoStreamSettings
  width : int
[read-only] The current encoded width, in pixels.
VideoStreamSettings
Public Methods
 MethodDefined By
  
Creates a setting object that specifies to use Sorenson Spark video codec for compresion.
VideoStreamSettings
 Inherited
hasOwnProperty(name:String):Boolean
Indicates whether an object has a specified property defined.
Object
 Inherited
isPrototypeOf(theClass:Object):Boolean
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
propertyIsEnumerable(name:String):Boolean
Indicates whether the specified property exists and is enumerable.
Object
  
setKeyFrameInterval(keyFrameInterval:int):void
The number of video frames transmitted in full (called keyframes or Instantaneous Decoding Refresh (IDR) frames) instead of being interpolated by the video compression algorithm.
VideoStreamSettings
  
setMode(width:int, height:int, fps:Number):void
Sets the resolution and frame rate used for video encoding.
VideoStreamSettings
 Inherited
setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void
Sets the availability of a dynamic property for loop operations.
Object
  
setQuality(bandwidth:int, quality:int):void
Sets maximum amount of bandwidth per second or the required picture quality that the current outgoing video feed can use.
VideoStreamSettings
 Inherited
toLocaleString():String
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
toString():String
Returns the string representation of the specified object.
Object
 Inherited
valueOf():Object
Returns the primitive value of the specified object.
Object
Property Detail

bandwidth

property
bandwidth:int  [read-only]

Runtime Versions:  3

Retrieve the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second. To set this property, use the setQuality() method.

See also

codec

property 
codec:String  [read-only]

Runtime Versions:  3

Video codec used for compression.

fps

property 
fps:Number  [read-only]

Runtime Versions:  3

The maximum frame rate at which the video frames are encoded, in frames per second. To set a desired value for this property, use the setMode() method. This value is validated once Camera is attached to NetStream.

See also

height

property 
height:int  [read-only]

Runtime Versions:  3

The current encoded height, in pixels. To set a desired value for this property, use the setMode() method. This value is validated once Camera is attached to NetStream and compression has started.

See also

keyFrameInterval

property 
keyFrameInterval:int  [read-only]

Runtime Versions:  3

The number of video frames transmitted in full (called keyframes or IDR frames) instead of being interpolated by the video compression algorithm. To set a value for this property, use the setKeyFrameInterval() method.

quality

property 
quality:int  [read-only]

Runtime Versions:  3

The required level of picture quality, as determined by the amount of compression being applied to each video frame. This value ranges from 1 (lowest quality, maximum compression) to 100 (highest quality, small compression). To set this property, use the setQuality() method.

See also

width

property 
width:int  [read-only]

Runtime Versions:  3

The current encoded width, in pixels. To set a desired value for this property, use the setMode() method. This value is validated once Camera is attached to NetStream and compression has started.

See also

Constructor Detail

VideoStreamSettings

()Constructor
public function VideoStreamSettings()

Runtime Versions:  3

Creates a setting object that specifies to use Sorenson Spark video codec for compresion.

Method Detail

setKeyFrameInterval

()method
public function setKeyFrameInterval(keyFrameInterval:int):void

Runtime Versions:  3

The number of video frames transmitted in full (called keyframes or Instantaneous Decoding Refresh (IDR) frames) instead of being interpolated by the video compression algorithm. The default value is 15, which means that every 15th frame is a keyframe. A value of 1 means that every frame is a keyframe. The allowed values are 1 through 300. Set to -1 to use the same value as specified for Camera object. This value is capped by Camera value.

Note This feature will be supported in future releases of Flash Player and AIR, for now, Camera parameters are used.

Parameters

keyFrameInterval:int — A value that specifies which video frames are transmitted in full (as keyframes or IDR frames) instead of being interpolated by the video compression algorithm.

setMode

()method 
public function setMode(width:int, height:int, fps:Number):void

Runtime Versions:  3

Sets the resolution and frame rate used for video encoding. Set each parameter to -1 to use same encoding value as capture value. Encoding values must be less than equal than capture values specified on Camera object. If invalid values are specified, capture values will be used. Currently, only integer downsampling is supported for both resolution and frame rate. Captured video is downsampled to desired resolution and frame rate. The specified values are validated once Camera is attached to NetStream. You can use width, height and fps properties to retrieve actual compressed width, height and frame rate, respectively.

Note This feature will be supported in future releases of Flash Player and AIR, for now, Camera parameters are used.

Parameters

width:int — The requested encode width, in pixels. The default value is -1 (same as capture width).
 
height:int — The requested encode height, in pixels. The default value is -1 (same as capture height).
 
fps:Number — The requested frame rate at which frames should be encoded, in frames per second. The default value is -1 (same as capture fps).

See also

setQuality

()method 
public function setQuality(bandwidth:int, quality:int):void

Runtime Versions:  3

Sets maximum amount of bandwidth per second or the required picture quality that the current outgoing video feed can use. To specify bandwidth, pass a value for bandwidth and 0 for quality. To specify quality, pass 0 for bandwidth and a value for quality. Both bandwidth and quality values are capped by Camera parameters.

Note This feature will be supported in future releases of Flash Player and AIR, for now, Camera parameters are used.

Parameters

bandwidth:int — Specifies the maximum amount of bandwidth that the current outgoing video feed can use, in bytes per second. The default value is 16384 (128k bits-per-second (bps), which is very low for high quality video).
 
quality:int — An integer that specifies the required level of picture quality, as determined by the amount of compression being applied to each video frame. Acceptable values range from 1 (lowest quality, maximum compression) to 100 (highest quality, small compression). The default value is 0.

See also