Skip to main content

Microsoft Silverlight

Answered Question Multiple entries in .asx fileRSS Feed

(0)

Imri
Imri

Member

Member

0 points

9 Posts

Multiple entries in .asx file

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!

"All men die... but not all men truly live..." - William Wallis (Scottish Warrior-Poet)

Amanda Wang - MSFT
Amanda W...

All-Star

All-Star

17234 points

1,466 Posts

Answered Question

Re: Multiple entries in .asx file

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?

Amanda Wang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

amit_parmar1111
amit_par...

Member

Member

2 points

3 Posts

Re: Re: Multiple entries in .asx file

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

Amit Parmar

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities