Azure Media Player不适用于iPhone上的AES保护 [英] Azure Media Player does not work with AES protection on iPhone

查看:111
本文介绍了Azure Media Player不适用于iPhone上的AES保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在iPhone 6(A1586)上播放受AES(具有JWT令牌认证)视频保护的问题.拖欠以下错误:

We are having issues playing a protected with AES (with JWT token authentication) video on iPhone 6 (A1586). The following error arrears:

0x50300000-由于损坏问题,视频播放被中止 或因为您的浏览器不支持所使用的视频功能

0x50300000 - The video playback was aborted due a corruption problem or because the video used features your browser did not support

禁用加密时,同一视频播放任何问题.

The very same video plays w/o any problems when encryption is disabled.

问题是,复制由Azure Media Player团队发布的这种情况的示例也不起作用,并且失败,并显示完全相同的错误!它可以在这里找到: https://ampdemo.azureedge.net/.该示例命名如下:

The thing is that the sample that replicates such scenario published by Azure Media Player team does not work either and fails with the very same error! It's available here: https://ampdemo.azureedge.net/. This sample named as follows:

AES(JWT令牌)–按需[钢筋的眼泪]

AES (JWT token) – On Demand [Tears of Steel Teaser]

如何通过iPhone上的Azure媒体服务/播放器执行受保护的视频流?完全支持这种情况吗?

How can I do protected video streaming via Azure media Services/Player on iPhone? Is it supported scenario at all?

以下是设置投放策略的相关代码:

Here is the relevant code that sets up the delivery policy:

    deliveryPolicy = context.AssetDeliveryPolicies.Create(
        DeliveryPolicyName,
        AssetDeliveryPolicyType.DynamicEnvelopeEncryption,
        AssetDeliveryProtocol.SmoothStreaming | AssetDeliveryProtocol.Dash | AssetDeliveryProtocol.HLS,
        new Dictionary<AssetDeliveryPolicyConfigurationKey, string>
        {
            { AssetDeliveryPolicyConfigurationKey.EnvelopeKeyAcquisitionUrl, contentKey.GetKeyDeliveryUrl(ContentKeyDeliveryType.BaselineHttp).ToString() }
        }
    );

推荐答案

只需在Azure Media Player已知问题"列表中找到此确切方案:

Just found this exact scenario in the list of Azure Media Player "known issues": https://amp.azure.net/libs/amp/latest/docs/Known_Issues.html.

AES和受限令牌内容无法在iOS和更早版本上播放 Android设备.为了实现此方案,必须使用代理 已添加到您的服务中.

AES and restricted token content does not playback using iOS and older Android devices. In order to achieve this scenario, a proxy must be added to your service.

本文介绍了Azure团队提出的解决方法: https://azure.microsoft.com/zh-CN/blog/how-to-make-token-token-authorized-aes-encrypted- hls-stream-working-safari/.我还没有亲自测试.

This workaround that is proposed by Azure team is described in this article: https://azure.microsoft.com/en-us/blog/how-to-make-token-authorized-aes-encrypted-hls-stream-working-in-safari/. I did not personally test it yet.

更新.该解决方法在进行了较小的更改后便可以使用-二级HLS播放列表的URL编码存在问题.以下是完整的WebAPI 2控制器代码,这些代码可以帮助我: http://pastebin.com/kq7Zfw88 .

UPDATE. The workaround works after minor changes -- there was an issue with URL encoding for second-level HLS playlist. Here is full WebAPI 2 controller code that makes the trick for me: http://pastebin.com/kq7Zfw88.

这篇关于Azure Media Player不适用于iPhone上的AES保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆