Skip to main content
Home Forums General Silverlight Hosting and Streaming Video Urls
9 replies. Latest Post by SpartyGuy on May 6, 2008.
(0)
meetchandu
Member
28 points
32 Posts
02-28-2008 3:30 AM |
Hi All
I was able to upload few videos successfully. I am using teh Media control in ASP.NET Futures. The video Url i have is
streaming:/xxxx/6eff01ebfa764660a0df0b5c77a8c368/04930650b0314d0cb0c441f3f7c1d8f6_Butterfly.wmv. How do I use this to set the MediaUrl property of the control
I prefer doing this in C#.
Please suggest
Frogs69
Participant
798 points
219 Posts
03-14-2008 4:32 PM |
Hi, right now this is only possible by passing the video "URL" at initialization time through initParams. If your video file is hosted in SLS, by virtue of passing a streaming:/ "URL" via the initParams of your app, you'll be able toassign the value to a media source asit will be converted to a http:// URL consumable in the code of your app. This is documented on http://dev.live.com/silverlight/initparams.aspx.
However it looks like you're mixing up the made up URL to Silverlight Streaming with the fully qualified URL into the CDN cache. The former should be constrcuted as streaming:/your_SLS_account_ID/file_set/file_name.wmv. The latter is usually some long and ugly http:// URL with a time stamp, a file signature, and a ton of CDN cache information on the path. You should not use that URL.
I do not have a C# sample, but I can give you a XAML one if you like.
Cheers.
03-15-2008 9:54 AM |
Thanks for the information. I would really appreciate if you can provide the xaml code
03-17-2008 11:51 PM |
Hi, I have posted it on http://dev.live.com/silverlight/downloads/SL_v1_player_sample.zip. The v10 folder contains a regular SL v1 player (xaml and js) from Expression Encoder. The files relevant to this thread are: WebPageSample.htm and JavaScriptSample.js.
In WebPageSample.htm the parts that matter are the following:
<script type="text/javascript" src="JavaScriptSample.js"></script> this is where you reference the script
var p = new StartPlayer(); this is where you create the instance of your player on your site.
In JavaScriptSample.js, the parts that matter are the following:
initParams: ["streaming:/SLS_account_ID/File_set/File_Name.wmv"] this is where you pass the "URL" to your video file
this._player.set_mediaUrl (params[0]); this is where you set the value of mediaUrl to be the translated http URL
Hope this helps.
03-18-2008 9:47 AM |
Great.. Thank you very much for the sample. Cant we do that same stuff that we do in js in C#/.
Like for example, If i have a media control on the xaml page. Cant i set the source property to some url using C# code rather than js?
Buhari
2 points
1 Posts
03-22-2008 9:19 PM |
Hello,
I am working on how to connect silverlight streaming video using MediaElement's Source property in C#.
I could not find it out any sample in net.
But I tried . Can anyone tell me what is the issue with the following code?
{
meVideo.Play();
}
Thanks
KevMoore123
8 points
4 Posts
03-25-2008 9:24 AM |
Hi
Did you ever get anywhere with this? I too am trying to stream content from my SLS account to a MediaElement control in SilverLight 2.
cheers
Kev
03-25-2008 9:49 AM |
Nope.. that didnt work. looks like js is the only option. If you are not restricted to use silverlight media element you could use the live controls
04-02-2008 12:33 AM |
See http://silverlight.net/forums/t/12326.aspx...
SpartyGuy
4 points
2 Posts
05-06-2008 7:32 PM |
If you have the ability to run some of your own asp.net code on your server, you can check out my solution to this problem.
http://www.slickthought.net/post/2008/04/Cracking-the-Silverlight-Streaming-Direct-Content-Access-Code.aspx and http://www.slickthought.net/post/2008/05/Cracking-the-Silverlight-Streaming-Direct-Content-Access-Code---Part-II.aspx
Both are a lot "cleaner" to use on the client than dealing with funky initParams and such.