Click here to Skip to main content
15,881,821 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: 8yr JS now giving me console error in FF and CHROME Pin
Richard Deeming11-Apr-21 21:29
mveRichard Deeming11-Apr-21 21:29 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Member 1514660812-Apr-21 3:00
Member 1514660812-Apr-21 3:00 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Richard Deeming12-Apr-21 3:09
mveRichard Deeming12-Apr-21 3:09 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Member 1514660812-Apr-21 3:14
Member 1514660812-Apr-21 3:14 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Richard Deeming12-Apr-21 3:39
mveRichard Deeming12-Apr-21 3:39 
GeneralRe: 8yr JS now giving me console error in FF and CHROME Pin
Member 1514660812-Apr-21 4:00
Member 1514660812-Apr-21 4:00 
QuestionKendo UI for jQuery Combobox noDataTemplate Not Loading Pin
Hypermommy5-Apr-21 9:35
Hypermommy5-Apr-21 9:35 
Questionquirks with use of Audio() Pin
Derell Licht31-Mar-21 16:03
professionalDerell Licht31-Mar-21 16:03 
First off, let me admit that I'm a newbie at javascript... I spent my career on C and C++, mostly in the embedded realm.

So I'm trying to fix some problems with an old html/javascript program called BallDroppings.
It was extracting its sound files from a .swf file, using fm.playSound() to play them, and it would hang in most browsers as soon as sound was enabled.

So I extracted the sound files into separate .mp3 files, and am using Audio() to play them:
// fm.playSound(Math.round(vel));//call flash function
var str = "sounds/sound_" + ("00" + vel).substr(-2,2) + ".mp3" ;
// console.log(str)
// sounds/sound_07.mp3
var hdlAudio = new Audio(str);
hdlAudio.play();

This is working, initially... however, the nature of the program is that more and more balls (and therefore, sounds) are active as the display becomes more complex.

What I'm finding is that, with certain browsers (Firefox and Pale Moon), once a certain number of sounds are active, the system appears to get confused, and the program loses control of the sounds - meaning that, among other things, sound cannot be turned off, and not all sounds that *should* be playing, *are* playing...
Interestingly, this issue does not occur with MS Edge; I've had up to 26 balls in flight, and all sounds are working, and can be turned off/on. I haven't tested with Chrome yet.

Does anyone have any idea what is wrong here??

Note: the entire project is available for cloning here:
GitHub - DerellLicht/BallDroppings: port of ancient BallDroppings app, without dependence upon swf file for sounds[^]

If you just want to see it running, use this:
BallDroppings[^]

draw lines to block the stream and bounce the ball around,
click 'Options' and then 'Sounds' to turn sounds on.

modified 31-Mar-21 22:12pm.

QuestionBizarre JSON parse problem Pin
intoittendenz28-Mar-21 23:27
intoittendenz28-Mar-21 23:27 
AnswerRe: Bizarre JSON parse problem Pin
Richard Deeming29-Mar-21 0:36
mveRichard Deeming29-Mar-21 0:36 
QuestionCreating a JSON body payload in plain JavaScript Pin
jkirkerx27-Mar-21 9:46
professionaljkirkerx27-Mar-21 9:46 
AnswerRe: Creating a JSON body payload in plain JavaScript [solved] Pin
jkirkerx27-Mar-21 10:52
professionaljkirkerx27-Mar-21 10:52 
GeneralRe: Creating a JSON body payload in plain JavaScript [solved] Pin
intoittendenz29-Mar-21 1:01
intoittendenz29-Mar-21 1:01 
QuestionCannot figure out what code lines does mean ... Pin
Member 1501261727-Mar-21 0:01
Member 1501261727-Mar-21 0:01 
AnswerRe: Cannot figure out what code lines does mean ... Pin
Member 1501261727-Mar-21 0:03
Member 1501261727-Mar-21 0:03 
AnswerRe: Cannot figure out what code lines does mean ... Pin
Peter_in_278027-Mar-21 0:54
professionalPeter_in_278027-Mar-21 0:54 
GeneralRe: Cannot figure out what code lines does mean ... Pin
Member 1501261727-Mar-21 21:40
Member 1501261727-Mar-21 21:40 
GeneralRe: Cannot figure out what code lines does mean ... Pin
Member 150126178-Apr-21 22:49
Member 150126178-Apr-21 22:49 
AnswerRe: Cannot figure out what code lines does mean ... Pin
Richard Deeming28-Mar-21 22:29
mveRichard Deeming28-Mar-21 22:29 
GeneralRe: Cannot figure out what code lines does mean ... Pin
Member 150126178-Apr-21 22:49
Member 150126178-Apr-21 22:49 
QuestionRedirect with (Page Visibility API) Pin
ab smine19-Mar-21 10:38
ab smine19-Mar-21 10:38 
QuestionNode-Schedule Module Can't Cron Job Scheduled Long Time Pin
Barış KAHRAMAN19-Mar-21 10:02
Barış KAHRAMAN19-Mar-21 10:02 
QuestionCalculation in javascript Pin
Krasimir Dermendzhiev16-Mar-21 3:31
Krasimir Dermendzhiev16-Mar-21 3:31 
AnswerRe: Calculation in javascript Pin
Richard Deeming16-Mar-21 4:39
mveRichard Deeming16-Mar-21 4:39 
GeneralRe: Calculation in javascript Pin
Krasimir Dermendzhiev16-Mar-21 21:36
Krasimir Dermendzhiev16-Mar-21 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.