Panoramica del modello di licenza PlayReady di Servizi multimedialiMedia Services PlayReady license template overview

Servizi multimediali di Azure offre ora un servizio per la distribuzione di licenze PlayReady.Azure Media Services now provides a service for delivering PlayReady licenses. Quando il giocatore (ad esempio Silverlight) cerca di riprodurre il contenuto protetto con PlayReady, viene inviata una richiesta al servizio di recapito di licenza per ottenere una licenza.When the player (for example, Silverlight) tries to play your PlayReady-protected content, a request is sent to the license delivery service to obtain a license. Se il servizio licenze approva la richiesta, genera il contratto a cui viene inviato al client e viene utilizzato per decrittografare e riprodurre il contenuto specificato.If the license service approves the request, it issues the license that is sent to the client and is used to decrypt and play the specified content.

Servizi multimediali fornisce inoltre API che consente di configurare le licenze PlayReady.Media Services also provides APIs that you can use to configure your PlayReady licenses. Le licenze contengono i diritti e le restrizioni che si desidera che il runtime di management (DRM) PlayReady DRM imporrà quando un utente tenta di riprodurre contenuto protetto.Licenses contain the rights and restrictions that you want the PlayReady digital rights management (DRM) runtime to enforce when a user tries to play back protected content. Di seguito sono riportati alcuni esempi di restrizioni di licenza PlayReady che è possibile specificare:Here are some examples of PlayReady license restrictions that you can specify:

  • Data e ora da cui la licenza è valida.The date and time from which the license is valid.
  • Valore DateTime di scadenza della licenza.The DateTime value when the license expires.
  • Salvataggio della licenza in archivio permanente nel client.For the license to be saved in persistent storage on the client. Le licenze permanenti vengono in genere usate per permettere la riproduzione offline del contenuto.Persistent licenses are typically used to allow offline playback of the content.
  • Il livello di sicurezza minimo che un lettore deve offrire per poter riprodurre il contenuto.The minimum security level that a player must have to play your content.
  • Livello di protezione dell'output per i controlli output del contenuto audio/video.The output protection level for the output controls for audio\video content.
  • Per ulteriori informazioni, vedere la sezione "Controlli Output" (3.5) nei regole di conformità di PlayReady documento.For more information, see the "Output Controls" section (3.5) in the PlayReady Compliance Rules document.

Nota

Attualmente, è possibile configurare solo l'elemento PlayRight della licenza PlayReady.Currently, you can only configure the PlayRight of the PlayReady license. Questo diritto è richiesto.This right is required. PlayRight consente al client di riprodurre il contenuto.The PlayRight gives the client the ability to play back the content. È inoltre possibile utilizzare l'elemento PlayRight per configurare le restrizioni per la riproduzione.You also can use the PlayRight to configure restrictions specific to playback. Per altre informazioni, vedere PlayReadyPlayRight.For more information, see PlayReadyPlayRight.

Per configurare le licenze PlayReady tramite servizi multimediali, è necessario configurare il modello di licenza PlayReady di servizi multimediali.To configure PlayReady licenses by using Media Services, you must configure the Media Services PlayReady license template. Il modello è definito in XML.The template is defined in XML.

L'esempio seguente mostra il modello più semplice e comune che configura una licenza di streaming di base.The following example shows the simplest (and most common) template that configures a basic streaming license. Con questa licenza i client possono riprodurre il contenuto protetto con PlayReady.With this license, your clients can play back your PlayReady-protected content.

<?xml version="1.0" encoding="utf-8"?>
<PlayReadyLicenseResponseTemplate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
                                  xmlns="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1">
  <LicenseTemplates>
    <PlayReadyLicenseTemplate>
      <ContentKey i:type="ContentEncryptionKeyFromHeader" />
      <PlayRight />
    </PlayReadyLicenseTemplate>
  </LicenseTemplates>
</PlayReadyLicenseResponseTemplate>

Il codice XML è conforme allo schema XML modello di licenza PlayReady, definito nella sezione "Schema XML modello di licenza di PlayReady".The XML conforms to the PlayReady license template XML schema defined in the "PlayReady license template XML schema" section.

Servizi multimediali definisce inoltre un set di classi .NET che può essere utilizzato per serializzare e deserializzare da e verso il codice XML.Media Services also defines a set of .NET classes that can be used to serialize and deserialize to and from the XML. Per una descrizione delle classi principali, vedere il classi .NET di servizi multimediali che consentono di configurare modelli di licenza.For a description of the main classes, see the Media Services .NET classes that are used to configure license templates.

Per un esempio end-to-end che utilizza le classi .NET per configurare il modello di licenza PlayReady, vedere crittografia dinamica PlayReady utilizzare e il servizio di recapito licenza.For an end-to-end example that uses .NET classes to configure the PlayReady license template, see Use PlayReady dynamic encryption and the license delivery service.

Classi .NET di Servizi multimediali che vengono usate per configurare i modelli di licenzaMedia Services .NET classes that are used to configure license templates

Le classi seguenti sono le classi .NET principali utilizzati per configurare i modelli di licenza PlayReady di servizi multimediali.The following classes are the main .NET classes that are used to configure Media Services PlayReady license templates. Queste classi vengono mappate ai tipi definiti in Schema XML del modello di licenza PlayReady.These classes map to the types defined in PlayReady license template XML schema.

La MediaServicesLicenseTemplateSerializer viene usata per serializzare e deserializzare da e verso l'XML del modello di licenza di Servizi multimediali.The MediaServicesLicenseTemplateSerializer class is used to serialize and deserialize to and from the Media Services license template XML.

PlayReadyLicenseResponseTemplatePlayReadyLicenseResponseTemplate

PlayReadyLicenseResponseTemplate: questa classe rappresenta il modello per la risposta inviata all'utente.PlayReadyLicenseResponseTemplate: This class represents the template for the response sent back to the user. Contiene un campo di una stringa di dati personalizzati tra il server licenze e l'applicazione (che potrebbe essere utile per la logica app personalizzata).It contains a field for a custom data string between the license server and the application (which might be useful for custom app logic). Contiene inoltre un elenco di uno o più modelli di licenza.It also contains a list of one or more license templates.

Come la classe "principale" nella gerarchia dei modelli, il modello di risposta include un elenco di modelli di licenza.As the "top-level" class in the template hierarchy, the response template includes a list of license templates. I modelli di licenza includono (direttamente o indirettamente) tutte le altre classi che costituiscono i dati del modello da serializzare.The license templates include (directly or indirectly) all the other classes that make up the template data to be serialized.

PlayReadyLicenseTemplatePlayReadyLicenseTemplate

PlayReadyLicenseTemplate: questa classe rappresenta un modello di licenza che viene utilizzato per creare licenze PlayReady da restituire agli utenti.PlayReadyLicenseTemplate: This class represents a license template that is used to create PlayReady licenses to be returned to users. Contiene i dati alla chiave simmetrica nella licenza.It contains the data on the content key in the license. Include anche eventuali diritti e restrizioni che il runtime di PlayReady DRM deve applicare quando viene utilizzata la chiave simmetrica.It also includes any rights or restrictions that the PlayReady DRM runtime must enforce when the content key is used.

PlayReadyPlayRightPlayReadyPlayRight

PlayReadyPlayRight: questa classe rappresenta l'elemento PlayRight di una licenza PlayReady.PlayReadyPlayRight: This class represents the PlayRight of a PlayReady license. L'utente garantisce la possibilità di riprodurre il contenuto in base alle limitazioni configurate nella licenza e nell'elemento PlayRight stesso (per i criteri specifici di riproduzione).It grants the user the ability to play back the content subject to any restrictions configured in the license and on the PlayRight itself (for playback-specific policy). La maggior parte dei criteri in un elemento PlayRight riguarda restrizioni di output che controllano i tipi di output che può essere riprodotto il contenuto.Much of the policy on a PlayRight concerns output restrictions that control the types of outputs that the content can be played over. Include anche eventuali restrizioni che devono essere inserite sul posto, quando viene utilizzato un determinato output.It also includes any restrictions that must be put in place when a given output is used. Se, ad esempio, DigitalVideoOnlyContentRestriction è abilitato, solo il runtime DRM consente il video da visualizzare su output digitali.For example, if DigitalVideoOnlyContentRestriction is enabled, the DRM runtime only allows the video to be displayed over digital outputs. (Gli output video analogici non sono consentiti per passare il contenuto).(Analog video outputs aren't allowed to pass the content.)

Importante

I tipi di restrizioni possono essere efficaci, ma possono influenzare anche l'esperienza di consumer.These types of restrictions can be powerful, but they also can affect the consumer experience. Se le protezioni dell'output sono troppo restrittive, il contenuto potrebbe essere non riproducibile in alcuni client.If the output protections are too restrictive, the content might be unplayable on some clients. Per ulteriori informazioni, vedere il regole di conformità di PlayReady.For more information, see the PlayReady Compliance Rules.

Per un esempio della protezione livelli che supporta Silverlight, vedere supporto Silverlight per la protezione dell'output.For an example of the protection levels that Silverlight supports, see Silverlight support for output protections.

Schema XML del modello di licenza PlayReadyPlayReady license template XML schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1" xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Azure/MediaServices/KeyDelivery/PlayReadyTemplate/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="AgcAndColorStripeRestriction">
    <xs:sequence>
      <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="AgcAndColorStripeRestriction" nillable="true" type="tns:AgcAndColorStripeRestriction" />
  <xs:simpleType name="ContentType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unspecified" />
      <xs:enumeration value="UltravioletDownload" />
      <xs:enumeration value="UltravioletStreaming" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="ContentType" nillable="true" type="tns:ContentType" />
  <xs:complexType name="ExplicitAnalogTelevisionRestriction">
    <xs:sequence>
      <xs:element minOccurs="0" name="BestEffort" type="xs:boolean" />
      <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ExplicitAnalogTelevisionRestriction" nillable="true" type="tns:ExplicitAnalogTelevisionRestriction" />
  <xs:complexType name="PlayReadyContentKey">
    <xs:sequence />
  </xs:complexType>
  <xs:element name="PlayReadyContentKey" nillable="true" type="tns:PlayReadyContentKey" />
  <xs:complexType name="ContentEncryptionKeyFromHeader">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:PlayReadyContentKey">
        <xs:sequence />
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ContentEncryptionKeyFromHeader" nillable="true" type="tns:ContentEncryptionKeyFromHeader" />
  <xs:complexType name="ContentEncryptionKeyFromKeyIdentifier">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:PlayReadyContentKey">
        <xs:sequence>
          <xs:element minOccurs="0" name="KeyIdentifier" type="ser:guid" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="ContentEncryptionKeyFromKeyIdentifier" nillable="true" type="tns:ContentEncryptionKeyFromKeyIdentifier" />
  <xs:complexType name="PlayReadyLicenseResponseTemplate">
    <xs:sequence>
      <xs:element name="LicenseTemplates" nillable="true" type="tns:ArrayOfPlayReadyLicenseTemplate" />
      <xs:element minOccurs="0" name="ResponseCustomData" nillable="true" type="xs:string">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="PlayReadyLicenseResponseTemplate" nillable="true" type="tns:PlayReadyLicenseResponseTemplate" />
  <xs:complexType name="ArrayOfPlayReadyLicenseTemplate">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="PlayReadyLicenseTemplate" nillable="true" type="tns:PlayReadyLicenseTemplate" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfPlayReadyLicenseTemplate" nillable="true" type="tns:ArrayOfPlayReadyLicenseTemplate" />
  <xs:complexType name="PlayReadyLicenseTemplate">
    <xs:sequence>
      <xs:element minOccurs="0" name="AllowTestDevices" type="xs:boolean" />
      <xs:element minOccurs="0" name="BeginDate" nillable="true" type="xs:dateTime">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element name="ContentKey" nillable="true" type="tns:PlayReadyContentKey" />
      <xs:element minOccurs="0" name="ContentType" type="tns:ContentType">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ExpirationDate" nillable="true" type="xs:dateTime">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="GracePeriod" nillable="true" type="ser:duration">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="LicenseType" type="tns:PlayReadyLicenseType" />
      <xs:element minOccurs="0" name="PlayRight" nillable="true" type="tns:PlayReadyPlayRight" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="PlayReadyLicenseTemplate" nillable="true" type="tns:PlayReadyLicenseTemplate" />
  <xs:simpleType name="PlayReadyLicenseType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Nonpersistent" />
      <xs:enumeration value="Persistent" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="PlayReadyLicenseType" nillable="true" type="tns:PlayReadyLicenseType" />
  <xs:complexType name="PlayReadyPlayRight">
    <xs:sequence>
      <xs:element minOccurs="0" name="AgcAndColorStripeRestriction" nillable="true" type="tns:AgcAndColorStripeRestriction">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="AllowPassingVideoContentToUnknownOutput" type="tns:UnknownOutputPassingOption">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="AnalogVideoOpl" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="CompressedDigitalAudioOpl" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="CompressedDigitalVideoOpl" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="DigitalVideoOnlyContentRestriction" type="xs:boolean">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ExplicitAnalogTelevisionOutputRestriction" nillable="true" type="tns:ExplicitAnalogTelevisionRestriction">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="FirstPlayExpiration" nillable="true" type="ser:duration">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ImageConstraintForAnalogComponentVideoRestriction" type="xs:boolean">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ImageConstraintForAnalogComputerMonitorRestriction" type="xs:boolean">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="ScmsRestriction" nillable="true" type="tns:ScmsRestriction">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="UncompressedDigitalAudioOpl" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" name="UncompressedDigitalVideoOpl" nillable="true" type="xs:int">
        <xs:annotation>
          <xs:appinfo>
            <DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="PlayReadyPlayRight" nillable="true" type="tns:PlayReadyPlayRight" />
  <xs:simpleType name="UnknownOutputPassingOption">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NotAllowed" />
      <xs:enumeration value="Allowed" />
      <xs:enumeration value="AllowedWithVideoConstriction" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="UnknownOutputPassingOption" nillable="true" type="tns:UnknownOutputPassingOption" />
  <xs:complexType name="ScmsRestriction">
    <xs:sequence>
      <xs:element minOccurs="0" name="ConfigurationData" type="xs:unsignedByte" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ScmsRestriction" nillable="true" type="tns:ScmsRestriction" />
</xs:schema>

Percorsi di apprendimento di Servizi multimedialiMedia Services learning paths

Altre informazioni sui percorsi di apprendimento di Servizi multimediali di Azure:Read about the Azure Media Services learning paths:

Fornire commenti e suggerimentiProvide feedback

Usare il forum di suggerimenti degli utenti per fornire commenti e suggerimenti su come migliorare Servizi multimediali di Azure.Use the User Voice forum to provide feedback and make suggestions on how to improve Azure Media Services. È anche possibile passare direttamente a una delle categorie seguenti:You also can go directly to one of the following categories: