流媒体发布–在Windows Store应用中使用Azure媒体服务之三

经过前面的努力,我们终于完成了视频文件的上传和编码,那么接下来的最后一步就是将如何该视频发布出去了。相对应前面的步骤,这一次就要简单的多了。  首先,在确认编码已经成功之后,我们可以获得输出的媒体的Asset编号:  private async Task<string> CreateAssetFile(string accessToken, string assetId) {     var request = (HttpWebRequest)HttpWebRequest.Create(“https://wamshknclus001rest-hs.cloudapp.net/api/Files”);     request.Method = “POST”;     request.ContentType = “application/json;odata=verbose”;     request.Accept = “application/json;odata=verbose”;       string requestbody =     “{\”Name\”:\”test.wmv\”, \”ContentFileSize\”:\”0\”,\”MimeType\”:\”video/x-ms-wmv\”,\”ParentAssetId\”:\”” + assetId + “\”}”;       request.Headers[“DataServiceVersion”] = “3.0”;     request.Headers[“MaxDataServiceVersion”] = “3.0”;     request.Headers[“x-ms-version”] = “2.7”;     request.Headers[“Authorization”] =…

0