Package | org.osmf.traits |
Class | public class SeekTrait |
Inheritance | SeekTrait MediaTraitBase EventDispatcher Object |
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Use the MediaElement.hasTrait(MediaTraitType.SEEK)
method to query
whether a media element has a trait of this type.
If hasTrait(MediaTraitType.SEEK)
returns true
,
use the MediaElement.getTrait(MediaTraitType.SEEK)
method
to get an object that is guaranteed to be of this type.
Related API Elements
Property | Defined By | ||
---|---|---|---|
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
seeking : Boolean [read-only]
Indicates whether the media is currently seeking. | SeekTrait | ||
traitType : String [read-only]
The MediaTraitType for this trait. | MediaTraitBase |
Property | Defined By | ||
---|---|---|---|
timeTrait : org.osmf.traits:TimeTrait
The TimeTrait used by this SeekTrait. | SeekTrait |
Method | Defined By | ||
---|---|---|---|
SeekTrait(timeTrait:org.osmf.traits:TimeTrait)
Constructor. | SeekTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Indicates whether the media is capable of seeking to the
specified time. | SeekTrait | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Instructs the media to jump to the specified time. | SeekTrait | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Method | Defined By | ||
---|---|---|---|
Called just after the seeking property has changed. | SeekTrait | ||
Called immediately before the seeking property is changed. | SeekTrait | ||
Must be called by the implementing media on completing a seek. | SeekTrait |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when this trait begins or ends a seek operation. | SeekTrait |
seeking | property |
timeTrait | property |
timeTrait:org.osmf.traits:TimeTrait
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
The TimeTrait used by this SeekTrait.
Implementation
protected function get timeTrait():org.osmf.traits:TimeTrait
protected function set timeTrait(value:org.osmf.traits:TimeTrait):void
SeekTrait | () | Constructor |
public function SeekTrait(timeTrait:org.osmf.traits:TimeTrait)
Constructor.
ParameterstimeTrait:org.osmf.traits:TimeTrait |
canSeekTo | () | method |
public function canSeekTo(time:Number):Boolean
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Indicates whether the media is capable of seeking to the specified time.
Parameters
time:Number — Time to seek to in seconds.
|
Boolean — Returns true if the media can seek to the specified time.
|
seek | () | method |
public final function seek(time:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Instructs the media to jump to the specified time
.
If a seek is attempted, dispatches a seekingChange event.
If time
is non numerical or negative, does not attempt to seek.
Parameters
time:Number — Time to seek to in seconds.
|
seekingChangeEnd | () | method |
protected function seekingChangeEnd(time:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called just after the seeking
property has changed.
Dispatches the change event.
Subclasses that override should call this method to dispatch the change event.
Parameters
time:Number — New time value representing the time that the playhead seeked to.
|
seekingChangeStart | () | method |
protected function seekingChangeStart(newSeeking:Boolean, time:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Called immediately before the seeking
property is changed.
Subclasses can override this method to communicate the change to the media.
Parameters
newSeeking:Boolean — New time value representing the time that the playhead seeks to.
| |
time:Number |
setSeeking | () | method |
protected final function setSeeking(value:Boolean, time:Number):void
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Must be called by the implementing media on completing a seek.
Calls the seekingChangeStart()
and seekingChangeEnd()
methods.
Parameters
value:Boolean — New seeking value.
| |
time:Number — Position in seconds that the playhead was ultimately
moved to.
|
seekingChange | Event |
org.osmf.events.SeekEvent
property SeekEvent.type =
org.osmf.events.SeekEvent.SEEKING_CHANGE
Language Version: | ActionScript 3.0 |
Product Version: | OSMF 1.0 |
Runtime Versions: | Flash Player 10, AIR 1.5 |
Dispatched when this trait begins or ends a seek operation.
The SeekEvent.SEEKING_CHANGE constant defines the value of the type property of the event object for a seekingChange event.Thu Dec 6 2018, 01:12 PM -08:00