Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

xspf player and internet explorer

Loads random wrong playlist In IE but not FF

4:29 pm on Nov 4, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 11, 2006
posts: 57
votes: 0

Hello all,

Has anyone had any success with the wonderful xspf -flash based- player in Internet Explorer? In Firefox, it works great. In IE it shows up, but the wrong playlist loads up. It is loading up some playlist from the creator's(of the xspf player I guess?)blog site. There have been quite a few threads about this over at the sound forge site, but none of them really get answered. I found a supposed fix in the form of a php file, but Im not sure what I have to do with it beyond just uploading it to my server. I can post up the code of this file if anyone cares to see it and it is ok?

9:24 am on Nov 6, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 4, 2002
votes: 0

Hi Preeminent

I'm not too familiar with this player either.

This may not be of use but there have been some previous threads [google.com] about xpsf player. Take a look and see if they help. Let me know if you don't turn up anything and I'll do some digging.

11:33 pm on Nov 6, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 11, 2006
posts: 57
votes: 0

No, but thanks for the reply! Yeah I tried searching for it first, but I didn't see anything similar to my question. I'm going to go ahead and post the code of the supposed fix just in case anyone is familar with this. First here is what is mentioned off the site that provided this code:

"XSPF Player was not able to point to the proper playlist file in Internet Explorer 6 and Internet Explorer 7.

The problem was;

IE browsers required movie attribute be given differently.

<param name="movie" value="..../xspf_player.swf&playlist_url=/streaming/playlists/xspf_playlist.xspf">

moseasymediaXSPFPlayer.php file modified accordingly to comply with IE requirements.

Please download the attached file to this post, unzip locally and upload it to your web server. Overwrite the moseasymediaXSPFPlayer.php file under "mambots/content/moseasymedia/" directory. (J! 1.5 users plugins/content/moseasymedia/ )

Good ole Firefox is still working, this change has no impact on Firefox"


* @version 1.0.3
* @package moseasymedia
* @copyright Copyright &copy; 2007, OCS Software Solutions
* @author Ozgur Cem Sen
* @email <snip>
* @link <snip>
* @license [gnu.org...] GNU/GPL .

/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
* Function for embedding the audio files associated with XSPFPlayer
* @param string $player Name of the player.
* @param string $mediaPath URL or absolute or relative path to the media file
* @param &object $botParams mambot params for moseasymedia
* @return string formatted HTML embed string
* <snip>
* moseasymedia supports only playlists with XSPF player. please check other means of playing single mp3 files.
* autoload, autoplay attributes are not functional.
function moseasymediaXSPFPlayer($player, $mediaPath, &$botParams) {

if ($botParams->get("ocsmem_modeXSPFPlayer") == "extended")
$player_swf = 'xspf_player.swf';
$player_swf = 'xspf_player_slim.swf';

$uniqueID = 'ocs_'.$player.rand();
$div_id = 'moseasymedia'.$player.$uniqueID;

$embedString = '<!-- moseasymedia for Mambo, OCS Software Solutions, (c) 2007-->' ;
$embedString .= '<link href="'.$MOSEASYMEDIA_BASE_URL.$botParams->get("ocsmem_CSS$player", "moseasymedia$player.css").'" rel="stylesheet" type="text/css" media="screen" >';
$embedString .= '<div class="moseasymedia'.$player.'" id="'.$div_id.'">';

//the following arrays will serve as attributes to be populated by the $botParams
$object_attributes = array('ID', 'CLASSID', 'CODEBASE', 'STANDBY', 'type', 'width', 'height');
$object_attribute_values = moseasymediaPlayerEngine::generateAttributeValuesArray($player, $object_attributes, $botParams, TRUE);
$object_attribute_values['ID'] = $uniqueID;

$XSPF_QueryString_attributes = array('autoplay', 'autoload', 'repeat_playlist', 'player_title', 'info_button_text', 'radio_mode','playlist_size');
//$XSPF_QueryString_attributes = array();
$XSPF_QueryString_attribut_values = moseasymediaPlayerEngine::generateAttributeValuesArray($player, $XSPF_QueryString_attributes, $botParams, TRUE);

//if you'want to play a single MP3, makes sure that you set the singlefile=true in the {moseasymedia .... }
$XSPF_QueryString_attribut_values['playlist_url'] = $mediaPath ;
$strXSPF_QueryString = $MOSEASYMEDIA_BASE_URL.$player_swf."?";
foreach ($XSPF_QueryString_attribut_values as $k=>$v) {
if (strlen(trim($v))> 0)
$strXSPF_QueryString .= '&'.$k.'='.$v;

$param_attributes = array('src', 'width', 'height');
$param_attribute_values = moseasymediaPlayerEngine::generateAttributeValuesArray($player, $param_attributes, $botParams, TRUE);
$param_attribute_values['movie'] = $strXSPF_QueryString;

$embed_atrributes = array('name', 'id', 'src', 'width', 'height', 'type', 'pluginspage');
$embed_attribute_values = moseasymediaPlayerEngine::generateAttributeValuesArray($player, $embed_atrributes, $botParams, TRUE);
$embed_attribute_values['src'] = $strXSPF_QueryString;
$embed_attribute_values['name'] = $uniqueID;
$embed_attribute_values['id'] = $uniqueID;

$strMediaEmbedCode = moseasymediaPlayerEngine::generateObjectParamEmbedCode($object_attribute_values, $param_attribute_values, $embed_attribute_values);

//Check to see if we're using object embedding or javascript
if ((int)$botParams->get("ocsmem_UseJavascript$player") == 0) {
$embedString .= $strMediaEmbedCode;
else {

global $database;
$escapedEmbed = $database->getEscaped($strMediaEmbedCode);
$embedString .= '<script src="'.$MOSEASYMEDIA_BASE_URL.'dreadedActiveX.js" type="text/javascript"></script>';
$embedString .= '<script type="text/javascript">';
$embedString .= ' embedObject("'.$escapedEmbed.'");';
$embedString .= '</script>';
$embedString .= '</div>';
$embedString .= '<!-- moseasymedia -->' ;

return $embedString;


Edited - No URL's please, see TOS [webmasterworld.com]

[edited by: limbo at 9:05 am (utc) on Nov. 7, 2007]

11:36 pm on Nov 6, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 11, 2006
posts: 57
votes: 0

I forgot....this file was uploaded to my server, but Im not sure what else I am supposed to do with it.
6:45 pm on Nov 13, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Dec 11, 2006
posts: 57
votes: 0

Pleeease! There has to be someone out there that knows something about this player? Haha-Im desperate.