| Package | com.adobe.mediacore |
| Class | public final class DefaultMediaPlayer |
| Inheritance | DefaultMediaPlayer flash.events.EventDispatcher |
| Implements | MediaPlayer |
| Property | Defined By | ||
|---|---|---|---|
| abrControlParameters : ABRControlParameters
Media player parameters that control the playback of MBR content. | DefaultMediaPlayer | ||
| bufferControlParameters : BufferControlParameters
Media player parameters that control the buffering policies. | DefaultMediaPlayer | ||
| bufferedRange : TimeRange [read-only]
Returns the buffered range. | DefaultMediaPlayer | ||
| ccStyle : ClosedCaptionStyles
Closed captioning style. | DefaultMediaPlayer | ||
| ccVisibility : String
Current status of closed captions visibility. | DefaultMediaPlayer | ||
| config : MediaPlayerConfig
Media player configuration. | DefaultMediaPlayer | ||
| currentItem : MediaPlayerItem [read-only]
Gets the current media player item. | DefaultMediaPlayer | ||
| currentTime : Number [read-only]
The current playhead time as reported by the underlying components. | DefaultMediaPlayer | ||
| currentTimeUpdateInterval : uint
Interval between the dispatch of change events for the current time
in milliseconds. | DefaultMediaPlayer | ||
| drmManager : DRMManager [read-only]
| DefaultMediaPlayer | ||
| playbackMetrics : PlaybackMetrics [read-only]
| DefaultMediaPlayer | ||
| playbackRange : TimeRange [read-only]
Returns the playback range
| DefaultMediaPlayer | ||
| seekableRange : TimeRange [read-only]
Returns the seekable range
| DefaultMediaPlayer | ||
| status : String [read-only]
Returns the media player status. | DefaultMediaPlayer | ||
| timeline : Timeline [read-only]
The current timeline containing both main content and associated
alternate content (ads). | DefaultMediaPlayer | ||
| view : MediaPlayerView
Returns the view where the media player will render the images. | DefaultMediaPlayer | ||
| volume : Number
Media player volume. | DefaultMediaPlayer | ||
| Method | Defined By | ||
|---|---|---|---|
DefaultMediaPlayer(context:MediaPlayerContext)
Default constructor. | DefaultMediaPlayer | ||
[static]
/
Convenience method for creating a media player. | DefaultMediaPlayer | ||
pause():void
Pauses the playback of the current media item. | DefaultMediaPlayer | ||
play():void
Initiates or resumes the playback of the current media item. | DefaultMediaPlayer | ||
prepareToPlay(... args):void
Prepares to play the current selected item. | DefaultMediaPlayer | ||
release():void
Releases media player object. | DefaultMediaPlayer | ||
replaceCurrentItem(mediaPlayerItem:MediaPlayerItem):void
Replaces the current media item or sets one if none exists by using a previously
loaded media resource. | DefaultMediaPlayer | ||
replaceCurrentResource(mediaResource:MediaResource):void
Replaces the current media item or sets one if none exists by loading the
specified resource. | DefaultMediaPlayer | ||
reset():void
Resets the media player to its uninitialized state. | DefaultMediaPlayer | ||
seek(position:Number):void
Moves the play head to specified position. | DefaultMediaPlayer | ||
| Constant | Defined By | ||
|---|---|---|---|
| LIVE_POINT : int = -2 [static]
Constant used to seek to the live point. | DefaultMediaPlayer | ||
| abrControlParameters | property |
abrControlParameters:ABRControlParametersMedia player parameters that control the playback of MBR content.
public function get abrControlParameters():ABRControlParameters public function set abrControlParameters(value:ABRControlParameters):void| bufferControlParameters | property |
bufferControlParameters:BufferControlParametersMedia player parameters that control the buffering policies.
public function get bufferControlParameters():BufferControlParameters public function set bufferControlParameters(value:BufferControlParameters):void| bufferedRange | property |
bufferedRange:TimeRange [read-only] Returns the buffered range.
public function get bufferedRange():TimeRange| ccStyle | property |
ccStyle:ClosedCaptionStylesClosed captioning style. Used to control the closed captioning font, size, color, edge and opacity. This method is safe to use even if the current media stream doesn't have closed captions.
public function get ccStyle():ClosedCaptionStyles public function set ccStyle(value:ClosedCaptionStyles):void| ccVisibility | property |
ccVisibility:StringCurrent status of closed captions visibility. ClosedCaptionsVisibility.VISIBLE if closed captions should be displayed when available, or ClosedCaptionsVisibility.HIDDEN if otherwise. This method is safe to use even if the current media stream doesn't have closed captions.
public function get ccVisibility():String public function set ccVisibility(value:String):void| config | property |
config:MediaPlayerConfigMedia player configuration. Allows for configuration and customization of various media player components like content resolving or analytics service.
public function get config():MediaPlayerConfig public function set config(value:MediaPlayerConfig):void| currentItem | property |
currentItem:MediaPlayerItem [read-only] Gets the current media player item.
public function get currentItem():MediaPlayerItem| currentTime | property |
currentTime:Number [read-only] The current playhead time as reported by the underlying components. The playhead time is calculated relative to the resolved stream, one which can contain multiple ads inserted.
public function get currentTime():Number| currentTimeUpdateInterval | property |
currentTimeUpdateInterval:uintInterval between the dispatch of change events for the current time in milliseconds. The default is 250 milliseconds. A zero value disables the dispatch of the change events. The minimum accepted value (except zero) is 50 milliseconds, due to performance concerns. Attempting to set the interval to a lower value will result in it being set to 50.
public function get currentTimeUpdateInterval():uint public function set currentTimeUpdateInterval(value:uint):void| drmManager | property |
drmManager:DRMManager [read-only]
public function get drmManager():DRMManager| playbackMetrics | property |
playbackMetrics:PlaybackMetrics [read-only]
public function get playbackMetrics():PlaybackMetrics| playbackRange | property |
playbackRange:TimeRange [read-only] Returns the playback range
public function get playbackRange():TimeRange| seekableRange | property |
seekableRange:TimeRange [read-only] Returns the seekable range
public function get seekableRange():TimeRange| status | property |
status:String [read-only] Returns the media player status.
public function get status():String| timeline | property |
timeline:Timeline [read-only] The current timeline containing both main content and associated alternate content (ads). The timeline can update over time as more and more alternate content is placed on it.
public function get timeline():Timeline| view | property |
view:MediaPlayerViewReturns the view where the media player will render the images.
public function get view():MediaPlayerView public function set view(value:MediaPlayerView):void| volume | property |
volume:NumberMedia player volume. Ranges from 0 (silent) to 100 (full volume).
public function get volume():Number public function set volume(value:Number):void| DefaultMediaPlayer | () | Constructor |
public function DefaultMediaPlayer(context:MediaPlayerContext)Default constructor.
Parameterscontext:MediaPlayerContext |
| create | () | method |
public static function create(context:MediaPlayerContext):MediaPlayer/ Convenience method for creating a media player.
Parameters
context:MediaPlayerContext — Application context provided by the developer.
|
MediaPlayer — default library implementation of media player interface.
|
| pause | () | method |
public function pause():voidPauses the playback of the current media item. If the current media item was already paused, calling this method will have no effect. In order to resume the playback of the current media item, call play() method.
| play | () | method |
public function play():voidInitiates or resumes the playback of the current media item. If the current media item is not yet ready to play it will invoke prepareToPlay first. If the current media item was paused, then invoking this command will resume the playback from where it was paused, otherwise it will start the playback from the beginning. If the current media item was already playing, calling this method will have no effect.
| prepareToPlay | () | method |
public function prepareToPlay(... args):voidPrepares to play the current selected item. Initiates the loading of specified resource or media player item. The process is asynchronous and may be successful or not depending on the resource availability and if the resource is compatible with our runtime.
Parameters
... args |
| release | () | method |
public function release():voidReleases media player object. IMPORTANT! The media player being released can't be used anymore. Invoking any method of the media player once has been released will result in an IllegalStateException being thrown. It will release the underlying resources associated with this media player object. It is considered good practice to call this method when you're done using it. In addition to unnecessary resources being held, failure to call this method immediately if a media player object is no longer needed may also lead to continuous battery consumption for mobile devices, and playback failure for other applications if no multiple instances of the same codec are supported on a device.
| replaceCurrentItem | () | method |
public function replaceCurrentItem(mediaPlayerItem:MediaPlayerItem):voidReplaces the current media item or sets one if none exists by using a previously loaded media resource. Use this method to continue playing a resource which was previously loaded and processed. The prepareToPlay() method should be called afterwards.
Parameters
mediaPlayerItem:MediaPlayerItem — the media player item to be set.
|
| replaceCurrentResource | () | method |
public function replaceCurrentResource(mediaResource:MediaResource):voidReplaces the current media item or sets one if none exists by loading the specified resource. Use this method to automatically load and process the media to be played. The media resource contains information about the stream URL to be played alongside metadata (such as ad breaks information). The prepareToPlay() should be called afterwards.
Parameters
mediaResource:MediaResource — the media resource to be set
|
| reset | () | method |
public function reset():voidResets the media player to its uninitialized state. After calling this method, you will have to initialize it again by setting the media player item through replaceCurrentItem() method and calling prepareToPlay() method.
| seek | () | method |
public function seek(position:Number):voidMoves the play head to specified position. The actual start position after seek may be different than the desired one due additional rules which may apply. For example seeking in the middle of an ad is not permitted and in this case the seek position will be adjusted to the beginning of the ad. Developers should listen for SEEK_COMPLETE notification which will provide the adjusted position.
Parameters
position:Number — the desired position from where to start the playback
|
| LIVE_POINT | Constant |
public static const LIVE_POINT:int = -2Constant used to seek to the live point.