azure - 在 WAMS 媒体文件上启用 CORS,以便在 MPEG-DASH 引用播放器中播放

标签 azure streaming html5-video cors azure-media-services

我一直在尝试使用 MPEG-DASH 的 dash.js reference player播放来 self 的 Windows Azure 媒体服务 (WAMS) 帐户的媒体。不幸的是,Chrome 33(支持媒体源扩展,因此支持 DASH)给了我一个标准的 CORS 错误:

XMLHttpRequest cannot load totallyrad.origin.mediaservices.windows.net/6c8d4ddf-1579-4047-8f15-ae1fe95bd2d5/interview1.ism/manifest(format=mpd-time-csf). No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:3000' is therefore not allowed access.

不幸的是,您不能只将 crossdomain.xml 上传到 WAMS,以便浏览器允许该请求(由于某种原因,这是不允许的类型)。 我发现一篇关于how to enable CORS for Azure Storage的文章但这是为了从浏览器启用上传场景:这与我需要的相反。

如果不可能的话,Azure似乎并不真正支持破折号...所以我一定做错了什么,因为有人已经这样做了,如this media link在破折号播放器中工作。

为了进行测试,您可以使用 online Dash.js player

最佳答案

Kirk Shoop 回复我的 github 问题 ( https://github.com/Dash-Industry-Forum/dash.js/issues/118 ) 后:

WAMS should produce the headers correctly if the content was published correctly.

Pasting from a WAMS PM:

Next steps for you would be:

  • Check the streaming URL, perhaps hit Publish again if you've Unpublished it.
  • Check that you can get a Smooth manifest for you file. Remove ‘(format=mpd-time-csf)’ from your url to get the smooth manifest
  • Check that the smooth plays (http://smf.cloudapp.net/healthmonitor).
  • Check that you have a streaming RU.
  • Check that the DASH manifest downloads.
  • Try it again in the DASH-IF sample player.

Kirk

Software Design Engineer

Microsoft Open Technologies, Inc.

感谢您的快速回复。我根据反馈让它工作了。这是我发现的:

  1. 我的 WAMS 账户没有预留单位 (RU)。虽然我相信这是为了编码,但我分配了一个。
  2. 我的内容尚未发布,所以我发布了它。
  3. 最后,我的编码工作显然没有使用平滑流 - MediaServicesGettingStarted 项目中的默认设置是“H264 Broadband 720p”。

我已经使用 Microsoft OSMF 平滑流媒体插件在 Flash 播放器中测试了我上传的视频...并且它有效。所以我完全困惑为什么它没有发布,或者流畅的流媒体插件以前是如何播放它的。但是,现在可以了...所以谢谢您的提示!

关于azure - 在 WAMS 媒体文件上启用 CORS,以便在 MPEG-DASH 引用播放器中播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21463315/

相关文章:

azure - Azure 批处理、调度程序和 Web 作业之间的区别以及何时使用

Azure 辅助角色性能不一致 - 问题

c# - .NET 视频音频聊天

youtube - RTMP链接youtube

javascript - 如何显示视频播放结束的 html5 视频海报?

javascript - HTML5 视频 : get seek-from position

azure - 迭代Azure数据工厂中的azure SQL表

database - 为基于日期的全局 DocumentDB 应用程序选择正确的 PartitionKey

android - 应用内视频托管的最佳解决方案

php - 通过 PHP 上传视频并在服务器上编码为 MP4 和/或 WebM?