YouTube/Vimeo API - MP4 files

后端 未结 3 477
Happy的楠姐
Happy的楠姐 2020-12-29 17:33

I think YouTube or Vimeo does not have (even paid) any longer API, that will allow me streaming with use of the progressive download the video files (MP4, MPEG-TS or even FL

3条回答
  •  梦毁少年i
    2020-12-29 17:57

    In ASP or c# you can use below code, this will return you json string

            string url = "https://api.vimeo.com/me/videos/" + videoId;
    
    
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
    
            request.Method = "GET";
            request.Accept = "application/vnd.vimeo.*+json;version=3.0";
    
    
            request.Headers.Add(HttpRequestHeader.Authorization, "Bearer YOUR_ACCESS_TOKEN");
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
    
            Stream resStream = response.GetResponseStream();
    
            var reader = new StreamReader(resStream);
    
            string jsonResponse = reader.ReadToEnd();
    

提交回复
热议问题