private void Button_PlayReady_LicenseAcquisition_Click(object sender, RoutedEventArgs e) { LicenseAcquirer licenseAcquirer = new LicenseAcquirer(); // TCR 185 : VID PlayReady License Acquisition // The License Acquisition MUST be done over SSL // There must be a user connected to Xbox Live for SSL to work and the application should handle that. licenseAcquirer.LicenseServerUriOverride = new Uri("https://playready.directtaps.net/PR2_00/svc/LiveTVRootLicenses/rightsmanager.asmx"); // ChallengeCustomData adds a string to the LicenseChallenge that // the business logic on the License Server uses to determine what license // to send to the client. licenseAcquirer.ChallengeCustomData = "UserAccount:0"; licenseAcquirer.AcquireLicenseCompleted += new EventHandler<AcquireLicenseCompletedEventArgs>(licenseAcquirer_AcquireLicenseCompleted); // Asynchronously acquire the root license. // Use an Empty ServiceID since PlayReady Domains are not supported on Xbox. licenseAcquirer.AcquireLicenseAsync(Guid.Empty); }
public void Dettach(MediaElement target) { if (this.LicenseAcquirer != null) { target.LicenseAcquirer = this.LicenseAcquirer; this.LicenseAcquirer = null; } if (this.Markers.Count > 0) { foreach (var marker in this.Markers) { target.Markers.Add(marker); } this.Markers.Clear(); } if (this.Stream != null) { target.SetSource(this.Stream); this.Stream = null; } else if (this.Source != null) { target.Source = this.Source; } }