Question

The below code works perfectly outside of Joomla2.5. as well as in earlier versions of Joomla , but fails when it's within a Joomla2.5 article, or rendered by a Joomla2.5 plugin.

The line in question is this one.

s1.addVariable('playlistfile', 'http://www.myserver.com/playlist.php?s=123&u=789

It returns an XML playlist which the player normally loads and plays as expected, but is the cuplprit because using a hardcoded file name with an XML extention works properly. I've tried all the usual encoding routines, but with no luck. Is there an approach, or syntax, that will work from within Joomla2.5?

Full Context:

<script type='text/javascript'>
  var s1 = new SWFObject('http://www.myserver.com/v5.7/player.swf', 'player', '420', '315', '9.0.124', '#FFFFFF');
  s1.addParam('allowfullscreen',    'true');
  s1.addParam('allowscriptaccess',  'always');
  s1.addVariable('streamer',        'rtmp://streaming.myserver.com/');
  s1.addVariable('playlistfile',    'http://www.myserver.com/playlist.php?s=123&u=789');
  s1.write('mediaspace1');
</script>

Also, I'm aware that there are newer, and other ways of loading the JW Player, but this is an interim step of converting many, many sites, and some legacy code must be retained.

Was it helpful?

Solution

Among the "usual encoding", have you tried "encodeURIComponent()" while adding the playlistfile variable? Not sure if PHP encoding would accomplish it, but Flash will not handle it correctly otherwise.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top