page_type | languages | products | description | urlFragment | ||
---|---|---|---|---|---|---|
sample |
|
|
Azure Media Services enables your to dynamically encrypt your HTTP Live Streaming (HLS) content using Apple FairPlay. |
media-services-dotnet-dynamic-encryption-with-fairplay |
You can find the latest and most extensive Media Services v3 .NET samples in the Azure Media Services v3 repository.
Azure Media Services enables your to dynamically encrypt your HTTP Live Streaming (HLS) content using Apple FairPlay. When encrypting with FairPlay, individual video and audio samples are encrypted using the AES-128 CBC mode. FairPlay Streaming (FPS) is integrated into the device operating systems, with native support on iOS and Apple TV. Safari on OS X enables FPS using Encrypted Media Extensions (EME) interface support.
This sample shows you how to configure Azure Media Services to stream your content protected with FairPlay. It also shows how to specify to deliver the FairPlay licenses to your clients.
For detailed description of this sample, see this article.
To run this sample you will need:
- Visual Studio
- An Azure subscription
- Latest Azure Media Services .NET SDK (which will be installed when you re-build the project).
Update the appSettings section of the app.config file with appropriate values. For more information, see this topic.
<appSettings>
<add key="AMSAADTenantDomain" value="tenant"/>
<add key="AMSRESTAPIEndpoint" value="endpoint"/>
<add key="AMSClientId" value="id"/>
<add key="AMSClientSecret" value="secret"/>
<add key="Issuer" value="http://testacs.com" />
<add key="Audience" value="urn:test" />
</appSettings>
Make sure to start the streaming endpoint. For more information, see: streaming endpoints.
Clean the solution, rebuild the solution, and run it.
For more information, see Use Azure Media Services to Stream your HLS content Protected with Apple FairPlay.
You can view AMS learning paths here: