December 22
LiveNet 0.2 Released: Silverlight Streaming Added
Luke and I have released Version 0.2 of LiveNet. This release comes with the addition of Silverlight Streaming From Windows Live and allows you to add, delete and get your Silverlight applications that you're hosting with Windows Live.
As part of the release, I have included a sample application that shows just how easy it is to us SLS with LiveNet, here is a sample of that code:
LiveMedia m_livemedia;
MediaFileSet[] sets;
MediaFile[] files;
private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
if (string.IsNullOrEmpty(textBox1.Text) ||
string.IsNullOrEmpty(textBox2.Text))
{
MessageBox.Show("Either you have entered no Account ID or Passkey",
"Doh", MessageBoxButtons.OK, MessageBoxIcon.Error);
return;
}
m_livemedia = new LiveMedia(textBox1.Text, textBox2.Text);
sets = m_livemedia.ListFileSets();
foreach (MediaFileSet set in sets)
{
listBox1.Items.Add(set.Name);
}
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
listBox2.Items.Clear();
int i = listBox1.SelectedIndex;
MediaFileSet set = sets[i];
files = set.Files;
foreach (MediaFile file in files)
{
listBox2.Items.Add(file.FileName);
}
}
And when run in the sample app, you will end up with the following:
Which you can preview the selected application. This has been done using a client app, but can just as easily be integration into an ASP.Net project.
SL