Name

microphone

Synopsis

LZX: microphone
JavaScript: lz.microphone
Type: Class
Access: public
Topic: Extensions.Audio-Video
Declared in: lps/components/extensions/av/microphone.lzx

Superclass Chain

node (LzNode) » mediadevice » microphone

Known Subclasses

Details

Properties (5)

level
<attribute name="level" type="number" value="0" />
public read-only var level : Number;
Audio level, 0-100, the amount of sound detected by this microphone. Reset to 0 when there is no audio (no activity or not allowed).
_leveldel
<attribute name="_leveldel" value="$once{new LzDelegate(this, '_updateLevel')}" />
private var _leveldel;
Level delegate, used to track level changes.
_mc
<attribute name="_mc" value="null" />
private var _mc;
Flash movie clip for microphone.
_sound
<attribute name="_sound" value="null" />
private var _sound;
Flash Sound object for _mc to control microphone feedback.
stream
<attribute name="stream" value="null" />
public var stream;
Mediastream to associate with the microphone, for audio recording.

Methods (7)

_makeDevice()
<method name="_makeDevice" />
private function _makeDevice();
Make the microphone.
_setCapturing()
<method name="_setCapturing" args="capturing" />
private function _setCapturing(capturing);
Setter for capturing attribute.
_setStream()
<method name="_setStream" args="stream" />
private function _setStream(stream);
Associate a mediastream with the microphone. This is called to connect a microphone directly to a mediastream, without an intervening videoview, for audio only recording.
_setupDevice()
<method name="_setupDevice" />
private function _setupDevice();
Set up the microphone.
startDevice()
<method name="startDevice" />
public function startDevice();
Start the microphone.
_updateAllowed()
<method name="_updateAllowed" />
private function _updateAllowed();
Called when the allowed flag changes.
_updateLevel()
<method name="_updateLevel" />
private function _updateLevel();
Handler for updating the microphone activity level attribute.

Events (1)

onlevel
<attribute name="onlevel" />
private event onlevel;
Event sent when microphone level changes.

LZX Synopsis

<class name="lz.microphone" extends=" lz.mediadevice ">
  <attribute name=" level " type="number" value="0" />
  <attribute name=" _leveldel " value="$once{new LzDelegate(this, '_updateLevel')}" />
  <attribute name=" _mc " value="null" />
  <attribute name=" _sound " value="null" />
  <attribute name=" stream " value="null" />
  <method name=" _makeDevice " />
  <event name=" onlevel " />
  <method name=" _setCapturing " args="capturing" />
  <method name=" _setStream " args="stream" />
  <method name=" _setupDevice " />
  <method name=" startDevice " />
  <method name=" _updateAllowed " />
  <method name=" _updateLevel " />
</class>

JavaScript Synopsis

public lz.microphone extends  lz.mediadevice  {
  public read-only var level  : Number;
  private var _leveldel ;
  private var _mc ;
  private var _sound ;
  public var stream ;
  prototype private function _makeDevice ();
  prototype private event onlevel ;
  prototype private function _setCapturing (capturing);
  prototype private function _setStream (stream);
  prototype private function _setupDevice ();
  prototype public function startDevice ();
  prototype private function _updateAllowed ();
  prototype private function _updateLevel ();
}