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.
A:
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.
AlexEzh
2009-12-19 01:53:21
+1
A:
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.
JustinAngel
2009-12-19 06:35:03
This is exactly what I needed - thanks Justin!
James Cadd
2009-12-20 15:56:58