2014-01-30 50 views
2

我一直在試圖使用MPEG-DASH的dash.js reference player從我的Windows Azure媒體服務(WAMS)帳戶播放的媒體播放的WAMS媒體文件CORS。不幸的是Chrome瀏覽器33(支持媒體來源擴展,從而DASH)給了我一個標準的CORS錯誤:啓用的MPEG-DASH玩家參考

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

回答

1

後柯克咻我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寬帶720P」。

我已經使用Microsoft OSMF平滑流式插件在Flash播放器中測試了我上傳的視頻......並且它已經工作了。所以我完全搞不明白爲什麼它會變成未發佈的,或者流暢的流媒體插件如何播放它。但是,它現在可以工作......所以謝謝你的提示!

+0

我花了一段時間才能認識到什麼是「流RU」。截至目前,它是媒體保留單元的數量。出於某種原因,您可以將其設置爲零,並且仍然可以在Azure門戶中進行編碼。困惑我的生活。 – sumitkm