Hi Gordon,
currently, I use two methods to do audio and video with HotPot: the simple HTML <object> tag and the dynamic publishing through javascript with JW mediaplayer.
HotPot rewrites the URLs in the <object> tag just fine, but with the dynamic method (code below) it doesn't. It only rewrites the path to the javascript swfobject.js (in green below).
What I'd like HotPot to be able to do (in red in the code) is rewrite the URLs to the .swf, .flv, .xml, .mp3, or .mp4 (if used)
Here's the example:
1: <script type="text/javascript" src="swfobject.js"></script> 2: <div id="player"> 3: <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this movie. 4: </div> 5: <script type="text/javascript"> 6: var s = new SWFObject("flash/flvplayer.swf","flash/movie_file.flv","320","240","9"); 7: s.addParam("allowfullscreen","true"); 8: s.addVariable("file","flash/movie_file.flv"); 9: s.addVariable("displayheight","225"); 10: s.addVariable("backcolor","0x111111"); 11: s.addVariable("frontcolor","0xdddddd"); 12: s.addVariable("lightcolor","0x99cc00"); 13: s.addVariable("width","320"); 14: s.addVariable("height","240"); 15: s.write("player"); 16: </script>
OR with an xml playlist
1: <script type="text/javascript" src="swfobject.js"></script> 2: <div id="player2" style="margin-left:auto;margin-right:auto;text-align:center;display:block;">
3: <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this movie.
4: </div> 5: <script type="text/javascript"> 6: var s2 = new SWFObject("player.swf","playlist","340","455","10"); 7: s2.addParam("allowfullscreen","true"); 8: s2.addVariable("file","playlist.xml"); 9: s2.addVariable("displayheight","340"); 10: s2.addVariable("backcolor","0x000000"); 11: s2.addVariable("frontcolor","0xcccccc"); 12: s2.addVariable("lightcolor","0x99cc00"); 13: s2.addVariable("width","340"); 14: s2.addVariable("height","455"); 15: s2.write("player2"); 16: </script>
It should be relatively easy to make HotPot aware of the path to the .swf and .flv files in line 6,
but how feasible is it to have HotPot rewrite the URLs to the 'file' variable in the javascript code (line 8)
so they point correctly to the .flv, .mp3, or .mp4, .xml?
A bit further, when I upload the xml. playlist, I've got to have the full urls hard-coded - no other way, naturally,
but is it possible, as an option, to apply the same filtering to the xml playlist and rewrite the paths to the absolute URLs in it?
Cheers
Stan