...

View Full Version : Cannot play songs in IE



v2desperado
02-11-2009, 07:09 AM
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="clsid:D27CDB6E-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.

gnomeontherun
02-11-2009, 04:57 PM
What exactly isn't working? Is the player loading or not?

v2desperado
02-11-2009, 05:29 PM
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/songs/Audio/indian/movies/Luck%20By%20Chance%20(2009)/01%20-%20Yeh%20Zindagi%20Bhi%20-%20Loy%20Mendonsa%20&%20Shekhar%20Ravjiani%20@%20Fmw11.com.mp3

the above files work with Firefox but not with IE.

gnomeontherun
02-11-2009, 05:41 PM
Have you tried the dynamic method of swfobject? Perhaps something isn't getting set.

v2desperado
02-11-2009, 05:54 PM
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.....

gnomeontherun
02-12-2009, 10:08 AM
There is a post in my sig called Embed Flash Properly, it has a lot of details on how to do it.

v2desperado
02-13-2009, 02:00 AM
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

gnomeontherun
02-13-2009, 09:38 AM
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.


<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.

v2desperado
02-13-2009, 10:29 AM
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

gnomeontherun
02-13-2009, 10:38 AM
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?

v2desperado
02-13-2009, 10:44 AM
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.

gnomeontherun
02-13-2009, 02:38 PM
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.

v2desperado
02-13-2009, 03:45 PM
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

gnomeontherun
02-13-2009, 04:02 PM
SWFObject isn't getting loaded, try to add the full url here in the embed code.


<script type="text/javascript" src="http://www.acsu.buffalo.edu/~pks4/swfobject.js"></script>

v2desperado
02-13-2009, 04:40 PM
still no luck

widuri
02-25-2009, 12:57 PM
i have same problem
it is my problem 3 months ago, but i have removed song from my site
:( (http://www.give-internet.com)

gnomeontherun
02-25-2009, 02:19 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.buttonText = "Press Me Please";
flashvars.playlist_url = "1.xspf";
flashvars.imageURL = "funnypicture.jpg";
var params = {};
var attributes = {};
attributes.id = "myContent";
swfobject.embedSWF("xspf_player.swf", "myContent", "300", "120", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
</script>
</head>
<body>
<div id="myContent">
<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>
</div>
</body>
</html>

Or check the generator

http://www.bobbyvandersluis.com/swfobject/generator/index.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum