Skip to main content
Participant
January 29, 2014
Question

Problem with DRMContentData in ActionScript3

  • January 29, 2014
  • 0 replies
  • 242 views

Hello,

I'm trying to create web video player to play DRM protected content. However, I have a problem reading DRM metadata from video file, or .metadata file as well. I've tried to do the same thing in AIR with same file, I've got example from help.adobe.com and it works well - it authenticates, gets voucher and plays video.

Here is my code:

var metaLoader: URLLoader = new URLLoader();

var metadata: DRMContentData;

var metaUrl: String = "url_to_my_file";

var metaRequest: URLRequest = new URLRequest(metaUrl);

metaLoader.dataFormat = URLLoaderDataFormat.BINARY;

metaLoader.addEventListener(Event.COMPLETE, onMetaLoad);

metaLoader.load(metaRequest);

function onMetaLoad(event: Event): void {

          try {

                    metadata = new DRMContentData(metaLoader.data);

          } catch (error: Error) {

         trace(error.toString());

          }

}

When I'm trying to trace properties from metadata, I get all nulls (i.e. serverURL, domain and etc.). I'm stuck on this problem and can't find solution for 3 days.

Thanks in advance,
Andrew

This topic has been closed for replies.