flash.net.drmVoucherAccessInfo A VoucherAccessInfo object presents the information that is required to successfully retrieve and consume a voucher, such as the type of authentication and the content domain of the media rights server.Object A VoucherAccessInfo object presents the information that is required to successfully retrieve and consume a voucher, such as the type of authentication and the content domain of the media rights server. authenticationMethod The type of authentication required to obtain a voucher for the associated content.String 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.

displayName A user-friendly string that you can use to refer to the specified VoucherAccessInfo object in the user interface.String A user-friendly string that you can use to refer to the specified VoucherAccessInfo object in the user interface.

If the metadata file for a piece of media content has multiple vouchers, each with its own VoucherAccessInfo object, the user might need to decide which voucher to authenticate to. For example, you might have a subscription-level voucher with high privileges for viewing content, as well as a basic-level voucher with lower privileges. To distinguish between these two vouchers, use the descriptive string in the displayName property. The string is set by the media packager tool (the tool that packages and encrypts media in preparation for distribution with a media rights server, such as Flash Access).

For applications that are localized, you can use this property as an identifier. The application can detect the locale and localize the strings accordingly.

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

If authentication is to the default domain or no authentication is required, the value of domainName is null.

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.

DRMContentData The DRMContentData class provides the information required to obtain the voucher necessary to view DRM-protected content.Object 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.

flash.net.NetStreamflash.net.drm.DRMManagerflash.net.drm.DRMVoucherDRMContentData Constructor.rawDataflash.utils:ByteArraynull Constructor. getVoucherAccessInfo Retrieves an array of VoucherAccessInfo objects. 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.

authenticationMethod The type of authentication required to obtain a voucher for the associated content.String 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.

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

If authentication is to the default domain or no authentication is required, the value of domainName is null.

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.

licenseID A unique id identifying the content associated with this metadata on the media rights server.String A unique id identifying the content associated with this metadata on the media rights server. serverURL The URL of a media rights server that provides the voucher that is required to view the associated content.String The URL of a media rights server that provides the voucher that is required to view the associated content.
DRMVoucher The DRMVoucher class is a handle to the license token that allows a user to view DRM-protected content.Object 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.

flash.net.drm.DRMContentDataflash.net.drm.DRMManager.loadVoucher()flash.net.NetStream.preloadEmbeddedData()offlineLeaseEndDate The date and time at which this voucher expires for offline playback.Date 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.

offlineLeaseStartDate The date and time at which this voucher becomes valid for offline playback.Date 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.

playbackTimeWindow The time period, after the first viewing, during which the associated content can be viewed or reviewed.flash.net.drm:DRMPlaybackTimeWindow 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.

policies A dynamic object that reports policies defined by the application.Object A dynamic object that reports policies defined by the application.

The policy object contains a name-value pair for each policy in effect.

voucherEndDate The date on which this voucher expires.Date The date on which this voucher expires. voucherStartDate The beginning of this voucher's validity period.Date The beginning of this voucher's validity period.
DRMPlaybackTimeWindow The DRMPlaybackTimeWindow class represents the period of time during which a DRM voucher is valid.Object The DRMPlaybackTimeWindow class represents the period of time during which a DRM voucher is valid.

The startDate and endDate properties are null until the first time that the user views the content.

flash.net.drm.DRMVoucherendDate The end date for the period of time during which a DRM voucher is valid (the playback window).Date The end date for the period of time during which a DRM voucher is valid (the playback window).

The endDate is null if the playback window has not started.

period The period of time during which a DRM voucher is valid (the playback window), in seconds.uint The period of time during which a DRM voucher is valid (the playback window), in seconds. startDate The start date for the period of time during which a DRM voucher is valid (the playback window).Date The start date for the period of time during which a DRM voucher is valid (the playback window).

The startDate is null if the playback window has not started.

LoadVoucherSetting The LoadVoucherSetting class provides string constants for use with the settings parameter of the DRMManager loadVoucher() method.Defines constants for setting the DRMManager voucher loading options. Object The LoadVoucherSetting class provides string constants for use with the settings parameter of the DRMManager loadVoucher() method. ALLOW_SERVER Loads the voucher from the local cache, if possible; downloads the voucher from a media rights server only if a locally cached copy does not exist.allowServerString Loads the voucher from the local cache, if possible; downloads the voucher from a media rights server only if a locally cached copy does not exist. FORCE_REFRESH Downloads the voucher from the media rights server only.forceRefreshString Downloads the voucher from the media rights server only. Does not load the voucher from the local cache. LOCAL_ONLY Loads the voucher from the local cache only.localOnlyString Loads the voucher from the local cache only. Does not download the voucher from a media rights server. AuthenticationMethod The AuthenticationMethod class provides string constants enumerating the different types of authentication used by the authenticationMethod property of the DRMContentData class.Object The AuthenticationMethod class provides string constants enumerating the different types of authentication used by the authenticationMethod property of the DRMContentData class. flash.net.drm.DRMContentDataANONYMOUS Indicates that no authentication is required.anonymousString Indicates that no authentication is required. USERNAME_AND_PASSWORD Indicates that a valid user name and password are required.usernameAndPasswordString Indicates that a valid user name and password are required. DRMManager The DRMManager manages the retrieval and storage of the vouchers needed to view DRM-protected content.flash.events:EventDispatcher The DRMManager manages the retrieval and storage of the vouchers needed to view DRM-protected content. With the static DRMManager.getDRMManager() method, you can access the existing DRMManager object to perform the following DRM-management tasks:
  • Preload vouchers from a media rights server, using a DRMContentData object.
  • Query the local cache for an individual voucher, using a DRMContentData object.
  • Reset all vouchers (AIR only)

No method is provided for enumerating all the vouchers in the local cache.

Do not create an instance of the DRMManager class. Use the static DRMManager.getDRMManager() to access the existing DRMManager object.

AIR profile support: This feature is supported on all desktop operating systems and AIR for TV devices, but it is not supported on mobile devices. You can test for support at run time using the DRMManager.isSupported property. See AIR Profile Support for more information regarding API support across multiple profiles.

flash.net.NetStreamflash.net.drm.DRMVoucherflash.net.drm.DRMContentDatadrmError The DRMManager dispatches a DRMErrorEvent object when a requested voucher cannot be obtained from the media rights server.flash.events.DRMErrorEvent.DRM_ERRORflash.events.DRMErrorEvent The DRMManager dispatches a DRMErrorEvent object when a requested voucher cannot be obtained from the media rights server.

Note: When an attempt to load a voucher from the local voucher cache (using the localOnly as the source parameter) fails, a DRMErrorEvent object is not dispatched. Instead, a DRMStatusEvent object with a voucher property set to null is dispatched.

drmStatus The DRMManager dispatches a DRMStatusEvent object when a requested voucher is obtained from the media rights server.flash.events.DRMStatusEvent.DRM_STATUSflash.events.DRMStatusEvent The DRMManager dispatches a DRMStatusEvent object when a requested voucher is obtained from the media rights server. authenticationError The DRMManager dispatches a DRMAuthenticationErrorEvent object when the user is not authenticated by the media rights server after a call to the authenticate() method.flash.events.DRMAuthenticationErrorEvent.AUTHENTICATION_ERRORflash.events.DRMAuthenticationErrorEventDispatched by the DRMManager object when user authentication fails. The DRMManager dispatches a DRMAuthenticationErrorEvent object when the user is not authenticated by the media rights server after a call to the authenticate() method. authenticationComplete The DRMManager dispatches a DRMAuthenticationCompleteEvent object when the user is authenticated by the media rights server after a call to the authenticate() method.flash.events.DRMAuthenticationCompleteEvent.AUTHENTICATION_COMPLETEflash.events.DRMAuthenticationCompleteEventDispatched by the DRMManager object when user authentication is complete. The DRMManager dispatches a DRMAuthenticationCompleteEvent object when the user is authenticated by the media rights server after a call to the authenticate() method. authenticate Authenticates a user.serverURLStringThe URL of a media rights server that can provide a voucher for viewing protected content domainStringA domain on the server (not a network or Internet domain name) usernameStringThe user name passwordStringThe user password Authenticates a user.

Listen for the authenticationComplete and authenticationError events to determine the outcome of the authentication attempt. Multiple authenticate() calls are queued. The AuthenticationCompleteEvent object dispatched for the authenticationComplete event contains contains an authentication token that your application can save.

You can use a saved authentication token, or a token downloaded by another means, to establish an authenticated session with the media rights server in the future. To establish a session using a token, call the DRMManager setAuthenticationToken() method. The properties of the token, such as expiration date, are determined by the settings of the server that generates the token.

Important (AIR only): The authenticate() method will not succeed when a user's Internet connection passes through a proxy server requiring authentication. Although such users are not able to preload a DRM voucher that requires authentication, your application can obtain the voucher by beginning playback and using the NetStream setAuthenticationCredentials() method to log the user into both the proxy and the media rights servers. Once the voucher has been obtained, the user can view the content offline (as long as the license represented by the voucher allows offline playback).

flash.net.NetStream.setAuthenticationCredentials()setAuthenticationToken()
getDRMManager Returns an instance of the singleton DRMManager object.flash.net.drm:DRMManager Returns an instance of the singleton DRMManager object.

One DRMManager instance exists for each security domain.

flash.system.SecurityDomain
loadPreviewVoucher Gets a preview voucher from the license server, which you can use to let a user verify that they can play content on particular computer.contentDataflash.net.drm:DRMContentData Gets a preview voucher from the license server, which you can use to let a user verify that they can play content on particular computer. This capability lets users verify that they can play content on their computer before buying and downloading the content. It is useful when the user's computer doesn't have the necessary output protection capabilities or necessary software to play content.

Like loadVoucher(), this method is an asynchronous call and issues a DRMStatusEvent on completion or a DRMErrorEvent in case of errors.

loadVoucher Loads a voucher from a media rights server or the local voucher cache.contentDataflash.net.drm:DRMContentDataThe DRMContentData object from a DRM-protected media file settingStringDetermines whether the voucher is retrieved from the local cache or the media rights server Loads a voucher from a media rights server or the local voucher cache.

The voucher is loaded according to the setting parameter:

  • LoadVoucherSetting.FORCE_REFRESH: The voucher is always downloaded from the media rights server.
  • LoadVoucherSetting.LOCAL_ONLY: The voucher is only loaded from the local cache.
  • LoadVoucherSetting.ALLOW_SERVER: The voucher is loaded from the local cache, if possible, but otherwise is downloaded from the server.

The LoadVoucherSetting class defines string constants to use as values for the setting parameter.

When the voucher is successfully loaded, the DRMManager dispatches a DRM status event. Your application can begin playback as soon as the voucher is loaded. The loaded voucher is available in the voucher property of the dispatched DRMStatusEvent object. You can use this voucher object to display the associated media rights information to the user.

If a voucher cannot be loaded from the media rights server, a DRM error event is dispatched. The errorID property of the dispatched DRMErrorEvent object indicates the reason for the failure. Common causes of failure include attempting to connect to the media rights server when the user is offline and attempting to load a voucher when the user is not logged in. Your application can respond to these errors and take corrective action. For example, if authentication credentials are required to download the voucher, you can prompt the user for their account user name and password, call the DRMManager authenticate() method, and then attempt to load the voucher again.

If a voucher cannot be obtained from the local cache and the localOnly setting is used, a DRMErrorEvent is not dispatched. Instead, a DRM status event is dispatched. The detail property of this DRMStatusEvent object is still DRM.voucherObtained, but the voucher property is null.

resetDRMVouchers Deletes all locally cached digital rights management (DRM) voucher data.The voucher data cannot be deleted. IOErrorflash.errors:IOError Deletes all locally cached digital rights management (DRM) voucher data.

The application must download the required vouchers again for the user to be able to access encrypted content. Calling this function is equivalent to calling Netstream.resetDRMVouchers().

flash.net.NetStream.resetDRMVouchers()
setAuthenticationToken Sets the authentication token to use for communication with the specified server and domain.serverUrlStringThe URL of the media rights server domainStringThe domain on the media rights server tokenflash.utils:ByteArrayThe authentication token Sets the authentication token to use for communication with the specified server and domain.

Authentication tokens are available from the token property of the DRMAuthenticationCompleteEvent object dispatched after a successful call to the authenticate() method. The token is cached automatically for the session, but you can use the setAuthenticationToken() method to manage tokens directly.

Setting a token overwrites any existing cached token for the server and domain. Set the token parameter to null to clear the cached token.

isSupported The isSupported property is set to true if the DRMManager class is supported on the current platform, otherwise it is set to false.BooleanReports whether the DRMManager class is supported on the client system. The isSupported property is set to true if the DRMManager class is supported on the current platform, otherwise it is set to false.