static public PlayReadyLicenseSession createLicenseSession() { //A setting to tell MF that we are using PlayReady. var propSetMF = new Windows.Foundation.Collections.PropertySet(); propSetMF["Windows.Media.Protection.MediaProtectionSystemId"] = "{F4637010-03C3-42CD-B932-B48ADF3A6A54}"; var cpsystems = new Windows.Foundation.Collections.PropertySet(); cpsystems["{F4637010-03C3-42CD-B932-B48ADF3A6A54}"] = "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput"; //Playready TrustedInput Class Name propSetMF["Windows.Media.Protection.MediaProtectionSystemIdMapping"] = cpsystems; //Create the MF media session that the license will be tied to var pmpServer = new Windows.Media.Protection.MediaProtectionPMPServer(propSetMF); var propSetPMPServer = new Windows.Foundation.Collections.PropertySet(); //Set the property for the LicenseSession. This tells PlayReady to tie the license to that particular media session propSetPMPServer["Windows.Media.Protection.MediaProtectionPMPServer"] = pmpServer; var licenseSession = new Windows.Media.Protection.PlayReady.PlayReadyLicenseSession(propSetPMPServer); return licenseSession; }
public PlayReadyLicenseSession createLicenseSession() { Debug.WriteLine("Enter createLicenseSession"); //A setting to tell MF that we are using PlayReady. var propSet = new Windows.Foundation.Collections.PropertySet(); propSet["Windows.Media.Protection.MediaProtectionSystemId"] = "{F4637010-03C3-42CD-B932-B48ADF3A6A54}"; var cpsystems = new Windows.Foundation.Collections.PropertySet(); cpsystems["{F4637010-03C3-42CD-B932-B48ADF3A6A54}"] = "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput"; //Playready TrustedInput Class Name propSet["Windows.Media.Protection.MediaProtectionSystemIdMapping"] = cpsystems; Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; if (localSettings.Containers.ContainsKey("PlayReady") && localSettings.Containers["PlayReady"].Values.ContainsKey("SoftwareOverride")) { int UseSoftwareProtectionLayer = (int)localSettings.Containers["PlayReady"].Values["SoftwareOverride"]; if (UseSoftwareProtectionLayer == 1) { Debug.WriteLine(" "); Debug.WriteLine("***** Use Software Protection Layer for createLicenseSession ******"); propSet["Windows.Media.Protection.UseSoftwareProtectionLayer"] = true; } } //Create the MF media session that the license will be tied to var pmpServer = new Windows.Media.Protection.MediaProtectionPMPServer(propSet); var propSet2 = new Windows.Foundation.Collections.PropertySet(); //Set the property for the LicenseSession. This tells PlayReady to tie the license to that particular media session propSet2["Windows.Media.Protection.MediaProtectionPMPServer"] = pmpServer; this.licenseSession = new Windows.Media.Protection.PlayReady.PlayReadyLicenseSession(propSet2); Debug.WriteLine("Exit createLicenseSession"); return(this.licenseSession); }
static public PlayReadyLicenseSession createLicenseSession() { //A setting to tell MF that we are using PlayReady. var propSetMF = new Windows.Foundation.Collections.PropertySet(); propSetMF["Windows.Media.Protection.MediaProtectionSystemId"] = "{F4637010-03C3-42CD-B932-B48ADF3A6A54}"; var cpsystems = new Windows.Foundation.Collections.PropertySet(); cpsystems["{F4637010-03C3-42CD-B932-B48ADF3A6A54}"] = "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput"; //Playready TrustedInput Class Name propSetMF["Windows.Media.Protection.MediaProtectionSystemIdMapping"] = cpsystems; //Create the MF media session that the license will be tied to var pmpServer = new Windows.Media.Protection.MediaProtectionPMPServer(propSetMF); var propSetPMPServer = new Windows.Foundation.Collections.PropertySet(); //Set the property for the LicenseSession. This tells PlayReady to tie the license to that particular media session propSetPMPServer["Windows.Media.Protection.MediaProtectionPMPServer"] = pmpServer; var licenseSession = new Windows.Media.Protection.PlayReady.PlayReadyLicenseSession(propSetPMPServer); return(licenseSession); }