PlayReadyLicenseSession(IPropertySet) Konstruktor
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menginisialisasi instans baru kelas PlayReadyLicenseSession .
public:
PlayReadyLicenseSession(IPropertySet ^ configuration);
PlayReadyLicenseSession(IPropertySet const& configuration);
public PlayReadyLicenseSession(IPropertySet configuration);
function PlayReadyLicenseSession(configuration)
Public Sub New (configuration As IPropertySet)
Parameter
- configuration
- IPropertySet
Data konfigurasi untuk sesi lisensi.
Keterangan
Agar Anda dapat menggunakan kelas PlayReadyLicenseSession , Anda harus membangunnya dengan IPropertySet untuk digunakan dalam parameter konfigurasi . IPropertySet harus berisi hal-hal berikut:
- Properti harus diatur ke instans kelas MediaProtectionPMPServer yang valid.
- Instans kelas Windows.Media.Protection.MediaProtectionPMPServer harus diinisialisasi dengan IPropertySet yang mencakup properti berikut: + atur ke nilai string "{F4637010-03C3-42CD-B932-B48ADF3A6A54}".
- atur ke IPropertySet lain. IPropertySet terakhir tersebut harus memiliki properti yang diatur ke nilai string "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput".
Kode JavaScript berikut menunjukkan proses ini.
var cpsystems = new Windows.Foundation.Collections.PropertySet();
cpsystems["{F4637010-03C3-42CD-B932-B48ADF3A6A54}"] = "Windows.Media.Protection.PlayReady.PlayReadyWinRTTrustedInput"; // PlayReady
var pmpSystemInfo = new Windows.Foundation.Collections.PropertySet();
pmpSystemInfo["Windows.Media.Protection.MediaProtectionSystemId"] = "{F4637010-03C3-42CD-B932-B48ADF3A6A54}";
pmpSystemInfo["Windows.Media.Protection.MediaProtectionSystemIdMapping"] = cpsystems;
var pmpServer = new Windows.Media.Protection.MediaProtectionPMPServer( pmpSystemInfo );
var licenseSessionProperties = new Windows.Foundation.Collections.PropertySet();
licenseSessionProperties["Windows.Media.Protection.MediaProtectionPMPServer"] = pmpServer;
var licenseSession = new Windows.Media.Protection.PlayReady.PlayReadyLicenseSession( licenseSessionProperties );