Skip to main content
Home Forums General Silverlight Hosting and Streaming Multiple entries in .asx file
2 replies. Latest Post by amit_parmar1111 on June 29, 2009.
(0)
Imri
Member
0 points
9 Posts
11-03-2008 2:54 AM |
Hi all,
I'm having the following problem when using an asx file as source for my MediaElement:
The first ENTRY in my asx playlist gets played, but the second entry not. Firefox says that the second entry is being loaded, but the MediaElement's Source property gets set to null as soon as the first element is done playing... When I change the entries to 2 local files (let's say One.mp3 and Two.mp3), then the second entry get's played no problem... Here is an example of the asx file i'm using:
<ASX VERSION="3.0"><ENTRY> <title>Streamads - Pretty in Pink</title> <REF HREF="http://sa-w.streamads.com/sa_streamadz/101993_100039.hearos---pretty-in-pink.mp3"/></ENTRY><ENTRY> <title>DHM Channel 8: All 80s - The Totally Awesome Eighties!</title> <REF HREF="http://wma2.dainbramage.com/dainbramage"/></ENTRY></ASX>
Any suggestions would be appreciated!
Amanda W...
All-Star
17234 points
1,466 Posts
11-06-2008 4:40 AM |
Hi,
We have test on our local, the playlist works fine.
<ASX version = "3.0"> <ENTRY> <TITLE>Xbox Fable Video</TITLE> <AUTHOR>Microsoft Corporation</AUTHOR> <COPYRIGHT>(c)2007 Microsoft Corporation</COPYRIGHT> <REF HREF = "http://localhost:55993/Bear.wmv" /> </ENTRY> <ENTRY> <TITLE>Vista Butterfly Video</TITLE> <AUTHOR>Microsoft Corporation</AUTHOR> <COPYRIGHT>(c)2007 Microsoft Corporation</COPYRIGHT> <REF HREF = "http://localhost:55993/lake.wmv" /> </ENTRY> </ASX>
But when we have a test with you asx file, the second link: http://wma2.dainbramage.com/dainbramage, it seems cannot open the media file.
How about to change aother meida file have a try?
amit_par...
2 points
3 Posts
06-29-2009 6:28 AM |
Hi, this is my first silverlight application. i am trying to play .asx playlist in silverlight 2.0 player. In my application there is one page with return .asx file which contains the media file path here is my code passing Playlist path Desing Source Code Page Load Event protected void Page_Load(object sender, EventArgs e) { sl1.InitParameters = "m=http://www.mysitename.com/playlist_asx.aspx"; } PAGE CODE playlist_asx.aspx protected void Page_Load(object sender, EventArgs e) { Response.Clear(); HttpContext.Current.Response.Write(Server.MapPath("VideoFiles/")); DirectoryInfo d = new DirectoryInfo(Server.MapPath("VideoFiles/")); StringBuilder mlist = new StringBuilder(); foreach (FileInfo f in d.GetFiles()) { mlist.Append("\n"); mlist.Append("Title :: Video 1\n"); mlist.Append("\n"); mlist.Append("\n"); } Response.ContentType = "video/x-ms-asf"; Response.AddHeader("Content-Disposition", "attachment; filename=myplaylist.asx"); Response.AddHeader("Cache-Control", "no-cache"); Response.Write("\n"); Response.Write(mlist.ToString()); Response.Write(""); Response.End(); } I am not getting any error. i want to hide my media path and streaming my video. Please help me Thanks in Advance