Search code examples
silverlightdrmwma

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 supposed I could just try to play the file in a MediaElement but that doesn't seem efficient.


Solution

  • 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.