开发者

Silverlight - Determine if a wma is protected by DRM

Is there a way to determine if a wma file is DRM'd? I'd like to be able to do this in a trusted, out of browser Silverlight 4 application so pinvoke isn't an option. I suppo开发者_JAVA技巧sed I could just try to play the file in a MediaElement but that doesn't seem efficient.


Yes, check the MediaElement State during StateChanged event and you should be able to figure out if the video is DRMed or not.

There's a code sample @ "Digital Rights Management (DRM) - Detecting DRM State".

Quick word of friendly advise, since you're obviously going to work with DRM in Silverlight and you're lacking basic knowledge how that works - read the whole article. It'll do you a world of good.


Is file local or remote? For a local file you can read first N Kb of a file, parse ASF header and check if WMDRM headers are present.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜