Background sounds for webpages using HTML Watch

Nat_Griffiths
Badges: 2
Rep:
?
#1
Report Thread starter 4 years ago
#1
Hi

I'm currently creating a website for my college coursework which contains a contact details page. And I thought to make it a bit more interesting, I would make a sound clip of a phone ringing play within the background of the webpage whenever the user navigates to the page and it loads up in the browser. So I entered the following code, however previewed my page within IE and Chrome and the sound won't play in the background of the page with either of them so I'm thinking it might be an error with the way I've typed the code. The code I've put within the head section is:

<bgsound loop="1" src="sounds/phone_ring.wav" />

Could someone point out where I'm going wrong please, or if it's not me, what could be causing the problem.

Thanks in advance
0
reply
estel
Badges: 17
Rep:
?
#2
Report 4 years ago
#2
bgsound is an old tag from before the days of the internet, so it doesn't really work any more

If you want to do this on the modern web, you should look at the audio tag.

Example from that link:

Code:
<audio src="sounds/phone_ring.wav" autoplay loop>
  Your browser does not support the <code>audio</code> element.
</audio>
0
reply
estel
Badges: 17
Rep:
?
#3
Report 4 years ago
#3
Sorry, because this is a development forum and I just went to a UX talk, I feel obliged to add:

Your (fictional?) users don't care about how exciting the contact page is.
Your users come to the contact page to learn how to contact you.
They want this to be as quick and easy and hassle-free as possible.
Your users really, really don't want to wonder why they can hear a telephone ringing.

This is, of course, almost entirely irrelevant to your coursework
0
reply
Nat_Griffiths
Badges: 2
Rep:
?
#4
Report Thread starter 4 years ago
#4
Not to worry Estel I appreciate your guidance. Thankyou for your suggestion regarding the audio tag. I'll give that a go.


Posted from TSR Mobile
0
reply
Planto
Badges: 16
Rep:
?
#5
Report 4 years ago
#5
(Original post by estel)
This is, of course, almost entirely irrelevant to your coursework
Unless there is a design element to the course, in which case playing sounds in the background of a website is probably grounds for a reduced grade (and a public shaming).
0
reply
Doones
Badges: 21
Rep:
?
#6
Report 4 years ago
#6
(Original post by estel)
Sorry, because this is a development forum and I just went to a UX talk, I feel obliged to add:

Your (fictional?) users don't care about how exciting the contact page is.
Your users come to the contact page to learn how to contact you.
They want this to be as quick and easy and hassle-free as possible.
Your users really, really don't want to wonder why they can hear a telephone ringing.

This is, of course, almost entirely irrelevant to your coursework
This.

Posted from TSR Mobile
0
reply
Nat_Griffiths
Badges: 2
Rep:
?
#7
Report Thread starter 4 years ago
#7
The audio tag hasn't seemed to make any difference. However since you've all advised it would probably be best not to include such a sound in the background of the page, I won't worry about it too much. Thanks for your help anyway.
0
reply
elohssа
Badges: 0
Rep:
?
#8
Report 4 years ago
#8
Just embed some porn in there. Make it more interesting.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Are you tempted to change your firm university choice now or on A-level results day?

Yes, I'll try and go to a uni higher up the league tables (129)
19.55%
Yes, there is a uni that I prefer and I'll fit in better (63)
9.55%
No I am happy with my course choice (374)
56.67%
I'm using Clearing when I have my exam results (94)
14.24%

Watched Threads

View All