Paket | org.osmf.traits |
Klass | public class DRMTrait |
Arv | DRMTrait MediaTraitBase EventDispatcher Object |
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
Both anonymous and credential-based authentication are supported.
The workflow for media which has a DRMTrait is that the media undergoes some type of authentication, after which it is valid (i.e. able to be played) for a specific time window.
Use the MediaElement.hasTrait(MediaTraitType.DRM)
method to query
whether a media element has this trait.
If hasTrait(MediaTraitType.DRM)
returns true
,
use the MediaElement.getTrait(MediaTraitType.DRM)
method
to get an object of this type.
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
drmState : String [skrivskyddad]
The current state of the DRM for this media. | DRMTrait | ||
endDate : Date [skrivskyddad]
The end date for the playback window. | DRMTrait | ||
period : Number [skrivskyddad]
The length of the playback window, in seconds. | DRMTrait | ||
startDate : Date [skrivskyddad]
The start date for the playback window. | DRMTrait | ||
traitType : String [skrivskyddad]
The MediaTraitType for this trait. | MediaTraitBase |
Metod | Definieras med | ||
---|---|---|---|
DRMTrait()
Constructor. | DRMTrait | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Authenticates the media. | DRMTrait | ||
Authenticates the media using an object which serves as a token. | DRMTrait | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Disposes of any resources used by this trait. | MediaTraitBase | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Metod | Definieras med | ||
---|---|---|---|
Updates the drm state. | DRMTrait | ||
Updates the end date. | DRMTrait | ||
Updates the period. | DRMTrait | ||
Updates the start date. | DRMTrait |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when either anonymous or credential-based authentication is needed in order to playback the media. | DRMTrait |
drmState | egenskap |
drmState:String
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
The current state of the DRM for this media. The states are described in the DRMState enumeration.
Implementering
public function get drmState():String
Relaterade API-element
endDate | egenskap |
period | egenskap |
period:Number
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
The length of the playback window, in seconds. Returns NaN if authentication hasn't taken place.
Note that this property will generally be the difference between startDate and endDate, but is included as a property because there may be times where the duration is known up front, but the start or end dates are not (e.g. a one week rental).
Implementering
public function get period():Number
startDate | egenskap |
DRMTrait | () | Konstruktor |
public function DRMTrait()
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
Constructor.
authenticate | () | metod |
public function authenticate(username:String = null, password:String = null):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
Authenticates the media. Can be used for both anonymous and credential-based authentication. If the media has already been authenticated, this is a no-op.
Parametrar
username:String (default = null ) — The username. Should be null for anonymous authentication.
| |
password:String (default = null ) — The password. Should be null for anonymous authentication.
|
Utlöser
IllegalOperationError — If the media is not initialized yet.
|
authenticateWithToken | () | metod |
public function authenticateWithToken(token:Object):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
Authenticates the media using an object which serves as a token. Can be used for both anonymous and credential-based authentication. If the media has already been authenticated, this is a no-op.
Parametrar
token:Object — The token to use for authentication.
|
setDrmState | () | metod |
protected final function setDrmState(value:String):void
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
Updates the drm state.
Note that this method doesn't dispatch the drmStateChange event.
Parametrar
value:String — The new value for drmState.
|
setEndDate | () | metod |
setPeriod | () | metod |
setStartDate | () | metod |
drmStateChange | Händelse |
org.osmf.events.DRMEvent
egenskap DRMEvent.type =
org.osmf.events.DRMEvent.DRM_STATE_CHANGE
Språkversion: | ActionScript 3.0 |
Produktversion: | OSMF 1.0 |
Körningsmiljöversioner: | Flash Player 10.1, AIR 1.5 |
Dispatched when either anonymous or credential-based authentication is needed in order to playback the media.
The DRMEvent.DRM_STATE_CHANGE constant defines the value of the type property of the event object for a change to the drmState of a DRMTrait.Tue Jun 12 2018, 01:40 PM Z