I am using XSPF Web Music Player slim, and whenever I put it into a web page and play it using Google Chrome or Safari the song starts playing twice.
When i press the pause button one instance of the song keeps playing while the other keep going without any control over it.

This only happen on Google Chrome and Safari on both Windows and Macs so I think it is a problem with the player and WebKit.

I am not using play-list file because the player is only playing one song so I used some parameters somewhere for the player making it so I did not need a play-list file. I also wanted it to play automatically so included a parameter for that.

This is my code:

<object type="application/x-shockwave-flash" width="720" height="30" data="xspf_player.swf?song_url=song.mp3&amp;song_title=Song Name&amp;autoplay=1">
	<param name="movie" value="xspf_player.swf?song_url=song.mp3&amp;song_title=Song Name&amp;autoplay=1" />
	<param name="wmode" value="transparent" />
</object>

I have the autoplay=1 so it will play automatically. When I take this away it only play one instance of the song but requires manual play. So you have to push the "play" button.

How do I fix it so it does not play the song twice on Chrome and Safari?

If anybody ever looks at this thread and is having the same problem:

It does not have to do with the script or the files. In my case it was a problem between the player and an iFrame. I had an iframe on the page with the source "#". That for some reason made the song play twice. If you have a real web page as the source is should work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.