Packagetv.ustream.broadcaster.logic.publishers
Classpublic class Publisher
InheritancePublisher Inheritance Dispatcher Inheritance flash.events.EventDispatcher
Subclasses FlashPublisher, FlixPublisher, FmePublisher

Abstract class for the publisher objects.



Public Properties
 PropertyDefined By
 Inheritedactive : Boolean
[read-only]
Dispatcher
  activityLevel : Number
[read-only] Returns the activity level.
Publisher
  activityLevelAvailable : Boolean
[read-only] Returns true if the activity level is available
Publisher
  audioEnabled : Boolean
Enables / disables the broadcasting of the audio part of the stream.
Publisher
  audioQualityPercent : Number
Sets and gets the audio quality percent.
Publisher
  audioQualityValue : Number
[read-only] Returns the audio quality.
Publisher
  broadcasting : Boolean
[read-only] Returns the broadcasting state of the stream.
Publisher
  cameraName : String
Sets and gets the current video device's name.
Publisher
  cameraNames : Array
[read-only] Returns the list of available video devices.
Publisher
  canSetDevices : Boolean
[read-only] Returns true, if the broadcaster is allowed set the video device.
Publisher
  canSetQuality : Boolean
[read-only] Returns true, if the broadcaster is allowed set the quality of the video.
Publisher
  canSetVolume : Boolean
[read-only] Returns true, if the broadcaster is allowed set the volume.
Publisher
  canSetWideScreen : Boolean
[read-only]
Publisher
  fpsPercent : Number
Sets and gets the fps percent.
Publisher
  fpsValue : Number
[read-only] Gets the fps value.
Publisher
  localMonitorAvailable : Boolean
[read-only] Returns true if the local monitor is available.
Publisher
  localMonitorEnabled : Boolean
Sets and gets if the monitor should show the local stream.
Publisher
  microphoneName : String
Sets and gets the current audio device.
Publisher
  microphoneNames : Array
[read-only] Returns the list of available audio devices.
Publisher
  remoteMonitorAvailable : Boolean
[read-only] Returns true, if the remote monitor is available.
Publisher
  remoteMonitorEnabled : Boolean
Sets and gets if the monitor should show the encoded stream.
Publisher
  streamNamePrefix : String
[static] [read-only] Generates a random prefix which will constant for this session.
Publisher
  videoEnabled : Boolean
Enables / disables the broadcasting of the video part of the stream.
Publisher
  videoQualityPercent : Number
Sets and gets the video quality in percent.
Publisher
  videoQualityValue : Number
[read-only] Returns the video quality.
Publisher
  volume : Number
Sets and gets the volume
Publisher
  wideScreen : Boolean
Publisher
Protected Properties
 PropertyDefined By
 Inherited_active : Boolean = true
Dispatcher
Public Methods
 MethodDefined By
  
Publisher(logic:Logic, fms:Connection)
Constructor.
Publisher
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override]
Dispatcher
  
audioQualityFormat(percent:Number = 0):String
Formats the percent value of the audio quality to a more user friendly format.
Publisher
  
destroy(... e):*
[override] Clean up method.
Publisher
 Inherited
dispatchEvent(event:Event):Boolean
[override]
Dispatcher
 Inherited
Dispatcher
  
fpsFormat(percent:Number = 0):String
Formats the percent value of the fps to a more user friendly format.
Publisher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[override]
Dispatcher
 Inherited
setEchoPrefix(str:String):void
Dispatcher
  
If the logic isn't in sleep mode, then calls the FMS to put the stream online.
Publisher
  
Calls the FMS to put the stream offline.
Publisher
  
videoQualityFormat(percent:Number = 0):String
Formats the percent value of the video quality to a more user friendly format.
Publisher
Protected Methods
 MethodDefined By
 Inherited
dispatch(eventName:String, bubbles:Boolean = false, data:* = null):void
Dispatches the event, if the class is active.
Dispatcher
 Inherited
echo(what:String):void
Dispatcher
  
fmeConnected(streamName:String = null, online:Boolean = false, serverUrl:String = null, forced:Boolean = false):void
Abstract method.
Publisher
  
init():void
Abstract method.
Publisher
  
onBroadcastStarted(... e):void
Publisher
Events
 Event Summary Defined By
  Fires when the broadcaster changes the selected video device.Publisher
 InheritedDispatcher
  Fires when the local stream selected as monitor.Publisher
  Fires when the broadcaster changes the selected audio device.Publisher
  Fires, when the server stream selected as monitorPublisher
Property Detail
activityLevelproperty
activityLevel:Number  [read-only]

Returns the activity level.


Implementation
    public function get activityLevel():Number
activityLevelAvailableproperty 
activityLevelAvailable:Boolean  [read-only]

Returns true if the activity level is available


Implementation
    public function get activityLevelAvailable():Boolean
audioEnabledproperty 
audioEnabled:Boolean

Enables / disables the broadcasting of the audio part of the stream.


Implementation
    public function get audioEnabled():Boolean
    public function set audioEnabled(value:Boolean):void
audioQualityPercentproperty 
audioQualityPercent:Number

Sets and gets the audio quality percent.


Implementation
    public function get audioQualityPercent():Number
    public function set audioQualityPercent(value:Number):void
audioQualityValueproperty 
audioQualityValue:Number  [read-only]

Returns the audio quality.


Implementation
    public function get audioQualityValue():Number
broadcastingproperty 
broadcasting:Boolean  [read-only]

Returns the broadcasting state of the stream.


Implementation
    public function get broadcasting():Boolean
cameraNameproperty 
cameraName:String

Sets and gets the current video device's name.


Implementation
    public function get cameraName():String
    public function set cameraName(value:String):void
cameraNamesproperty 
cameraNames:Array  [read-only]

Returns the list of available video devices.


Implementation
    public function get cameraNames():Array
canSetDevicesproperty 
canSetDevices:Boolean  [read-only]

Returns true, if the broadcaster is allowed set the video device.


Implementation
    public function get canSetDevices():Boolean
canSetQualityproperty 
canSetQuality:Boolean  [read-only]

Returns true, if the broadcaster is allowed set the quality of the video.


Implementation
    public function get canSetQuality():Boolean
canSetVolumeproperty 
canSetVolume:Boolean  [read-only]

Returns true, if the broadcaster is allowed set the volume.


Implementation
    public function get canSetVolume():Boolean
canSetWideScreenproperty 
canSetWideScreen:Boolean  [read-only]


Implementation
    public function get canSetWideScreen():Boolean
fpsPercentproperty 
fpsPercent:Number

Sets and gets the fps percent.


Implementation
    public function get fpsPercent():Number
    public function set fpsPercent(value:Number):void
fpsValueproperty 
fpsValue:Number  [read-only]

Gets the fps value.


Implementation
    public function get fpsValue():Number
localMonitorAvailableproperty 
localMonitorAvailable:Boolean  [read-only]

Returns true if the local monitor is available.


Implementation
    public function get localMonitorAvailable():Boolean
localMonitorEnabledproperty 
localMonitorEnabled:Boolean

Sets and gets if the monitor should show the local stream.


Implementation
    public function get localMonitorEnabled():Boolean
    public function set localMonitorEnabled(value:Boolean):void
microphoneNameproperty 
microphoneName:String

Sets and gets the current audio device.


Implementation
    public function get microphoneName():String
    public function set microphoneName(value:String):void
microphoneNamesproperty 
microphoneNames:Array  [read-only]

Returns the list of available audio devices.


Implementation
    public function get microphoneNames():Array
remoteMonitorAvailableproperty 
remoteMonitorAvailable:Boolean  [read-only]

Returns true, if the remote monitor is available.


Implementation
    public function get remoteMonitorAvailable():Boolean
remoteMonitorEnabledproperty 
remoteMonitorEnabled:Boolean

Sets and gets if the monitor should show the encoded stream. Used to verify the quality of the stream. It doesn't show the stream on the server, only the result of the encoding process.


Implementation
    public function get remoteMonitorEnabled():Boolean
    public function set remoteMonitorEnabled(value:Boolean):void
streamNamePrefixproperty 
streamNamePrefix:String  [read-only]

Generates a random prefix which will constant for this session.


Implementation
    public static function get streamNamePrefix():String
videoEnabledproperty 
videoEnabled:Boolean

Enables / disables the broadcasting of the video part of the stream.


Implementation
    public function get videoEnabled():Boolean
    public function set videoEnabled(value:Boolean):void
videoQualityPercentproperty 
videoQualityPercent:Number

Sets and gets the video quality in percent. Saves it to the Shared too.


Implementation
    public function get videoQualityPercent():Number
    public function set videoQualityPercent(value:Number):void

See also

tv.ustream.tools.Shared
videoQualityValueproperty 
videoQualityValue:Number  [read-only]

Returns the video quality.


Implementation
    public function get videoQualityValue():Number
volumeproperty 
volume:Number

Sets and gets the volume


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
wideScreenproperty 
wideScreen:Boolean


Implementation
    public function get wideScreen():Boolean
    public function set wideScreen(value:Boolean):void
Constructor Detail
Publisher()Constructor
public function Publisher(logic:Logic, fms:Connection)

Constructor.

Parameters
logic:Logic
 
fms:Connection
Method Detail
audioQualityFormat()method
public function audioQualityFormat(percent:Number = 0):String

Formats the percent value of the audio quality to a more user friendly format.

Parameters

percent:Number (default = 0)

Returns
String
destroy()method 
override public function destroy(... e):*

Clean up method.

Parameters

... e

Returns
*
fmeConnected()method 
protected function fmeConnected(streamName:String = null, online:Boolean = false, serverUrl:String = null, forced:Boolean = false):void

Abstract method.

Parameters

streamName:String (default = null)
 
online:Boolean (default = false)
 
serverUrl:String (default = null)
 
forced:Boolean (default = false)

fpsFormat()method 
public function fpsFormat(percent:Number = 0):String

Formats the percent value of the fps to a more user friendly format.

Parameters

percent:Number (default = 0)

Returns
String
init()method 
protected function init():void

Abstract method.

onBroadcastStarted()method 
protected function onBroadcastStarted(... e):void

Parameters

... e

startBroadcast()method 
public function startBroadcast():void

If the logic isn't in sleep mode, then calls the FMS to put the stream online.

stopBroadcast()method 
public function stopBroadcast():void

Calls the FMS to put the stream offline.

videoQualityFormat()method 
public function videoQualityFormat(percent:Number = 0):String

Formats the percent value of the video quality to a more user friendly format.

Parameters

percent:Number (default = 0)

Returns
String
Event Detail
cameraName Event
Event Object Type: flash.events.Event

Fires when the broadcaster changes the selected video device.

localMonitor Event  
Event Object Type: flash.events.Event

Fires when the local stream selected as monitor.

microphoneName Event  
Event Object Type: flash.events.Event

Fires when the broadcaster changes the selected audio device.

remoteMonitor Event  
Event Object Type: flash.events.Event

Fires, when the server stream selected as monitor