flash.net.drm

# DRMVoucher - AS3

Package | flash.net.drm
Class | public class DRMVoucher
Inheritance | DRMVoucher Object

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The DRMVoucher class is a handle to the license token that allows a user to view DRM-protected content.

The DRMVoucher properties describe the viewing rights conferred by the voucher. You can get a voucher using the `loadVoucher()` method of the DRMManager object. This method requires a DRMContentData object, obtained with the `preloadEmbeddedMetadata()` method of the NetStream class (AIR only) or by using the `DRMContentData()` constructor. When using a media rights server such as Flash Access, you can get a DRMContentData object from the metadata generated by the media packager tool.

Related API Elements

flash.net.drm.DRMContentData
flash.net.drm.DRMManager.loadVoucher()
flash.net.NetStream.preloadEmbeddedData()

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | licenseID : String [read-only] The unique license ID for this voucher. | DRMVoucher
|  | offlineLeaseEndDate : Date [read-only] The date and time at which this voucher expires for offline playback. | DRMVoucher
|  | offlineLeaseStartDate : Date [read-only] The date and time at which this voucher becomes valid for offline playback. | DRMVoucher
|  | playbackTimeWindow : flash.net.drm:DRMPlaybackTimeWindow [read-only] The time period, after the first viewing, during which the associated content can be viewed or reviewed. | DRMVoucher
|  | policies : Object [read-only] The custom application-defined rights, if any, defined by the customer when packaging the content. | DRMVoucher
|  | policyID : String [read-only] The unique policy ID for this voucher. | DRMVoucher
|  | serverURL : String [read-only] The url to the license server for this DRMVoucher. | DRMVoucher
|  | voucherEndDate : Date [read-only] The date on which this voucher expires. | DRMVoucher
|  | voucherStartDate : Date [read-only] The beginning of this voucher's validity period. | DRMVoucher

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | toByteArray():ByteArray | DRMVoucher
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Returns the string representation of the specified object. | Object
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### licenseID

property

`licenseID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3.8, Flash Player 11.8

The unique license ID for this voucher.

Implementation
`public function get licenseID():String`

### offlineLeaseEndDate

property

`offlineLeaseEndDate:Date` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The date and time at which this voucher expires for offline playback.

If a voucher is only valid for the current online session, `offlineLeaseStartDate` is `null`.

Implementation
`public function get offlineLeaseEndDate():Date`

### offlineLeaseStartDate

property

`offlineLeaseStartDate:Date` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The date and time at which this voucher becomes valid for offline playback.

If a voucher is only valid for the current online session, `offlineLeaseStartDate` is `null`.

Implementation
`public function get offlineLeaseStartDate():Date`

### playbackTimeWindow

property

`playbackTimeWindow:flash.net.drm:DRMPlaybackTimeWindow` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The time period, after the first viewing, during which the associated content can be viewed or reviewed.

The time period allotted for viewing begins when the user first views the content and ends after the allotted amount of time has elapsed. If no time is allotted, the value of the `playbackTimeWindow` property is `null`.

Implementation
`public function get playbackTimeWindow():flash.net.drm:DRMPlaybackTimeWindow`

### policies

property

`policies:Object` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The custom application-defined rights, if any, defined by the customer when packaging the content.

If no custom rights have been defined, `null` will be returned.

Implementation
`public function get policies():Object`

### policyID

property

`policyID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 3.8, Flash Player 11.8

The unique policy ID for this voucher.

Implementation
`public function get policyID():String`

### serverURL

property

`serverURL:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The url to the license server for this DRMVoucher.

Implementation
`public function get serverURL():String`

### voucherEndDate

property

`voucherEndDate:Date` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The date on which this voucher expires.

Implementation
`public function get voucherEndDate():Date`

### voucherStartDate

property

`voucherStartDate:Date` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The beginning of this voucher's validity period.

Implementation
`public function get voucherStartDate():Date`
Method Detail

### toByteArray

()
method

`public function toByteArray():ByteArray`

Returns

| `ByteArray`

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00