Skip to content

tihomir-kit/wams-async-cors-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WAMS async CORS enabled video upload demo

This is an ASP.NET MVC demo application created as a proof-of-concept on how to do async CORS enabled video upload to Azure Media Services. To create WAMS assets and locators and to run WAMS encoding job/tasks, a WebAPI service using WAMS .net SDK v3 was used. By doing all that stuff on the server, it's easier to keep everything secure since your Azure credentials are not public and you are the one in charge of creating all the assets, locators and jobs. WAMS REST API was used only to upload chunks of data directly to Azure. By uploading the data directly to Azure, both CPU load and bandwidth consumption of the server hosting the web application are lowered (just imagine a scenario where your web application is not hosted through Azure and all the blob data needs to go through it for each file upload).

Here is a blog post which explains the whole workflow of the application:
Building Windows Azure Media Services async CORS enabled upload

WAMS configuration

Your WAMS credentials need to be entered in web.config => appSettings ("azureAccountName", "azureAccountKey", "wamsAccountName" and "wamsAccountKey") for the application to work.

CORS rules setup

To set-up the CORS rules for your Azure account, you can use azure-cors-rule-manager. You will need to create a CORS rule with the following settings for WACU to work:

  • Allowed origins: http://yourdomain
  • Allowed methods: PUT
  • Allowed headers: content-type, accept, x-ms-*
  • Exposed headers: x-ms-*
  • Max age (seconds): 3600 (you can set a lower or higher value for this one)

Credits

======================

Made at: Mono Software Ltd.

About

Windows Azure Media Services async CORS enabled video upload demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages