Packageispring.presenter.player.media
Interfacepublic interface IMediaPlaybackController extends flash.events.IEventDispatcher

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

The IMediaPlaybackController allows controlling audio and video playback.

To create a media playback controller for an existing sound asset, use the createAudioController() method on the IAudioPlaybackControllerFactory interface. To create a media playback controller for an existing audio narration track, use the createPlaybackController() method on the IAudioTrack interface.

To create a media playback controller for an existing MovieClip, use the createEmbeddedVideoController() method on the IVideoPlaybackControllerFactory interface. To create a media playback controller for an FLV/MP4 video, use the createExternalVideoController() method on the IVideoPlaybackControllerFactory interface.

To obtain a media playback controller from an existing video view use the controller property on the IVideoView interface.

See also

ispring.presenter.player.audio.IAudioPlaybackControllerFactory.createAudioController()
ispring.presenter.player.video.IVideoPlaybackControllerFactory.createEmbeddedVideoController()
ispring.presenter.player.video.IVideoPlaybackControllerFactory.createExternalVideoController()
ispring.presenter.player.video.IVideoView.controller
ispring.utils.assets.ISoundAsset
ispring.presenter.presentation.narration.IAudioTrack.createPlaybackController()
flash.display.MovieClip


Public Properties
PropertyDefined By
duration : Number
[read-only] Returns the total duration of the media including all loops.
IMediaPlaybackController
loopDuration : Number
[read-only] The duration of the current loop.
IMediaPlaybackController
loopPosition : Number
[read-only] The position within the current loop.
IMediaPlaybackController
playbackState : String
[read-only] The current playback state of the controller.
IMediaPlaybackController
position : Number
[read-only] Returns the current playback position of the media.
IMediaPlaybackController
volume : Number
The current level of the sound volume.
IMediaPlaybackController
Public Methods
MethodDefined By
 
pause():void
Suspends multimedia playback.
IMediaPlaybackController
 
play():void
Resumes multimedia playback.
IMediaPlaybackController
 
playFrom(position:Number):void
Resumes multimedia playback from the specified position.
IMediaPlaybackController
 
seek(time:Number):void
Performs seeking to the specified time.
IMediaPlaybackController
 
stop():void
Stops multimedia playback.
IMediaPlaybackController
Events
Event Summary Defined By
 Dispatched when the state of the media playback controller is changed.IMediaPlaybackController
Property Detail
durationproperty
duration:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Returns the total duration of the media including all loops.


Implementation
    public function get duration():Number
loopDurationproperty 
loopDuration:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

The duration of the current loop.


Implementation
    public function get loopDuration():Number
loopPositionproperty 
loopPosition:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

The position within the current loop.


Implementation
    public function get loopPosition():Number
playbackStateproperty 
playbackState:String  [read-only]

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

The current playback state of the controller. See the ispring.presenter.player.media.PlaybackState constants for more details.


Implementation
    public function get playbackState():String

See also

positionproperty 
position:Number  [read-only]

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Returns the current playback position of the media.


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

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

The current level of the sound volume.


Implementation
    public function get volume():Number
    public function set volume(value:Number):void
Method Detail
pause()method
public function pause():void

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Suspends multimedia playback.

play()method 
public function play():void

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Resumes multimedia playback.

playFrom()method 
public function playFrom(position:Number):void

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Resumes multimedia playback from the specified position.

Parameters

position:Number

seek()method 
public function seek(time:Number):void

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Performs seeking to the specified time.

Parameters

time:Number

stop()method 
public function stop():void

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.0.3, iSpring Platform 6.0
Runtime Versions : AIR 1.0, Flash Player 10.1

Stops multimedia playback.

Event Detail
mediaPlaybackStateChanged Event
Event Object Type: ispring.presenter.player.media.MediaPlaybackEvent2
MediaPlaybackEvent2.type property = ispring.presenter.player.media.MediaPlaybackEvent2.PLAYBACK_STATE_CHANGED

Language Version : ActionScript 3.0
Product Versions : iSpring Pro 6.1, iSpring Platform 6.1
Runtime Versions : AIR 1.0, Flash Player 10.1

Dispatched when the state of the media playback controller is changed.

The MediaPlaybackEvent2.PLAYBACK_STATE_CHANGED constant defines the value of the type property of the event object for a mediaPlaybackStateChanged event. The value of this constant is equal to the value of the MediaPlaybackEvent.PLAYBACK_STATE_CHANGED constant.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
oldPlaybackStateThe old playback state. See the ispring.presenter.player.media.PlaybackState constants for more details.
playbackStateThe new playback state. See the ispring.presenter.player.media.PlaybackState constants for more details.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.