Created
May 13, 2020 13:13
-
-
Save JeffreyCA/d5c544df36a0f61737f8a435f897de5e to your computer and use it in GitHub Desktop.
Enable media streaming on Azure Blob
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.WindowsAzure.Storage; | |
namespace EnableStreaming | |
{ | |
class Program | |
{ | |
static async System.Threading.Tasks.Task Main(string[] args) | |
{ | |
var storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=...."); | |
var blobClient = storageAccount.CreateCloudBlobClient(); | |
// Get the current service properties | |
var serviceProperties = await blobClient.GetServicePropertiesAsync(); | |
// Set the default service version to 2011-08-18 (or a higher version like 2019-07-07) | |
serviceProperties.DefaultServiceVersion = "2019-07-07"; | |
// Save the updated service properties | |
await blobClient.SetServicePropertiesAsync(serviceProperties); | |
Console.WriteLine("Done"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment