Build a Better Web Audio Player
Pages: 1, 2, 3
With MIME detection in place, we can now handle MP3 playlists, which didn't work in the previous implementation. To create a playlist, you simply type the URL of each audio file on a separate line in a text document, and then save the document with a .m3u extension. The following link will open a sequence of three MP3s from Spencer Critchley's article "Country Music's Digital Surprise," which walked through the surprisingly high-tech process of recording a song in Nashville. (The piano in part three was actually software running on a laptop, as you can see in Figure 4.)
Figure 4. Gene Rabbai tickles the virtual ivories in Nashville for Bo Billy's hit "When I See You Smile."
I implemented the original player in a pop-up window so visitors could read multi-page articles without cutting off a sound that was playing on the current page. But several readers asked about embedding sounds directly. Here's how to do that, using an example from our article "The Synful Orchestra: Better Music Through Database Splicing:"
As before, we start with the link to the external JavaScript file:
<script src="BatmosphereAudioEmbed.js" type="text/javascript"></script>
The audio file gets embedded with its own script:
<script language="JavaScript" type="text/javascript">
<!-- Call external JavaScript file to embed player
embedPlayer("Fanfare","/examples/oreilly/digitalmedia/2006/05/better-player-copland.mp3"); // title, filename
// -->
</script>
Of course, if visitors have JavaScript disabled, they won't see anything. So for safety, you can add a plain MP3 link after in a <noscript> tag, like this:
<noscript><a href="/examples/oreilly/digitalmedia/2006/05/better-player-copland.mp3"
target="_blank">Fanfare</a></noscript>
Finally, the external file looks like this:
// Batmosphere Embedded Media Player, version 2006-05-31
// Written by David Battino, www.batmosphere.com
// OK to use if this notice is included
// This function reads an MP3 URL and title from the referring page and generates embedding code to play back the audio file.
// Windows browsers (except for Internet Explorer) will play back the file with the Windows Media Player *plugin.* Internet Explorer will use Windows Media Player.
// Non-Windows browsers will play back the file with their standard audio handler for the MIME type audio/mpeg. On Macs, that handler will usually be QuickTime.
var audioFolder = ""; // If you have a default audio directory, e.g., http://www.your-media-hosting-site.com/sounds/, you can put it here to make links on the referring page shorter.
function embedPlayer(MP3title,MP3URL) {
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
if (isWin) { // Use MIME type application/x-mplayer2
visitorOS="Windows";
} else { // Use MIME type audio/mpeg, audio/x-wav, etc.
visitorOS="Other";
}
var audioURL = audioFolder + MP3URL;
var objTypeTag = "application/x-mplayer2"; // The MIME type to load the WMP plugin in non-IE browsers on Windows
if (visitorOS != "Windows") { objTypeTag = "audio/mpeg"}; // The MIME type for Macs and Linux
document.writeln("<div>");
document.writeln("<strong style='font-size:18px; position:relative; top:-28px'>" + MP3title + " </strong>"); // Adjust font style to taste
document.writeln("<object width='280' height='69'>"); // Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar)
document.writeln("<param name='type' value='" + objTypeTag + "'>");
document.writeln("<param name='src' value='" + audioURL + "'>");
document.writeln("<param name='autostart' value='0'>");
document.writeln("<param name='showcontrols' value='1'>");
document.writeln("<param name='showstatusbar' value='1'>");
document.writeln("<embed src ='" + audioURL + "' type='" + objTypeTag + "' autoplay='false' autostart='0' width='280' height='69' controller='1' showstatusbar='1' bgcolor='#ffffff'></embed>");
// Firefox and Opera Win require both autostart and autoplay
document.writeln("</object>");
document.writeln("</div>");
document.close(); // Finalizes the document
}
After an enormous amount of research and experimentation, I think I've finally found a near-universal way to embed audio in web pages without using Flash. I now have MP3s, M3Us, MIDs, AIFFs, WMAs, and WAVs playing on Windows (Internet Explorer 6, Internet Explorer 7, Firefox, and Opera) and the Mac (Safari, Firefox, Camino, and Opera). Better, the Windows browsers work both with and without QuickTime, and the JavaScript method is the recommended way to deal with Internet Explorer 7's aversion to embedded media. The only stubborn browser is Opera on the Mac, which tries to load the whole file before starting playback. I haven't been able to test this technique on Linux, so I'm curious to hear your experiences; please leave comments below.
My next goal is to develop an easy way to "skin" the player, probably by adding a few more variables to the launch links. I've also been experimenting with launching movie clips, though the multitude of codecs out there makes that onerous.
Eventually, I'd like to implement this technique in a non-Flash version of the Del.icio.us Play Tagger, a bookmarklet that rewrites any page you visit, replacing generic MP3 links with an embedded audio player. Play Tagger currently handles only MP3s at standard bitrates, and it seems to need to load them completely before starting playback, so there's room for improvement. And after all, that's is what got me interested in web audio in the first place. Download the tutorial files and let us know what you think.
Here are some sites that helped me develop the audio embedding code. Several contradict each other, so experimentation was essential.
<object> parameters.<object> tag parameters.David Battino is the audio editor for O’Reilly’s Digital Media site, the co-author of The Art of Digital Music, and on the steering committee for the Interactive Audio Special Interest Group (IASIG). He also writes, publishes, and performs Japanese kamishibai storycards.
Return to the digitalmedia.oreilly.com
Showing messages 1 through 128 of 128.
re: using an image in BatmoAudioPop.js?
background image?PlayerWin.document.writeln("<body bgcolor='#9999ff' background='http://www.example.com/your-image.jpg'>");PlayerWin.document.writeln("<body style='background: #9999ff url(\"www.example.com/your-image.jpg\") no-repeat'>");
Safari on Windows - playlist
why pop up? - keep it in an iframe
Having Some Issues
how to play multiple songs on embedded player
how to play multiple songs on embedded player
Auto-close the new pagesetTimeout(event,duration) command to the body line in the external JavaScript file:
onload='javascript:setTimeout(\"window.close();\"," + fileTime + ")';
streaming using ogg vorbisapplication/ogg (per vorbis.com/faq/#mimetype). Note that most of the plugins this script will trigger don't natively support Ogg, though.
Control Activation
A new hiccup
player problems
player problems
player problems
<embed src="http://lads.myspace.com/music/musicplayer.swf?n=aHR0cDovL211c2ljLm15c3BhY2UuY29t&t=zHsZYRMOUN+ONzVd6xqFnsq/LzzzmPWkOy+DkvG+JYQd9R3omDysf/lM9JLNmF4+nNR1bNk79KtdYhtKS3MXjg==&u=LTE=&a=0&d=MjIyNzEzMjEzXjExOTc3NjUwMzA=" hidden="false" autostart="true" autoplay="true" loop="true" volume="75%" border="0" height="270" width="400"></embed>
mp3 player in email?
<a href="http://www.example.com/mysong.mp3">My Song</a>
<embed src="http://lads.myspace.com/music/musicplayer.swf?n=aHR0cDovL211c2ljLm15c3BhY2UuY29t&t=zHsZYRMOUN+ONzVd6xqFnsq/LzzzmPWkOy+DkvG+JYQd9R3omDysf/lM9JLNmF4+nNR1bNk79KtdYhtKS3MXjg==&u=LTE=&a=0&d=MjIyNzEzMjEzXjExOTc3NjUwMzA=" hidden="false" autostart="true" autoplay="true" loop="true" volume="75%" border="0" height="270" width="400"></embed>
shuffle
<SCRIPT>
<!-- Hide script from old browsers
var Waves=new Array("1.wav","2.wav","3.wav","4.wav","5.wav")
var WaveNumber=Math.floor((Waves.length)*Math.random())
document.write("<EMBED SRC='" + Waves[WaveNumber] + "' AUTOSTART='TRUE' LOOP='FALSE' WIDTH='2' HEIGHT='2' HIDDEN='TRUE'>")
document.write("<NOEMBED>")
document.write("<BGSOUND SRC='" + Waves[WaveNumber] + "' AUTOSTART='TRUE' LOOP='FALSE' HIDDEN='TRUE'>")
document.write("</NOEMBED>")
document.write("</EMBED>")
// Stop hiding script -->
</SCRIPT>
combine enhanced and better
combine enhanced and better
no window title in Safari?
Firefox 2.0.0.1 on Linux not working
praise
Popup is always QT on a Windows IE 7
Popup is always QT on a Windows IE 7
<script src="BatmosphereAudioEmbed.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!-- Call external JavaScript file to embed player
embedPlayer("Sounds Sublime","/soundclips/soundssublime.m3u"); // title, filename
// -->
</script>
<noscript>Sounds Sublime (/soundclips/soundssublime.m3u) </noscript>
<h4>Select from these playlists to hear soundclips of Sounds Sublime duets,
Ingrid Heyn solos or Katrena Mitchell solos.</h4>
Sounds Sublime Playlists (/soundclips/soundssublime.m3u) (M3U)
// Pop-Up Embedder Script by David Battino, www.batmosphere.com
// Version 2006-05-31
// OK to use if this notice is included
function BatmoAudioPop(filedesc,filepath,WindowNumber)
{
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1
if (isWin) {
// Use MIME type = "application/x-mplayer2";
visitorOS="Windows";
} else {
// Use MIME type = "audio/mpeg"; // or audio/x-wav or audio/x-ms-wma, etc.
visitorOS="Other";
}
// Get the MIME type of the audio file from its extension (for non-Windows browsers)
var mimeType = "audio/mpeg"; // assume MP3/M3U
var objTypeTag = "application/x-mplayer2"; // The Windows MIME type to load the WMP plug-in in Firefox, etc.
var theExtension = filepath.substr(filepath.lastIndexOf('.')+1, 3); // truncates .aiff to aif
if (theExtension.toLowerCase() == "wav") { mimeType = "audio/x-wav"};
if (theExtension.toLowerCase() == "aif") { mimeType = "audio/x-aiff"};
if (theExtension.toLowerCase() == "wma") { mimeType = "audio/x-ms-wma"};
if (theExtension.toLowerCase() == "mid") { mimeType = "audio/mid"};
// Add additional MIME types as desired
if (visitorOS != "Windows") {
objTypeTag = mimeType; // audio/mpeg, audio/x-wav, audio/x-ms-wma, etc.
};
PlayerWin = window.open('',WindowNumber,'width=320,height=217,top=0,left=0,screenX=0,screenY=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0');
PlayerWin.focus();
PlayerWin.document.writeln("<html><head><title>" + filedesc + "</title></head>");
PlayerWin.document.writeln("<body bgcolor='#080010'>"); // specify background img if desired
PlayerWin.document.writeln("<div align='center'>");
PlayerWin.document.writeln("" + filedesc + "
");
PlayerWin.document.writeln("<object width='280' height='69'>");
PlayerWin.document.writeln("<param name='src' value='" + filepath + "'>");
PlayerWin.document.writeln("<param name='type' value='" + objTypeTag + "'>");
PlayerWin.document.writeln("<param name='autostart' value='1'>");
PlayerWin.document.writeln("<param name='showcontrols' value='1'>");
PlayerWin.document.writeln("<param name='showstatusbar' value='1'>");
PlayerWin.document.writeln("<embed src ='" + filepath + "' type='" + objTypeTag + "' autoplay='true' width='280' height='69' controller='1' showstatusbar='1' bgcolor='#9999ff' kioskmode='true'>");
PlayerWin.document.writeln("</embed></object></div>");
PlayerWin.document.writeln("Download this file (" + filepath +") <span style='font-size:10px'>(right-click or Control-click)</span>
");
PlayerWin.document.writeln("<form><div align='center'><input type='button' value='Close this window' onclick='javascript:window.close();'></div></form>");
PlayerWin.document.writeln("</body></html>");
PlayerWin.document.close(); // "Finalizes" new window
}
Update
Embedded Web Audio Player by David Battino fails
status bar on QuickTimeThe control bar (aka, "scrubber") for the QuickTime plug-in doesn't leave room for a time display (as opposed to the QuickTime Player, which has a time display and an audio level meter). So it's not like there's something you need to enable -- it's just not there.
One option would be to use QuickTime's JavaScript support (http://developer.apple.com/documentation/QuickTime/Conceptual/QTScripting_JavaScript/bQTScripting_JavaScri_Document/chapter_1000_section_5.html) : you could have a script continuously poll the movie time and update some little span of HTML.
Another option, depending on audience and expectations, might be to put timecode tracks in your movie and activate them, which would overlay the timecode display on top of the video. That's probably not a great option for typical end-users, but some pros would like it.
-Chris invalidname
.. shuffle?
Stop Batch DownloadingPlayerWin.document.writeln("<p style='font-size:12px;font-family:Lucida,sans-serif;text-align:center'><a href='" + filepath +"'>Download this file</a>
<span style='font-size:10px'>(right-click or Control-click)</span></p>");
Stop Batch Downloadingfilename -".mp3".
Stop Batch Downloading
function embedPlayer() {
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
// IE detection
var browser_type=navigator.appName
var browser_version=parseInt(navigator.appVersion)
if (isWin)
{ // to load curenly player of IE on Windows
if (browser_type=="Microsoft Internet Explorer"&&browser_version>=4)
{
// Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar)
document.writeln("<object width='300' height='69'>");
document.writeln("<param name='src' value='satie.mid'>");
document.writeln("<param name='autoplay' value='true'>");
document.writeln("<param name='showstatusbar' value='1'>");
// if QuickTime is insteled on IE Win require autoplay='true' without autostart='1'
document.writeln("<embed src ='satie.mid' autoplay='true' width='300' height='69' showstatusbar='1'></embed>");
document.writeln("</object>");
document.close(); // Finalizes the document
}
else // The MIME type to load the WMP plugin in non-IE browsers on Windows
{
// Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar)
document.writeln("<object width='300' height='69'>");
document.writeln("<param name='type' value='application/x-mplayer2'>");
document.writeln("<param name='src' value='satie.mid'>");
document.writeln("<param name='autostart' value='1'>");
document.writeln("<param name='showcontrols' value='1'>");
document.writeln("<param name='showstatusbar' value='1'>");
// Firefox and Opera Win require both autostart and autoplay
document.writeln("<embed src ='satie.mid' type='application/x-mplayer2' autoplay='true' autostart='1' width='300' height='69' controller='1' showstatusbar='1'></embed>");
document.writeln("</object>");
// Finalize the document
document.close();
}
}
else // The MIME type for Macs and Linux
{
// Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar)
document.writeln("<object width='300' height='69'>");
document.writeln("<param name='type' value='audio/mpeg'>");
document.writeln("<param name='src' value='satie.mid'>");
document.writeln("<param name='autostart' value='1'>");
document.writeln("<param name='showcontrols' value='1'>");
document.writeln("<param name='showstatusbar' value='1'>");
// Firefox and Opera Win require both autostart and autoplay
document.writeln("<embed src ='satie.mid' type='audio/mpeg' autoplay='true' autostart='1' width='300' height='69' controller='1' showstatusbar='1'></embed>");
document.writeln("</object>");
// Finalize the document
document.close();
}
}
Playlist Enhancement
Playlist Enhancement
Still have problem on FireFox
---------------------------
<HTML><HEAD><TITLE>Audio Test</TITLE>
</HEAD>
<BODY>
Play Audio on Web
<SCRIPT language=JavaScript type=text/javascript>
// Batmosphere Embedded Media Player, version 2006-05-31 , ....
var audioFolder = ""; // If you have a default audio directory, e.g., http://www.your-media-hosting-site.com/sounds/, you can put it here to make links on the referring page shorter.
function embedPlayer(MP3title,MP3URL) {
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1;
if (isWin) { // Use MIME type application/x-mplayer2
visitorOS="Windows";
} else { // Use MIME type audio/mpeg, audio/x-wav, etc.
visitorOS="Other";
}
var audioURL = audioFolder + MP3URL;
var objTypeTag = "application/x-mplayer2"; // The MIME type to load the WMP plugin in non-IE browsers on Windows
if (visitorOS != "Windows") { objTypeTag = "audio/mpeg"}; // The MIME type for Macs and Linux
document.writeln("<div>");
document.writeln("<strong style='font-size:18px; position:relative; top:-28px'>" + MP3title + "</strong>"); // Adjust font style to taste
document.writeln("<object width='280' height='69'>"); // Width is the WMP minimum. Height = 45 (WMP controls) + 24 (WMP status bar)
document.writeln("<param name='type' value='" + objTypeTag + "'>");
document.writeln("<param name='src' value='" + audioURL + "'>");
document.writeln("<param name='autostart' value='0'>");
document.writeln("<param name='showcontrols' value='1'>");
document.writeln("<param name='showstatusbar' value='1'>");
document.writeln("<embed src ='" + audioURL + "' type='" + objTypeTag + "' autoplay='false' autostart='0' width='280' height='69' controller='1' showstatusbar='1' bgcolor='#ffffff'></embed>");
// Firefox and Opera Win require both autostart and autoplay
document.writeln("</object>");
document.writeln("</div>");
document.close(); // Finalizes the document
}
</SCRIPT>
<SCRIPT language=JavaScript type=text/javascript><!--
embedPlayer("Title: Test Audio",
"sample.mp3");
// title, filename
// --></SCRIPT>
</BODY></HTML>
---------------------------
// Pop-Up Embedder Script by David Battino, www.batmosphere.com
// Version 2006-05-31
// OK to use if this notice is included
function BatmoAudioPop(filedesc,filepath,WindowNumber)
{
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1
if (isWin) {
// Use MIME type = "application/x-mplayer2";
visitorOS="Windows";
winHt=170;
quicktimeHt=69;
} else {
// Use MIME type = "audio/mpeg"; // or audio/x-wav or audio/x-ms-wma, etc.
visitorOS="Other";
winHt=130;
quicktimeHt=16;
}
// Get the MIME type of the audio file from its extension (for non-Windows browsers)
var mimeType = "audio/mpeg"; // assume MP3/M3U
var objTypeTag = "application/x-mplayer2"; // The Windows MIME type to load the WMP plug-in in Firefox, etc.
var theExtension = filepath.substr(filepath.lastIndexOf('.')+1, 3); // truncates .aiff to aif
if (theExtension.toLowerCase() == "wav") { mimeType = "audio/x-wav"};
if (theExtension.toLowerCase() == "aif") { mimeType = "audio/x-aiff"};
if (theExtension.toLowerCase() == "wma") { mimeType = "audio/x-ms-wma"};
if (theExtension.toLowerCase() == "mid") { mimeType = "audio/mid"};
// Add additional MIME types as desired
if (visitorOS != "Windows") {
objTypeTag = mimeType; // audio/mpeg, audio/x-wav, audio/x-ms-wma, etc.
};
PlayerWin = window.open('',WindowNumber,'width=360,height='+winHt+',top=0,left=0,screenX=0,screenY=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0');
PlayerWin.focus();
PlayerWin.document.writeln("<html><head><title>" + filedesc + "</title></head>");
PlayerWin.document.writeln("<body bgcolor='#d86202'; text='#DADA00'; background='images/curlywalnut.jpg'>"); // specify background img if desired
PlayerWin.document.writeln("<div align='center'>");
PlayerWin.document.writeln("<b style ='font-size:18px;font-family:Lucida,sans-serif;line-height:1.6'>" + filedesc + "</b>");
PlayerWin.document.writeln("<object width='300' height='69'>");
PlayerWin.document.writeln("<param name='src' value='" + filepath + "'>");
PlayerWin.document.writeln("<param name='type' value='" + objTypeTag + "'>");
PlayerWin.document.writeln("<param name='autostart' value='1'>");
PlayerWin.document.writeln("<param name='showcontrols' value='1'>");
PlayerWin.document.writeln("<param name='showstatusbar' value='1'>");
PlayerWin.document.writeln("<embed src ='" + filepath + "' type='" + objTypeTag + "' autoplay='true' width='280' height='"+quicktimeHt+"' controller='1' showstatusbar='1' bgcolor='' kioskmode='true'>");
PlayerWin.document.writeln("</embed></object></div>");
PlayerWin.document.writeln("
<form><div align='center'><input type='button' value='Close this window and stop playback' onclick='javascript:window.close();'></div></form>");
PlayerWin.document.writeln("</body></html>");
PlayerWin.document.close(); // "Finalizes" new window
}
Refining the refined...
Refining the refined...
Refining the refined...quicktimeHt determines the height of the playback controller bar (QuickTime or WMP), so calling it controllerHt might be clearer.window.open line simplifies to: PlayerWin = window.open('',WindowNumber,'width=360,height='+winHt+',top=0,left=0,screenX=0,screenY=0');function BatmoAudioPop(filedesc,filepath,WindowNumber)
function BatmoAudioPop(filedesc,caption,filepath,WindowNumber)
PlayerWin.document.writeln("<embed src ='" + filepath + "' type='" + objTypeTag + "' autoplay='true' width='280' height='40' controller='1' showstatusbar='0' bgcolor='#202529' kioskmode='true'>");
PlayerWin.document.writeln("</embed></object></div>");
PlayerWin.document.writeln("Download this file (" + filepath +") <span style='color: #FFFFFF; font-size:10px'>(right-click or CTRL-click)</span>
");
PlayerWin.document.writeln("<embed src ='" + filepath + "' type='" + objTypeTag + "' autoplay='true' width='280' height='40' controller='1' showstatusbar='0' bgcolor='#202529' kioskmode='true'>");
PlayerWin.document.writeln("</embed></object></div>");
PlayerWin.document.writeln("" + caption
";
PlayerWin.document.writeln("Download this file (" + filepath +") <span style='color: #FFFFFF; font-size:10px'>(right-click or CTRL-click)</span>
");
<u>06/19/06 -- James Interview</u> - (105:07min 96.2MB MP3 file) (james.mp3)
Refining the refined...
<html>
<head>
<script src="BatmosphereAudioEmbed.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
function playthis(filename)
{
<!-- Call external JavaScript file to embed player
embedPlayer("Another MP3",filename); // title, filename
}
// -->
</script>
</head>
<body>
<table border="1" cellspacing="0" width="100%" bordercolor="#008000" id="table1">
<tr>
<td width="309">abc.mp3</td>
<td>
<img border="0" src="play.jpeg" width="60" height="64" onclick="playthis('abc.mp3')"></td>
<td>
<img border="0" src="save.jpeg" width="56" height="47"></td>
</tr>
<tr>
<td width="309">xyz.mp3</td>
<td>
<img border="0" src="play.jpeg" width="60" height="64" onclick="playthis('xyz.mp3')"></td>
<td>
<img border="0" src="save.jpeg" width="56" height="47"></td>
</tr>
<tr>
<td width="309">wer.mp3</td>
<td>
<img border="0" src="play.jpeg" width="60" height="64" onclick="playthis('wer.mp3')"></td>
<td>
<img border="0" src="save.jpeg" width="56" height="47"></td>
</tr>
<tr>
<td height="26" width="309"> </td>
<td height="26"> </td>
<td height="26"> </td>
</tr>
</table>
</body>
</html>
Refining the refined...playthis(). Make sure the name is the same in the external script file.
<html>
<head>
<script src="BatmosphereAudioEmbed.js" type="text/javascript"></script>
<script language="javascript">
myfiles = new Array();
<?PHP
$files = GLOB('e:/*.*[3]',GLOB_NOSORT);
foreach ($files as $value)
{
print "myfiles.push(\"$value\");";
}
?>
function playthis(filename)
{
<!-- Call external JavaScript file to embed player
embedPlayer("<font color='#669900'>Playing:</font>"+filename,filename); // title, filename
}
// -->
</script>
</head>
<body>
<table border="1" cellspacing="0" width="100%" bordercolor="#008000" id="table1">
<script language="javascript">
for (x in myfiles)
{
document.write ("<tr>");
document.write("<td>");
document.write(myfiles[x]);
document.write("</td>");
document.write("<td>");
document.write("<center><input type='image' border='0' id='play' value='"+myfiles[x]+"' src='play.jpeg' width='34' height='34' onclick='playthis(this.value)'></center>");
document.write("</td>");
document.write("<td>");
document.write("<center><input type='image' src='save.jpeg' width='34' height='34' onclick=playthis(x)></center>");
document.write("</td>");
document.write("</tr>");
}
</script>
</table>
</body>
</html>
However, whenever the thickbox gallery opens, the links on the page for audio appear 'on top' - is this a z-index problem that can be solved by adjusting the script?
Any suggestions welcome!
Many thanks!