Downloading a Meeting Recording

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

In addition to viewing a meeting recording in the Microsoft Windows Media Player, a client application can let a user download the recording to a local drive for viewing at a later time. This requires that the client application make an explicit (HTTPS GET) request to the conference center to retrieve the stream containing the recording, provided that the conference center successfully returned the URL of the recording in a GetURLReply element.

The following is a C# implementation of the HTTPS GET request for downloading a resource stream from a conference center.

public Stream GetResource(string url)
{

    // Get resource using HTTP GET with the url of a resource;
    HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(url);
    myReq.Method = "GET";

    Stream respStream = null;

    HttpWebResponse myResp = null;
    myResp = (HttpWebResponse)myReq.GetResponse();

    if (myResp.ContentType == "application/octet-stream")
    {
        respStream = myResp.GetResponseStream();
    }

    return respStream;
}

The stream can then be saved to a file. The following is one example in C#.

public void DownloadResource(string url, string filePath)
{
    Stream res = GetResource(url);
    if (res == null)
        return;

    FileStream fileStream = new FileStream(filePath,
                                           FileMode.OpenOrCreate);
    int length = 1024;
    Byte[] buffer = new Byte[length];
    int bytesRead = res.Read(buffer, 0, length);
    while (bytesRead > 0)
    {
        fileStream.Write(buffer, 0, bytesRead);
        bytesRead = res.Read(buffer, 0, length);
    }
    fileStream.Close();
    res.Close();
}

See Also

Concepts

Using the Live Meeting service API