Using the DRMErrorEvent class



AIR dispatches a DRMErrorEvent object when a NetStream object, trying to play a digital rights management (DRM) encrypted file, encounters a DRM related error. In the case of invalid user credentials, the DRMAuthenticateEvent object handles the error by repeatedly dispatching until the user enters valid credentials, or the AIR application denies further attempts. The application should listen to any other DRM error events to detect, identify, and handle the DRM-related errors.

If a user enters valid credentials, they still may not be allowed to view the encrypted content, depending on the terms of the DRM voucher. For example, if the user is attempting to view the content in an unauthorized application, that is, an application that is not validated by the publisher of the encrypted content. In this case, a DRMErrorEvent object is dispatched. The error events can also be fired if the content is corrupted or if the application’s version does not match what is specified by the voucher. The application must provide appropriate mechanism for handling errors.

DRMErrorEvent properties

The DRMErrorEvent class includes the following property:

subErrorID

Indicates the minor error ID with more information about the underlying problem.

The following table lists the errors that the DRMErrorEvent object reports:

Major Error Code

Minor Error Code

Error Details

Description

1001

0

 

User authentication failed.

1002

0

 

Flash Media Rights Management Server (FMRMS) is not supporting Secure Sockets Layer (SSL).

1003

0

 

The content has expired and is no longer available for viewing.

1004

0

 

User authorization failure. This can occur, for example, if the user has not purchased the content and therefore does not have the rights to view it.

1005

0

Server URL

Cannot connect to the server.

1006

0

 

A client update is required, that is, Flash Media Rights Management Server (FMRMS) requires a new digital rights management (DRM) engine.

1007

0

 

Generic internal failure.

1008

Detailed decrypting error code

 

An incorrect license key.

1009

0

 

FLV content is corrupted.

1010

0

publisherID:applicationID

The ID of the viewing application does not match a valid ID supported by the content publisher.

1011

0

 

Application version does not match what is specified in the policy.

1012

0

 

Verification of the voucher associated with the encrypted content failed, indicating that the content may be corrupted.

1013

0

 

The voucher associated with the encrypted content could not be saved.

1014

0

 

Verification of the FLV header integrity failed, indicating that the content may be corrupted.

Major Error Code

Minor Error ID

Error Details

Description

3300

Adobe Policy Server error code

 

The application detected an invalid voucher associated with the content.

3301

0

 

User authentication failed.

3302

0

 

Secure Sockets Layer (SSL) is not supported by the Flash Media Rights Management Server (FMRMS).

3303

0

 

The content has expired and is no longer available for viewing.

3304

0

 

User authorization failure. This can occur even if the user is authenticated, for example, if the user has not purchased the rights to view the content.

3305

0

Server URL

Cannot connect to the server.

3306

0

 

A client update is required, that is, Flash Media Rights Management Server (FMRMS) requires a new digital rights management client engine.

3307

0

 

Generic internal digital rights management failure.

3308

Detailed decrypting error code

 

An incorrect license key.

3309

0

 

Flash video content is corrupted.

3310

0

publisherID:applicationID

The ID of the viewing application does not match a valid ID supported by the content publisher. In other words, the viewing application is not supported by the content provider.

3311

0

min=x:max=y

Application version does not match what is specified in the voucher.

3312

0

 

Verification of the voucher associated with the encrypted content failed, indicating that the content may be corrupted.

3313

0

 

The voucher associated with the encrypted content could not be saved to Microsafe.

3314

0

 

Verification of the FLV header integrity failed, indicating that the content may be corrupted.

3315

 

 

Remote playback of the DRM protected content is not allowed.

Creating a DRMErrorEvent handler

The following example creates an event handler for the NetStream object that originated the event. It is called when the NetStream encounters an error while attempting to play the DRM-encrypted content. Normally, when an application encounters an error, it performs any number of clean-up tasks, informs the user of the error, and provides options for solving the problem.