13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Using digital rights managem<strong>en</strong>t<br />

Out-of-band Lic<strong>en</strong>ses<br />

Flash Player 11 and later, Adobe AIR 3.0 and later<br />

Lic<strong>en</strong>ses can also be obtained out-of-band (without contacting a Flash Access Lic<strong>en</strong>se Server) by storing the voucher<br />

(lic<strong>en</strong>se) on disk and in memory using the storeVoucher method.<br />

To play <strong>en</strong>crypted videos in Flash Player and AIR, the respective runtime needs to obtain the DRM voucher for that<br />

video. The DRM voucher contains the video’s decryption key and is g<strong>en</strong>erated by the Flash Access Lic<strong>en</strong>se Server that<br />

the customer has deployed.<br />

The Flash Player/AIR runtime g<strong>en</strong>erally obtains this voucher by s<strong>en</strong>ding a voucher request to the Flash Access Lic<strong>en</strong>se<br />

Server indicated in the video’s DRM metadata (DRMCont<strong>en</strong>tData class). The Flash/AIR application can trigger this<br />

lic<strong>en</strong>se request by calling the DRMManager.loadVoucher()method. Or, the Flash Player/AIR runtime will<br />

automatically request a lic<strong>en</strong>se at the start of the <strong>en</strong>crypted video playback if there is no lic<strong>en</strong>se for the cont<strong>en</strong>t on disk<br />

or in memory. In either case, the Flash/AIR application’s performance gets impacted by communicating with the Flash<br />

Access Lic<strong>en</strong>se Server.<br />

DRMManager.storeVoucher() allows the Flash/AIR application to s<strong>en</strong>d DRM vouchers that it has obtained out-ofband<br />

to the Flash Player/AIR runtime. The runtime can th<strong>en</strong> skip the lic<strong>en</strong>se request process and use the forwarded<br />

vouchers for playing <strong>en</strong>crypted videos. The DRM voucher still needs to be g<strong>en</strong>erated by the Flash Access Lic<strong>en</strong>se Server<br />

before it can be obtained out-of-band. However, you have the option of hosting the vouchers on any HTTP server,<br />

instead of a public-facing Flash Access lic<strong>en</strong>se server.<br />

DRMManager.storeVoucher() is also used to support DRM voucher sharing betwe<strong>en</strong> multiple devices. In Flash<br />

Access 3.0, this feature is referred to as “Domain Support”. If your deploym<strong>en</strong>t supports this use case, you can register<br />

multiple machines to a device group using the DRMManager.addToDeviceGroup() method. If there is a machine with<br />

a valid domain-bound voucher for a giv<strong>en</strong> cont<strong>en</strong>t, the AIR application can th<strong>en</strong> extract the serialized DRM vouchers<br />

using the DRMVoucher.toByteArray() method and on your other machines you can import the vouchers using the<br />

DRMManager.storeVoucher()method.<br />

Device registration<br />

The DRM vouchers are bound to the <strong>en</strong>d user’s machine. H<strong>en</strong>ce Flash /AIR applications will need a unique ID for the<br />

user’s machine to refer to the right serialized DRM voucher object. The following sc<strong>en</strong>ario depicts a device registration<br />

process:<br />

Assuming that you have performed the following tasks:<br />

You have set up the Flash Access Server SDK.<br />

You have set up an HTTP server for obtaining pre-g<strong>en</strong>erated lic<strong>en</strong>ses.<br />

You have created a Flash application to view the protected cont<strong>en</strong>t.<br />

The device registration phase involves the following actions:<br />

1 The Flash application creates a randomly g<strong>en</strong>erated ID.<br />

2 The Flash application invokes the DRMManager.auth<strong>en</strong>ticate() method. The application must include the<br />

randomly g<strong>en</strong>erated ID in the auth<strong>en</strong>tication request. For instance, include the ID in the username field.<br />

3 The action m<strong>en</strong>tioned in Step 2 will result in Flash Access s<strong>en</strong>ding an auth<strong>en</strong>tication request to the customer’s<br />

server. This request includes the device certificate.<br />

a The server extracts the device certificate and the g<strong>en</strong>erated ID from the request and stores.<br />

Last updated 6/6/2012<br />

544

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!