| Package | com.devnet.osmf.application |
| Class | public class ControlBar |
| Inheritance | ControlBar MediaControl flash.display.MovieClip |
| Language Version : | ActionScript 3.0 |
| Runtime Versions : | AIR 1.0, Flash Player 10.0.0 |
Example: This example shows how to assign the media display instance to the control bar instance.
// Link the controls to the display...
controlBar.mediaPlayer = mediaDisplay;
Example: This example shows how to configure the ControlBar instance using ActionScript.
// Setup control bar
controlBar.hdWidth = 768;
controlBar.hdHeight = 428;
controlBar.shareUrl = "http://www.adobe.com/devnet/flash/";
controlBar.useElapsedTime = false;
controlBar.useFullScreenButton = false;
controlBar.useVolumeButton = false;
See also
| Property | Defined By | ||
|---|---|---|---|
| background : Sprite | ControlBar | ||
| elapsedTime : ElapsedTime | ControlBar | ||
| fullScreenButton : SimpleButton | ControlBar | ||
| hdHeight : Number
Set the actual size of the video height here in
order to trigger hardware accerlation scaling during
full screen mode. | ControlBar | ||
| hdWidth : Number
Set the actual size of the video width here in
order to trigger hardware accerlation scaling during
full screen mode. | ControlBar | ||
| hline : Sprite | ControlBar | ||
![]() | mediaPlayer : MediaDisplay
Set the mediaPlayer property to associate a
media display instance with a control instance. | MediaControl | |
| playOverlay : PlayScreen | ControlBar | ||
| playPauseButton : SimpleButton | ControlBar | ||
| seekBar : SeekBar | ControlBar | ||
| seekEnabled : Boolean
Set seekEnabled to false when using progressive video
whose encoding creates unpredictable seek times. | ControlBar | ||
| shareButton : SimpleButton | ControlBar | ||
| shareColumns : Number
Set the number of icon columns in the AddThis share
menu widget. | ControlBar | ||
| shareDisplayState : Number
Set the display layout state of the AddThis share menu. | ControlBar | ||
| shareUrl : String
Set the URL to share when an AddThis share option is
selected. | ControlBar | ||
| useElapsedTime : Boolean
Set to true to show the elapsed time control or false to hide it. | ControlBar | ||
| useFullScreenButton : Boolean
Set to true to show the full screen button or false to hide it. | ControlBar | ||
| usePlayOverlay : Boolean
Set to true to show the play button overlay or false to hide it. | ControlBar | ||
| usePlayPauseButton : Boolean
Set to true to show the play pause button or false to hide it. | ControlBar | ||
| useSeekBar : Boolean
Set to true to show the seek bar or false to hide it. | ControlBar | ||
| useShareButton : Boolean
Set to true to show the share button and menu or false to hide it. | ControlBar | ||
| useVolumeButton : Boolean
Set to true to show the volume button or false to hide it. | ControlBar | ||
| useVolumeSlider : Boolean
Set to true to show the volume slider or false to hide it. | ControlBar | ||
| volumeButton : SimpleButton | ControlBar | ||
| volumeSlider : VolumeSlider | ControlBar | ||
| Method | Defined By | ||
|---|---|---|---|
| ControlBar | |||
init():void [override]
Called when the mediaPlayer reference is set. | ControlBar | ||
setSize(w:Number, h:Number):void
Sets the size of the control bar. | ControlBar | ||
| Method | Defined By | ||
|---|---|---|---|
addedToStageHandler(event:Event):void | ControlBar | ||
onFullScreenChange(event:FullScreenEvent):void | ControlBar | ||
onFullScreenClick(event:MouseEvent):void | ControlBar | ||
onMediaPlayerEvent(event:MediaEvent):void | ControlBar | ||
onMediaPlayerProgress(event:ProgressEvent):void | ControlBar | ||
onPlayClick(event:MouseEvent):void | ControlBar | ||
onPlayPauseClick(event:MouseEvent):void | ControlBar | ||
onShareClick(event:MouseEvent):void | ControlBar | ||
onShareMenuLoaded(event:Event):void | ControlBar | ||
onVolumeChange(event:Event):void | ControlBar | ||
onVolumeClick(event:MouseEvent):void | ControlBar | ||
| background | property |
public var background:Sprite| elapsedTime | property |
public var elapsedTime:ElapsedTime| fullScreenButton | property |
public var fullScreenButton:SimpleButton| hdHeight | property |
hdHeight:NumberSet the actual size of the video height here in order to trigger hardware accerlation scaling during full screen mode. Leaving this parameter null forces the media display to use standard Flash Player scaling during full screen mode.
public function get hdHeight():Number public function set hdHeight(value:Number):void| hdWidth | property |
hdWidth:NumberSet the actual size of the video width here in order to trigger hardware accerlation scaling during full screen mode. Leaving this parameter null forces the media display to use standard Flash Player scaling during full screen mode.
public function get hdWidth():Number public function set hdWidth(value:Number):void| hline | property |
public var hline:Sprite| playOverlay | property |
public var playOverlay:PlayScreen| playPauseButton | property |
public var playPauseButton:SimpleButton| seekBar | property |
public var seekBar:SeekBar| seekEnabled | property |
seekEnabled:BooleanSet seekEnabled to false when using progressive video whose encoding creates unpredictable seek times. Doing so switches the seek bar to a progress indicator.
public function get seekEnabled():Boolean public function set seekEnabled(value:Boolean):void| shareButton | property |
public var shareButton:SimpleButton| shareColumns | property |
shareColumns:NumberSet the number of icon columns in the AddThis share menu widget.
public function get shareColumns():Number public function set shareColumns(value:Number):void| shareDisplayState | property |
shareDisplayState:NumberSet the display layout state of the AddThis share menu.
public function get shareDisplayState():Number public function set shareDisplayState(value:Number):void| shareUrl | property |
shareUrl:StringSet the URL to share when an AddThis share option is selected.
public function get shareUrl():String public function set shareUrl(value:String):void| useElapsedTime | property |
useElapsedTime:BooleanSet to true to show the elapsed time control or false to hide it.
public function get useElapsedTime():Boolean public function set useElapsedTime(value:Boolean):void| useFullScreenButton | property |
useFullScreenButton:BooleanSet to true to show the full screen button or false to hide it.
public function get useFullScreenButton():Boolean public function set useFullScreenButton(value:Boolean):void| usePlayOverlay | property |
usePlayOverlay:BooleanSet to true to show the play button overlay or false to hide it.
public function get usePlayOverlay():Boolean public function set usePlayOverlay(value:Boolean):void| usePlayPauseButton | property |
usePlayPauseButton:BooleanSet to true to show the play pause button or false to hide it.
public function get usePlayPauseButton():Boolean public function set usePlayPauseButton(value:Boolean):void| useSeekBar | property |
useSeekBar:BooleanSet to true to show the seek bar or false to hide it.
public function get useSeekBar():Boolean public function set useSeekBar(value:Boolean):void| useShareButton | property |
useShareButton:BooleanSet to true to show the share button and menu or false to hide it.
public function get useShareButton():Boolean public function set useShareButton(value:Boolean):void| useVolumeButton | property |
useVolumeButton:BooleanSet to true to show the volume button or false to hide it. If set to false, the volume slider is unavailable.
public function get useVolumeButton():Boolean public function set useVolumeButton(value:Boolean):void| useVolumeSlider | property |
useVolumeSlider:BooleanSet to true to show the volume slider or false to hide it. If set to false, the volume button becomes a mute toggle button.
public function get useVolumeSlider():Boolean public function set useVolumeSlider(value:Boolean):void| volumeButton | property |
public var volumeButton:SimpleButton| volumeSlider | property |
public var volumeSlider:VolumeSlider| ControlBar | () | Constructor |
public function ControlBar()| addedToStageHandler | () | method |
protected function addedToStageHandler(event:Event):voidParameters
event:Event |
| init | () | method |
override public function init():voidCalled when the mediaPlayer reference is set. Use this method to initialize the control with the OSMF media display.
| onFullScreenChange | () | method |
protected function onFullScreenChange(event:FullScreenEvent):voidParameters
event:FullScreenEvent |
| onFullScreenClick | () | method |
protected function onFullScreenClick(event:MouseEvent):voidParameters
event:MouseEvent |
| onMediaPlayerEvent | () | method |
| onMediaPlayerProgress | () | method |
| onPlayClick | () | method |
protected function onPlayClick(event:MouseEvent):voidParameters
event:MouseEvent |
| onPlayPauseClick | () | method |
protected function onPlayPauseClick(event:MouseEvent):voidParameters
event:MouseEvent |
| onShareClick | () | method |
protected function onShareClick(event:MouseEvent):voidParameters
event:MouseEvent |
| onShareMenuLoaded | () | method |
protected function onShareMenuLoaded(event:Event):voidParameters
event:Event |
| onVolumeChange | () | method |
protected function onVolumeChange(event:Event):voidParameters
event:Event |
| onVolumeClick | () | method |
protected function onVolumeClick(event:MouseEvent):voidParameters
event:MouseEvent |
| setSize | () | method |
public function setSize(w:Number, h:Number):voidSets the size of the control bar. Adjust this method if you change the layout of controls.
Parameters
w:Number — Number representing the new width.
| |
h:Number — Number representing the new height.
|