HTML - Audio Cues
Hi everyone.
I am working on a project with a few friends. The site is designed for people who are illiterate and so we are looking into how we could go about having audio cues play whenever the user hovers over a button or a section of an image map. If anyone would know of a good tutorial on how to do so in html5 it would be appreciated. Similar TutorialsThis may be a relatively easy answer but here we go.... HTML Code: <a href="audio.wav">Play this wav file!</a> The above is just a simple example but my problem is that no matter what I keep getting prompted for a download... Is there any specific reason why IE7 cannot directly access wav files or is this issue due to security settings.... Normally, in the past I haven't had an issue but at this time I am at a loss.... Any help would be appreciated... Thanks, Dark_Jackal Hello, I'm creating a site that requires the inbuilt audio player to keep streaming music between page loads. What coding options are available for this, HTML, PHP or otherwise? Regards Eddie Hey, On my site i have currently got windows media player to play an embedded wma file Code: <object id="MediaPlayer" height=46 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> <param name="filename" value="Windows XP Startup.wma"> <param name="Showcontrols" value="True"> <param name="autoStart" value="True"> <embed type="application/x-mplayer2" src="Windows XP Startup.wma" name="MediaPlayer"></embed> </object> That's my current source code for it ideally i would like to make it have the playlist option so on the playlist they can double click which songs they would like to listen Is this possible Cheers Lolium P.s, would it be possible for people who view the web page to browse the directory were the audio files will be kept? so they can choose which song to play?? I want to be able to add a mp3 audio file of a sermon to a church website I am building. I have done searches and find a lot of "embed" code, but none of these work. Nothing shows on the web page. What is the simplest way of doing this. I understand "embed" is not a legal word. I have tired "Object", but nothing shows using this command either. Any help will be appreciated. Lawrence I'm trying to playback an mp3 from within a table cell using a <a href> link. I don't want to use Flash and also don't want to use the HTML5 <audio> tag. I found this code Quote: function DHTMLSound(surl) { document.getElementById("dummyspan").innerHTML= "<embed src='"+surl+"' hidden=true autostart=true loop=false>"; } <span id=dummyspan></span> <form> <input type="button" value="Play Sound" onClick="DHTMLSound('success.wav')"> </form> and tried to incorporate it into the page. No luck. I think should be able to add the onClick part to the <a href> and have it play, but I get nothing. Thanks for any help, Mei Does anyone know how to position the <audio> player so it's stacked on top of a background image? If I make the player visible with <audio controls="controls">. I tried to treat it as an image by: Code: <style> <!-- this is the background image --> #container { display: block; margin-left: auto; margin-right: auto; position: relative; border:none; width: 380px; height: 633px; background-image: url("pictures/kohakuriver1.png"); background-position:center; <!-- this is the audio player --> #container audioplayer { position: absolute; border:none; left: 65px; width: 245px; height: 53px; #audio {top: 700px} </style> ... ... <body> ... <div id="container"> <audio controls="controls"> <source src="music/hupochuanClip.mp3" id="audio" type="audio/mpeg"/> <source src="music/hupochuanClip.ogg" id="audio" type="audio/ogg"/> </audio> </div> </body> It didn't work completely, it did move it to some odd place but not where I want it. Changing the height value won't have any effect (I tried changing it to like 7000px and it's still in the same place). I am designing a web page using Wordpress and have a rudimentary but working knowledge of HTML and have resources to help, so bear with me... My web site calls some audio files and they work fine. The line I am using is (a href=" url ") announcement (/a) Substitute appropriate GT & LT symbols accordingly... When I activate the page, the audio player covers the entire screen and all I get is a slide bar showing the progress of the audio track. Very boring,... What can I do to place an image there or change the size of the image to allow other image or words to be on the screen. I would appreciate it if I could get a sample of code to tweak. I currently run a phpBB3 forum, and I have one topic in particular that I want audio to play in. I did some looking around and found some HTML that would allow me to play an audio clip. I went to that topic, opened the source, plugged in the HTML, and after uploading the audio file, I pressed the apply changes, and it worked. The thing is, how do I SAVE it to the site? *The actual code I entered has the correct domain name. Code: <EMBED src="http://www.mydomain.com/forum/folder/who.wav" autostart=true loop=false volume=100 hidden=true><NOEMBED><BGSOUND src="http://www.mydomain.com/forum/folder/who.wav"></NOEMBED> Another question, not sure if HTML, but the favicon.ico for the address bar/favorites that I set works for Opera, but not for IE8...any ideas? My "BYO AUDIO" had a problem where it was fine with Firefox, but on IE it would keep playing even if it was paused! So, I got some guy to fix it and now it works great in IE, and the audio dragbar or anything doesn't even show up in Firefox!! I have no idea how this could have happen, all I know is he did something related to "Playweb". If anyone knows, that would be great. Thanks! Link: http://tinyurl.com/yhwe37e Ok, I figured out how to embed an audio clip into the web page that works pretty well across multiple browsers. The code looks like this:
Code: <embed width="200px" height="30px" loop="false" autostart="false" src="/media/GOAL.wav"></embed> And it looks like this on the web page: My question is, is it possible to add to that code so only a custom PNG file is visible until you click it and then the player begins? I don't even necessarily need the player to be visible. Can the audio simply play once when the PNG is clicked? What would that code look like? Thx. I am attempting to link to audio files that exist on my server using the anchor tag. I am able to download and play the audio files just fine on Firefox, Chrome and Safari, but not on Internet Explorer. When I click the link in IE, all I see is a bunch of random characters. Also, when I attempt to download the audio file IE attempts to download it as an html file. What can I do to fix this so that I am able to access these files via IE. Here is the code. Code: <a href="/audioFile.aif">audioFile.aif</a><br /> Hi, What is the html code to have a Youtube video on my website? Is it possible to embed just the Audio with a stop, pause, progress display? What is the html for this When I put in my code, it works just fine on my Mac in Safari or Firefox. However, when I test it on a PC in Explorer 7 or 8 it starts playing automatically. This is what my code looks like: Code: <audio controls="controls"> <source src="/media/GOAL.wav" type="audio/wav" autostart="false"/> <embed height="100px" width="200px" src="/media/GOAL.wav" /> </audio> The "autostart" code I put in apparently is wrong. Is there a way to fix this so it does not autostart in Explorer and any other browers? Thx. How to play an audio file in HTML? _______________ <object type="application/x-shockwave-flash" allowScriptAccess="never" allowNetworking="internal" height="0" width="0" data="http://www.youtube.com/v/link&autoplay=1&rel=0"> <param name="allowScriptAccess" value="never" /> <param name="allowNetworking" value="internal" /> <param name="movie" value="http://www.youtube.com/v/link&autoplay=1&rel=0" /> </object> I want to add a code to make the YouTube audio off. Any ideas? I am testing a really simple embed code: Code: <embed src="1.mp3" height=45 width=300 controls="smallconsole" autostart="true" nosave="true" loop="true"> When I open it in IE (Most recent version): It loads inside a Windows Media Player Plug-in, and plays fine. When I open it in Firefox (Most recent version: It loads inside a Quicktime plug-in, plays once, but if you refresh the page it won't play. You have to clear your cookies, and restart Mozilla for it to work. I can't seem to figure out why? Thanks in advance. EDIT: I tried using <object> tags instead, it works in both browsers just fine: Code: <OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"> <PARAM NAME="FileName" VALUE="1.mp3"> <PARAM name="autostart" VALUE="true/1"> <PARAM name="ShowControls" VALUE="true"> <param name="ShowStatusBar" value="false"> <PARAM name="ShowDisplay" VALUE="false"> <EMBED TYPE="application/x-mplayer2" SRC="1.mp3" NAME="MediaPlayer" WIDTH="200" HEIGHT="45" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED> </OBJECT> Hopefully this will help someone else with a similar problem. I'm using the following to play an audio file on one of my pages. It loops fine under Opera, but it won't loop under Firefox. It just gets to the end and stops. How do I get this thing to loop properly? HTML Code: <audio controls autoplay loop> <!-- Play audio with FireFox, Opera, and Chrome. --> <source src="media/audio.ogg" type="audio/ogg" /> <!-- Play audio with Internet Explorer and Safari. --> <source src="media/audio.mp3" type="audio/mpeg" /> </audio> Hi, I have an audio loop on my website but every time i load a new page it starts again. Is there a way to get this one loop playing consistently through pages??? Thanks Jonny I'm not sure where the best place to post this question is, so I thought I'd start here and see what I get. I want to set up a video player like it is on this site: http://blueroomnyc.com/work/Q3hLj98J...story-refresh/ There are 3 links to different videos on the page, but they all open in the same place when activated. How is this accomplished? Is it javascript? I'd like to be able to do the same thing with an audio plugin as well. Thanks. Hey guys. I don't know if I'm not using the correct data type, but I can't seem to get this audio file to play when I run my startTimer function. Any suggestions? Thank you! <!DOCTYPE html> <head> <script type="text/javascript"> var c = 0; var T; var a = 1000; var b; //var audio = document.createElement('asharpdot1'); //audioElement.setAttribute('audio', 'loading.wav'); //audioElement.play(); function startTimer(){ c = c+1 document.getElementById('myText').innerHTML=c; function Music(){ document.getElementById('asharpdot').audioElement.play(); } if(c<4){ T = setTimeout("startTimer()", a); //document.getElementById('myText').innerHTML=c; } else { c=0 T = setTimeout("startTimer()", a); }; } function SlowTemp(){ a=a-50 } function UpTemp(){ a=a+50 } document.getElementById('tempo').innerHTML= b; </script> </head> <body> <a id="myText" href="#">Beat</a> <a id="tempo" href="#">Tempo</a> <audio id="asharpdot" autoplay="autoplay" src="../Rhythm/VM618 home/asharpdot.wav" </audio> <input type="button" onclick="startTimer()" value="Start Timer"> <input type="button" onclick="SlowTemp()" value="Tempo Up"> <input type="button" onclick="UpTemp()" value="Tempo Down"> <audio id="csharp1dot" autoplay="autoplay" src="csharp1dot.wav" </audio> </body> </html> |