flash.net.drm

# DRMContentData - AS3

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

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The DRMContentData class provides the information required to obtain the voucher necessary to view DRM-protected content.

(AIR only) A DRMContentData object can be obtained from a NetStream instance by calling the NetStream `preloadEmbeddedContent()` method and providing an `onDRMContentData` callback function on the NetStream client object. Use the DRMContentData object passed to the callback function as a parameter for the DRMManager `loadVoucher()` method.

When you package content with Flash Access, you have the option of saving the content's metadata as a separate file. To create a new DRMContentData object, get this metadata with a URLLoader object and pass it to the DRMContentData constructor.

More examples

Using the DRMContentData class

Related API Elements

flash.net.NetStream
flash.net.drm.DRMManager
flash.net.drm.DRMVoucher

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | authenticationMethod : String [read-only] The type of authentication required to obtain a voucher for the associated content. | DRMContentData
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | domain : String [read-only] The content domain of the media rights server to which the user must be authenticated to obtain the voucher for the associated content. | DRMContentData
|  | licenseID : String [read-only] A unique id identifying the content associated with this metadata on the media rights server. | DRMContentData
|  | serverURL : String [read-only] The URL of a media rights server that provides the voucher that is required to view the associated content. | DRMContentData

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | DRMContentData(rawData:ByteArray = null) Constructor. | DRMContentData
|  | getVoucherAccessInfo():Vector.<VoucherAccessInfo> Retrieves an array of VoucherAccessInfo objects. | DRMContentData
|  | 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
|  | 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

### authenticationMethod

property

`authenticationMethod:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The type of authentication required to obtain a voucher for the associated content.

The supported types of authentication are:

- AuthenticationMethod.ANONYMOUS — anyone can obtain a voucher.
- AuthenticationMethod.USERNAME_AND_PASSWORD — the user must supply a valid username and password of an account that is authorized to view the associated content.

The AuthenticationMethod class provides string constants to use with the `authenticationMethod` property.

Implementation
`public function get authenticationMethod():String`

### domain

property

`domain:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The content domain of the media rights server to which the user must be authenticated to obtain the voucher for the associated content.

Note: The domain returned by this property has nothing to do with network or Internet domain names. In this case, a domain is a group of content or user accounts. For example, a single server could support several domains, each with its own set of content channels and subscribers.

Implementation
`public function get domain():String`

### licenseID

property

`licenseID:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

A unique id identifying the content associated with this metadata on the media rights server.

Implementation
`public function get licenseID():String`

### serverURL

property

`serverURL:String` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 1.5, Flash Player 10.1

The URL of a media rights server that provides the voucher that is required to view the associated content.

Implementation
`public function get serverURL():String`
Constructor Detail

### DRMContentData

()
Constructor

`public function DRMContentData(rawData:ByteArray = null)`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 2, Flash Player 10.1

Constructor.

Parameters

| `rawData:ByteArray` (default = `null`)``

Method Detail

### getVoucherAccessInfo

()
method

`public function getVoucherAccessInfo():Vector.<VoucherAccessInfo>`

Language Version: | ActionScript 3.0

Runtime Versions: | AIR 2, Flash Player 10.1

Retrieves an array of VoucherAccessInfo objects. The array contains at least 1 VoucherAccessInfo object, the default.

Each VoucherAccessInfo object represents a policy, which contains the requirements for retrieving a voucher from the media rights server. For example, if the server requires the user to authenticate, the VoucherAccessInfo object contains the authentication method. If the server requires the computer to be registered with a Realm server, the object contains the URL to the Realm server.

Returns

| `Vector.<VoucherAccessInfo>`

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