Playing Sound In HTML5?

Jan 19, 2011

I can play a sound on my local machine, but when I upload to a server the same code it does not play. I cannot work out why, the link below gives the code. The multi channel code is here:

[URL]

I installed Firebug and insepcted the Net components and can see that the .wav files are being ought out but returning a 304 and then 404 error. This would be fine, however the path being sought is correct. Going to link does'nt play the sound, but removing the file and paring back to the directory brings you to the directory on the server and clicking the file does play the sound. The code works locally, and I simply cannot see what could be causing the issue in the server versions on both Firefox and Chrome.

View 3 Replies


ADVERTISEMENT

Html5 / Css - Video Keep Playing

Jun 30, 2011

I'm trying to write a site a hosts some of my own videos. I want to have a list of videos, each as a link, and when I click on one I want it to load on that same page by graying out everything else but the video. I'm using html 5 and css and I can get the video to come up, but the problem is that when I go to that page, all of the videos load. If I play a video from the pop up window and then close the window, the video will keep playing.

View 5 Replies View Related

Playing Sound With Mouse Over?

Jul 23, 2009

Is there any universal way (for all browsers) of using JavaScript to play some sound when you mouse over some link? If yes can somebody link me to this code or at least write me how one would do this?

View 5 Replies View Related

Playing Sound On Mouseclick?

Dec 22, 2010

How can I play a sound when I click an image, without the information bar popping up at top? I've looked all over, and I've tried a few javascript-only methods but none have worked for me.. Is flash the only way to go?

View 1 Replies View Related

Playing A Sound On A Local Pc From The Web

Oct 31, 2007

I am developing a web application where each page shows a series of small jpg images each with an onClick event which plays a small mp3 file using javascript.

It all works perfectly but is a bit slow to load, so the customer wondered if we might develop a local version which, although the page was accessed via the web, the images and mp3s were installed on a users local pc (will be machine specific application anyway).

I have managed to do this for the images by using:

<img src="file:///C|/folder/home.jpg" onClick="EvalSound('shortname')">

and adding the site as a trusted site in IE7 (after much head scratching!).

However, my embed statement to embed the local mp3 files doesn't seem to work. I am using:

<embed src="file:///C|/folder/filename.mp3" autostart=false width=0 height=0 name="shortname" enablejavascript="true">

I have tried all sorts of versions of this path and nothing seems to work. I just get an 'unspecified error' when I click the image.

View 1 Replies View Related

Loading And Playing A Sound With Javascript

Jan 17, 2006

I was wondering if there was a way to load a streaming/static
mp3, wav etc. with javascript and then beign able to control its
playing, pausing etc.

View 5 Replies View Related

Playing A Sound File When A Visitor To Website Moves Their Mouse / Pointer Over A Single Image

Mar 8, 2010

Is it possible to play a sound file when a visitor to my website moves their mouse/pointer over a single image no matter what browser they are using?

View 4 Replies View Related

Make The Source Of A Embedded Sound Switch To Different Sound Files?

Oct 10, 2011

I am trying to use the following code to make the source of a embedded sound switch to different sound files based on which link is clicked:

javascript:
scales=Array("sounds/scales/Mscale.wma", "sounds/scales/hminscale.wma", "sounds/scales/nminscale.wma", "sounds/scales/mminscale.wma", "sounds/scales/chrscale.wma");
function Mscale() {

[Code].....

View 8 Replies View Related

Div Playing Video Keeps Playing After Leaving Div

Dec 26, 2010

User clicks on image map that displays DIV1 with player id="Player1". When user clicks on another part of the map, DIV2 appears with another video - but DIV1's player "Player1" keeps playing. How can I stop the event after going to another div? Lots of efforts "out there" but I've yet to find out just how to do it successfully.

View 1 Replies View Related

Make The Player Select Playing With The Computer Or Other Player And Select Who Player Beginning Playing?

Dec 29, 2010

i need code in javascript to make the player select playing with the computer or other player and select who player beginning playing

View 2 Replies View Related

Preload A Sound

Jul 23, 2005

I'm using HTML 4 Strict and looking for a way to preload a sound.....

View 1 Replies View Related

Mouse Over Sound

Oct 28, 2000

Does anyone now where I can find a javascript that plays a .wav file when someone moves there mouse over an image? I was looking around for a while and the closest one I could find didn't work in Internet Explorer.

View 4 Replies View Related

JQuery :: HTML5 Video Tag Available?

Aug 6, 2009

do you know if it is possible to use selectors for a video tag?For example:

$(this).find('div.misc').find('ul').addClass('thumb-fila').find
('li').find('video').each(function(){
});

View 5 Replies View Related

HTML5 Js Script Img Name Change To Id

Oct 9, 2010

I been working with a simple slideshow script and everything works fine, however I am testing for html5 validation and all but pass except the script calls for img name but in html5 you have to use id now for images. I have tried adding

[Code]...

View 2 Replies View Related

Page Keeps Reloading - Js - Html5

Nov 21, 2011

I'm trying to learn js &html5. now i have an issue. i'm working on a dice game (craps) using the html5 <canvas>. my dice are working fine but every time i click the "roll" button the page reloads which resets my form. the form provides feedback about the rolls. it includes the output of the counter variable, and win, lose, or shoot again info.

Html5 can be viewed at

Here is some of the js. if you need it all i'll post it later - just let me know.

Fyi- if i take the call to fxInit() out of the body tag in the html5 the canvas does not persist, it blinks with every (roll) onClick Event

I have used ie9 js debugger and it steps through flawlessly every time 4-5 counts .

var firstTurn = true;

View 6 Replies View Related

Sound Width Javascript

Aug 24, 2007

I need to create sound with Javascript. Until now all the code I have
been trying doesn't work width Firefox. can some one please show me
how to do it, or give me a link to a good article?

View 2 Replies View Related

Image Flip With Sound

Jan 18, 2005

Below is the script. Just insert the name of your sound file where it says car3.wav.
At some point, the script turns from a sound loader into an image loader -- that begins at this line:

if (document.images)

<script LANGUAGE="JavaScript">
var aySound = new Array();
// Below: source for sound files to be preloaded
aySound[0] = "car3.wav";

// DO NOT edit below this line
document.write('<BGSOUND ID="auIEContainer">')
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE||NS? 1:0;
onload=auPreload;

function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = ''
for (i=0;i<aySound.length;i++)
Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:''
else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }

if (document.images)
{img1on = new Image();
img1on.src = "CI-on.gif";
img1off = new Image();
img1off.src = "CI-off.gif";}

function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");}
}
function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");}
}
//
</script>

There are five links buttons in the demo but only the introduction of "img1" is shown in this sample script.

In the document body, an anchor uses an onMouseOver to call for both the image flip AND the sound play.
Then it uses an onMouseOut to both revert the image and stop the sound play.

<P><A HREF="http://www.jeffs-icons.net/RZ/CI-F.html" TARGET=_top onMouseOver="imgOn('img1'), playSound(0)" onMouseOut="stopSound(0), imgOff('img1')"><IMG SRC="CI-off.gif" NAME="img1" border=0 ALT="Club Info"></A>

View 2 Replies View Related

Play Sound After X Seconds?

Jun 25, 2006

I have built an admin area for employees of a business. Once logged-in, if they sit idle for 5 minutes their session will be killed ( the time may vary depending on the employee ). I do all this with php but don't really know much about javascript.

What I would like to do is start playing a small sound repeatedly when the employees session is about 30 seconds from expiring. ( this will give the employee time to click on a link to keep their session alive )

So when the page loads, I would like to pass a length of time in seconds to a javascript. So if the employee can sit idle for 5 minutes, that would be 300 seconds. Minus the 30 seconds that I would like the alarm to be playing for which gives us 270 seconds. ( I'll pass this number to the script with PHP, the script does not have to figure this out... just to be clear. )

So I'm looking for something like this:
- On page load, tell javascript to count down a specific number of seconds ( 270 )
- When the countdown reaches 0, start playing sound file repeatedly.

Sounds easy enough but I haven't been able to find anything like this yet. The only ones I've seen actually display the countdown which I don't want. I want this to count down invisibly. Oh and it should hopefully work in both IE and Firefox.

View 1 Replies View Related

Javascript Beep Sound

Oct 25, 2007

can have a system(CPU) beep sound through JAVASCRIPT??

View 2 Replies View Related

Image Slideshow With Sound?

Mar 28, 2011

I've got a script at present which allows me to cycle through images stored in an array as a slide show on a timed basis per each one.What I would like to do is have a 2nd array which has .wav files and when the first image is shown the first sound clip in the 2nd array plays and when finished the 2nd image shows followed by the playing of the 2nd sound clip in the array.If It is not possible to move images when the sound finishes I will set the length but would like to play the sound clips with the image.My code is shown below :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

[code]....

View 2 Replies View Related

JS Play Sound On Timer

Apr 17, 2011

I know this may sound stupid, but for the life of me I just can't seem to figure out how to code a sound being played every lets say 300 seconds.

View 1 Replies View Related

JQuery :: HTML5 - Two New Methods To JS Selector API

Dec 1, 2010

HTML5 brings two new methods to the js selector API: querySelector() and querySelectorAll(). These methods can be used to match elements against a group of selectors. I think, a lot of the functionality overlaps with jQuery selectors. My guess is that these new methods will be a few times faster than jQuery selectors because they are natively implemented. My question is, how will jQuery use these additions to the js selector API? Will jQuery selectors just encapsulate these new methods? If so, is this work in progress or..

View 1 Replies View Related

Submit() Not Working On HTML5 Page / What To Fix It?

Nov 28, 2011

In an HTML5 document I have a form code...

At the bottom of the form, I have a submit button that calls Javascript validation code...

Result: Error: document.ContactForm.submit is not a function

If I place a page from another site in this site and modify it as needed to work with the cgi document, everything works. Then I can copy the validation code that worked into the HTML5 page and it fails.

The only difference I can see is that one page is XHTML Transitional and the other is HTML5 so apparently there's a trick I don't yet know about using Javascript and HTML5.

View 4 Replies View Related

Html5 Canvas Game Drawing?

Mar 21, 2010

I am trying to create an Asteroids type game using JavaScript along with html5's canvas element for drawing. I have searched around and have looked at examples but I can't figure out what is wrong with my rendering that I do in the game loop that is run every frame. The problem appears to be only that the canvas is not cleared at the beginning of each frame but I feel there might be something wrong also. The code used and shown below only works in Firefox but not Google Chrome or Safari.

[Code]...

View 2 Replies View Related

Wont Load The Full Map JS HTML5?

Nov 25, 2011

i,m trying to make an application with JS and html5 i have tryed to make a google map who loads my position and let me choose a target positioni got it to work but sudenly the map have stoped loading as it shud i need to tilt my phone to get it to load the full map and i can`t figure out what i have done wrong:(

<!DOCTYPE html><html>
<head>
<title>Sigvartsen</title>

[code]....

View 9 Replies View Related

Conflict Between Phonegap And Html5 Object?

Sep 13, 2011

i am using phonegap and html5 in my webapp, the problem is when i try to use the html5's FileReader it conflicts with the phonegap's FileReader object.. it's as if when i invoke the FileReader in html5 the one that is being called is the FileReader of phonegap.. any workaround?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved