Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cannot play songs in IE

    Hi i am recently experimenting with XPSF player to play mp3 songs on website... it is working fine with Firefox but cannot play many songs on IE.

    Here is the code
    ----------------
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
    swfobject.registerObject("xspf_player", "9.0.0", "expressInstall.swf");
    </script>



    <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="170" id="xspf_player">
    <param name="movie" value="http://localhost/xspf_player.swf" />
    <param name="flashvars" value="playlist_url=1.xspf" />
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="http://localhost/xspf_player.swf" width="400" height="170">
    <param name="flashvars" value="playlist_url=1.xspf" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflashplayer">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
    </object>

    XSPF Playlist format
    -------------------

    <?xml version="1.0" encoding="UTF-8"?>
    <playlist version="0" xmlns="http://xspf.org/ns/0/">
    <trackList>
    <track>
    <title>one </title>
    <location>http://download.com/one.mp3 </location>
    </track>
    <track>
    <title>two </title>
    <location>http://download.com/two.mp3 </location>
    </track>
    <track>
    <title>three </title>
    <location>http://download.com/three.mp3 </location>
    </track>
    </trackList>
    </playlist>

    The above code works fine for firefox but not working with IE
    If anyone can help me that will be great.

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    What exactly isn't working? Is the player loading or not?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi thanks for replying the player is loading perfectly fine and i can see list of songs in the correct order in IE and firefox the only difference is when i click on songs on IE it does not play 75% of songs but it is playing in Firefox

    The sample working file of mp3 is

    http://download.apunkabollywood.com/...0Fmw11.com.mp3

    the above files work with Firefox but not with IE.

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Have you tried the dynamic method of swfobject? Perhaps something isn't getting set.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #5
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I dont know how to play around with the dynamic method of swfobject......... since i am newbie. If you can help me with the example or some code that will be great. And thanks for replying back so quickly. This forum rockz.....

  • #6
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    There is a post in my sig called Embed Flash Properly, it has a lot of details on how to do it.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #7
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    k here is my new code from your tutorial

    <script type="text/javascript">

    var flashvars = { // These are variables which are passed to the Flash document - they have to be already defined in the SWF
    buttonText: "Press Me Please",
    imageURL: "funnypicture.jpg" // Don't put anything after the last ", if you add more variables use a comma to separate entries but leave the last entry without one, same applies to the params and attributes
    };
    var params = { // Parameters for display
    menu: "false",
    wmode: "transparent" // a common request to make the
    };
    var attributes = {
    id: "newID",
    name: "newID"
    };
    // 1 - Name of file to load, 2 - ID of DIV to replace with SWF, 3 - width, 4 - height, 5 - Minimum Flash version, 6 - Express Install (if not using then place false), 7-9 - sends the arrays
    swfobject.embedSWF("xspf_player.swf?playlist_url=1.xspf", "myContent", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);

    </script>

    The above code works in following situation

    1] when i double click the above html file in firefox it works
    2] when i select openwith option to open the html file in internet explorer it works
    3] when i deploy the above html file to root folder of localhost it works
    ex: http://localhost/example.html it works

    but if I open this is http://localhost/example.html in IE i can see the list of songs but the same problem cannot hear anything

    please help me I am trying this stuff from last 2-3 weeks but no solution

  • #8
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I am trying to help, trust me I have problems that I have to solve all the time too.

    Have you considered trying this? Perhaps its not picking up the variable through the URL.

    Code:
    <script type="text/javascript">
    
    var flashvars = { // These are variables which are passed to the Flash document - they have to be already defined in the SWF
    buttonText: "Press Me Please",
    playlist_url: "1.xspf",
    imageURL: "funnypicture.jpg" // Don't put anything after the last ", if you add more variables use a comma to separate entries but leave the last entry without one, same applies to the params and attributes
    };
    var params = { // Parameters for display
    menu: "false",
    wmode: "transparent" // a common request to make the
    };
    var attributes = {
    id: "newID",
    name: "newID"
    };
    // 1 - Name of file to load, 2 - ID of DIV to replace with SWF, 3 - width, 4 - height, 5 - Minimum Flash version, 6 - Express Install (if not using then place false), 7-9 - sends the arrays
    swfobject.embedSWF("xspf_player.swf", "myContent", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);
    
    </script>
    Also if this isn't working, perhaps you need to try a different player. I actually prefer one called JW Player, you can Google it for lots of examples.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #9
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I guess Adobe flash player security is a problem something we need to play around is crossdomain.xml file and one more important thing none of the mp3 files are stored on my server. Even I tried JW player and i have the same problem.

    Intially when I open example.html file in IE i need to add path before it plays on IE after double clicking on the html file
    Last edited by v2desperado; 02-13-2009 at 09:32 AM.

  • #10
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    This is true, if the files are not in the same location you will have issues. But that doesn't make sense with FF working and IE not. Have you tried on a live server instead of local?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #11
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ya i have tried on the live server but no success until now. I guess i am missing little bit inorder to play with IE. I have doubt with crossdomain.xml . If you can suggest me some thing that helps me to solve my problem that would be great.

  • #12
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Do you have a link so I can test in my IE? I really think its just something with the browser. Its hard for me to test without a link though.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #13
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi these is the link of my website

    http://www.acsu.buffalo.edu/~pks4/

    over here u can find 3 example name
    example.html,example1.html and example2.html

    and all the files associated with it.

    If you need anything else just let me know.Once again thank you for helping me off

  • #14
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    SWFObject isn't getting loaded, try to add the full url here in the embed code.

    Code:
    <script type="text/javascript" src="http://www.acsu.buffalo.edu/~pks4/swfobject.js"></script>
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #15
    New Coder
    Join Date
    Feb 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    still no luck


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •