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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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

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

3 Get the voucher for the cont<strong>en</strong>t by performing one of the following tasks:<br />

a Use the DRMManager.loadVoucher() method.<br />

b Obtain the voucher from a differ<strong>en</strong>t device registered in the same device group. Provide the voucher to the<br />

DRMManager through the DRMManager.storeVoucher() method.<br />

4 Play the <strong>en</strong>crypted cont<strong>en</strong>t using the NetStream.play() method.<br />

To export the lic<strong>en</strong>se for the cont<strong>en</strong>t, any of the devices can provide the lic<strong>en</strong>se’s raw bytes using the<br />

DRMVoucher.toByteArray() method after obtaining the lic<strong>en</strong>se from the Flash Access Lic<strong>en</strong>se Server. Cont<strong>en</strong>t<br />

providers typically limit the number of devices in a device group. If the limit is reached, you may need to call the<br />

DRMManager.removeFromDeviceGroup() method on an unused device before registering the curr<strong>en</strong>t device.<br />

Lic<strong>en</strong>se preview<br />

The Flash application can s<strong>en</strong>d a lic<strong>en</strong>se preview request, meaning that the application can carry out a preview<br />

operation before asking the user to buy the cont<strong>en</strong>t in order to determine whether the user’s machine actually meets<br />

all the criteria required for playback. Lic<strong>en</strong>se preview refers to the cli<strong>en</strong>t's ability to preview the lic<strong>en</strong>se (to see what<br />

rights the lic<strong>en</strong>se allows) as opposed to previewing the cont<strong>en</strong>t (viewing a small portion of the cont<strong>en</strong>t before deciding<br />

to buy). Some of the parameters that are unique to each machine are: outputs available and their protection status, the<br />

runtime/DRM version available, and the DRM cli<strong>en</strong>t security level. The lic<strong>en</strong>se preview mode allows the<br />

runtime/DRM cli<strong>en</strong>t to test the lic<strong>en</strong>se server business logic and provide information back to the user so he can make<br />

an informed decision. Thus the cli<strong>en</strong>t can see what a valid lic<strong>en</strong>se looks like but would not actually receive the key to<br />

decrypt the cont<strong>en</strong>t. Support for lic<strong>en</strong>se preview is optional, and only necessary if you implem<strong>en</strong>t a custom application<br />

that uses this functionality.<br />

Delivering cont<strong>en</strong>t<br />

Flash Access is agnostic to the delivery mechanism of the cont<strong>en</strong>t as the Flash Player abstracts out the networking layer<br />

and simply provides the protected cont<strong>en</strong>t to the Flash Access subsystem. H<strong>en</strong>ce, cont<strong>en</strong>t can be delivered through<br />

HTTP, HTTP Dynamic Streaming, RTMP, or RTMPE.<br />

However, you may get some issues due to the necessity of the protected cont<strong>en</strong>t’s metadata (usually in the form of a<br />

‘.metadata’ file) before Flash Access can acquire a lic<strong>en</strong>se to decrypt the cont<strong>en</strong>t. Specifically, with the RTMP/RTMPE<br />

protocol, only FLV and F4V data can be delivered to the cli<strong>en</strong>t through the Flash Media Server (FMS). Because of this,<br />

the cli<strong>en</strong>t must retrieve the metadata blob by other ways. One option to solve this problem is to host the metadata on<br />

an HTTP web server, and implem<strong>en</strong>t the cli<strong>en</strong>t video player to retrieve the appropriate metadata, dep<strong>en</strong>ding on the<br />

cont<strong>en</strong>t being played back.<br />

Last updated 6/6/2012<br />

546

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

Saved successfully!

Ooh no, something went wrong!