Managing multiple audios |
Managing multiple audios |
berrymoon |
Feb 9 2018, 11:56 AM
Post
#1
|
Group: Members Posts: 2 Joined: 9-February 18 Member No.: 26,586 |
Hi there I'm struggling many many hours before daring to post.
What I need to do is to manage the audios on a page. Basically (in my simple example) I have a background sound, and a map on which there is an area supposed to launch another audio using onclick. At the end of this audio, the background one should resume. Attached is my minimalist script and will appreciate if someone outhere can give it a look. Many thanks in advance. M Attached File(s) P_mini.html ( 3.1k ) Number of downloads: 1348 |
CharlesEF |
Feb 9 2018, 03:28 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,984 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
I admit I don't do much with audio files but looking over your code I don't see where 'audio_background' is defined. The script halts at that line of code.
|
berrymoon |
Feb 9 2018, 03:39 PM
Post
#3
|
Group: Members Posts: 2 Joined: 9-February 18 Member No.: 26,586 |
I admit I don't do much with audio files but looking over your code I don't see where 'audio_background' is defined. The script halts at that line of code. Thanks CharlesEF for your reply. I've downloaded the file to check and actually it has 103 lines. The definition of audio_background is set at t line 59 i.e. <script> let audio_backgroundaudio= document.getElementById("backgroundaudio"); </script> Hope it helps and thx again. BTW the background audio works perfectly. However when I click on the area (<area shape="circle" coords="600,425,30" onclick="playMusique(audio_main);" style="cursor: pointer;">) nothing happens the audio_main doesn't look as recognized for some reasons. This post has been edited by berrymoon: Feb 9 2018, 03:43 PM |
CharlesEF |
Feb 9 2018, 04:04 PM
Post
#4
|
Programming Fanatic Group: Members Posts: 1,984 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Those are not the same variables. 1 = 'audio_background' while 2 = 'audio_backgroundaudio'.
|
Lo-Fi Version | Time is now: 27th September 2024 - 12:56 AM |