Packagesekati.media
Classpublic class MicrophoneDevice
InheritanceMicrophoneDevice Inheritance flash.events.EventDispatcher
ImplementsIDevice

MicrophoneDevice provides a Microphone control to the API.

See also

sekati.events.DeviceEvent
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/media/Microphone.html


Public Properties
 PropertyDefined by
  activityLevel : Number
[read-only] The amount of activity the device is detecting.
MicrophoneDevice
  deviceIndex : int
[read-only] The index of the currently connected Microphone device driver.
MicrophoneDevice
  deviceName : String
[read-only] The name of the currently connected Microphone device driver.
MicrophoneDevice
  devices : Array
[read-only] The list of names of the available Microphone device drivers.
MicrophoneDevice
  gain : int
The amount to multiply the signal before transmitting it.
MicrophoneDevice
  loopback : Boolean
Whether to routes audio captured by a microphone to the local speakers (true) or not (false).
MicrophoneDevice
  microphone : Microphone
[read-only] The attached microphone driver's Microphone instance.
MicrophoneDevice
  muted : Boolean
[read-only] Indicates whether the user has denied access to the device (true) or allowed access (false) in the Flash Player Privacy dialog box.
MicrophoneDevice
  rate : int
The rate the microphone captures sound, in kHz.
MicrophoneDevice
  silenceLevel : int
The amount of sound required to dispatch the activity event.
MicrophoneDevice
  soundTransform : SoundTransform
Controls the sound of this microphone object when it is in loopback mode.
MicrophoneDevice
  timeout : int
How many milliseconds must elapse without activity before a activity event is dispatched.
MicrophoneDevice
  useEchoSuppression : Boolean
Whether to use the echo suppression feature of the audio codec (true) or not (false).
MicrophoneDevice
Public Methods
 MethodDefined by
  
MicrophoneDevice(silenceLevel:int = 50, rate:int = 8, gain:int = 50, timeout:int = 2000, loopback:Boolean = true, useEchoSuppression:Boolean = true, autoPoll:Boolean = true)
MicrophoneDevice Constructor
MicrophoneDevice
  
destroy():void
MicrophoneDevice
  
pollDevice():void
Poll the Microphone device for a connection.
MicrophoneDevice
Protected Methods
 MethodDefined by
  
activityHandler(e:ActivityEvent):void
Responds to camera activity.
MicrophoneDevice
  
Connect to the Microphone to a Video stream.
MicrophoneDevice
  
promptDevice():void
Graceful degradation: a Camera is available but the user either clicked deny or the device is busy.
MicrophoneDevice
  
statusHandler(e:StatusEvent):void
Respond to camera status.
MicrophoneDevice
Property detail
activityLevelproperty
activityLevel:Number  [read-only]

The amount of activity the device is detecting. Ranges from 0 (no activity detected) to 100 (a large amount of activity detected).

Implementation
    public function get activityLevel():Number
deviceIndexproperty 
deviceIndex:int  [read-only]

The index of the currently connected Microphone device driver.

Implementation
    public function get deviceIndex():int
deviceNameproperty 
deviceName:String  [read-only]

The name of the currently connected Microphone device driver.

Implementation
    public function get deviceName():String
devicesproperty 
devices:Array  [read-only]

The list of names of the available Microphone device drivers.

Implementation
    public function get devices():Array
gainproperty 
gain:int  [read-write]

The amount to multiply the signal before transmitting it. A range between 0 - 100 is accepted.

Implementation
    public function get gain():int
    public function set gain(value:int):void
loopbackproperty 
loopback:Boolean  [read-write]

Whether to routes audio captured by a microphone to the local speakers (true) or not (false).

Implementation
    public function get loopback():Boolean
    public function set loopback(value:Boolean):void
microphoneproperty 
microphone:Microphone  [read-only]

The attached microphone driver's Microphone instance.

Implementation
    public function get microphone():Microphone
mutedproperty 
muted:Boolean  [read-only]

Indicates whether the user has denied access to the device (true) or allowed access (false) in the Flash Player Privacy dialog box.

Implementation
    public function get muted():Boolean
rateproperty 
rate:int  [read-write]

The rate the microphone captures sound, in kHz. The allowed values are any of the following, provided your sound device supports them: 5, 8, 11, 22, 44.

Implementation
    public function get rate():int
    public function set rate(value:int):void
silenceLevelproperty 
silenceLevel:int  [read-write]

The amount of sound required to dispatch the activity event. Ranges from 0 - 100 (Flash Player defaults to 50, however 25 is more accurate for average sound. Note: the lower the value the greater the bandwidth usage in a NetStream).

Implementation
    public function get silenceLevel():int
    public function set silenceLevel(value:int):void
soundTransformproperty 
soundTransform:SoundTransform  [read-write]

Controls the sound of this microphone object when it is in loopback mode.

Implementation
    public function get soundTransform():SoundTransform
    public function set soundTransform(value:SoundTransform):void
timeoutproperty 
timeout:int  [read-write]

How many milliseconds must elapse without activity before a activity event is dispatched.

Implementation
    public function get timeout():int
    public function set timeout(value:int):void
useEchoSuppressionproperty 
useEchoSuppression:Boolean  [read-write]

Whether to use the echo suppression feature of the audio codec (true) or not (false).

Implementation
    public function get useEchoSuppression():Boolean
    public function set useEchoSuppression(value:Boolean):void
Constructor detail
MicrophoneDevice()constructor
public function MicrophoneDevice(silenceLevel:int = 50, rate:int = 8, gain:int = 50, timeout:int = 2000, loopback:Boolean = true, useEchoSuppression:Boolean = true, autoPoll:Boolean = true)

MicrophoneDevice Constructor

Parameters
silenceLevel:int (default = 50) — The amount of sound required to dispatch the activity event. Ranges from 0 - 100 (Flash Player defaults to 50, however 25 is more accurate for average sound. Note: the lower the value the greater the bandwidth usage in a NetStream).
 
rate:int (default = 8) — The rate the microphone captures sound, in kHz. The allowed values are any of the following, provided your sound device supports them: 5, 8, 11, 22, 44.
 
gain:int (default = 50) — The amount to multiply the signal before transmitting it. A range between 0 - 100 is accepted.
 
timeout:int (default = 2000) — How many milliseconds must elapse without activity before a activity event is dispatched.
 
loopback:Boolean (default = true) — Whether to routes audio captured by a microphone to the local speakers (true) or not (false).
 
useEchoSuppression:Boolean (default = true) — Whether to use the echo suppression feature of the audio codec (true) or not (false).
 
autoPoll:Boolean (default = true) — Determines whether the device is auto-polled for (true) or not (false).
Method detail
activityHandler()method
protected function activityHandler(e:ActivityEvent):void

Responds to camera activity.

Parameters
e:ActivityEvent
connectDevice()method 
protected function connectDevice():void

Connect to the Microphone to a Video stream.

destroy()method 
public function destroy():void

pollDevice()method 
public function pollDevice():void

Poll the Microphone device for a connection.

promptDevice()method 
protected function promptDevice():void

Graceful degradation: a Camera is available but the user either clicked deny or the device is busy.

statusHandler()method 
protected function statusHandler(e:StatusEvent):void

Respond to camera status.

Parameters
e:StatusEvent