Why does html audio played by a web host only play when submit button is pressed [duplicate]How to make audio autoplay on chromeSubmitting a form by pressing enter without a submit buttonHTML button to NOT submit formWhy does HTML think “chucknorris” is a color?Audio in html page continues to play even after I exit the web browser control windows phone 8Audio Playing Badly when OnlineAudio file served from Web Api and IIS7.5 only plays once in ChromeHTML audio element not playing on first time?disable audio from keeping playing after lock screen or press home button in safariHow to play an audio file in the background after clicking a link? (no embed)
Upper Bound for a Sum
What is a term for "modern" technology that doesn't imply up-to-date?
foot-pounds of energy?
What is the reason behind water not falling from a bucket at the top of loop?
How to call made-up data?
Getting an entry level IT position later in life
What's "halachic" about "Esav hates Ya'akov"?
Can attackers change the public key of certificate during the SSL handshake
Piece de Resistance - Introduction & Ace and A's
How can I perform a deterministic physics simulation?
How do I handle a DM that plays favorites with certain players?
Generate random number in Unity without class ambiguity
How do people drown while wearing a life jacket?
How to win against ants
Drawing arrowtips at the end of each segment in a polygonal path
Can you put ranks into knowledge skills that aren't class skills?
What could prevent players from leaving an island?
Would this winged human/angel be able to fly?
Why do rocket engines use nitrogen actuators to operate the fuel/oxidiser valves instead of electric servos?
If someone else uploads my GPL'd code to Github without my permission, is that a copyright violation?
C# TCP server/client class
Is there a command-line tool for converting html files to pdf?
How can I use commands with sudo without changing owner of the files?
Is the first page of a novel really that important?
Why does html audio played by a web host only play when submit button is pressed [duplicate]
How to make audio autoplay on chromeSubmitting a form by pressing enter without a submit buttonHTML button to NOT submit formWhy does HTML think “chucknorris” is a color?Audio in html page continues to play even after I exit the web browser control windows phone 8Audio Playing Badly when OnlineAudio file served from Web Api and IIS7.5 only plays once in ChromeHTML audio element not playing on first time?disable audio from keeping playing after lock screen or press home button in safariHow to play an audio file in the background after clicking a link? (no embed)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
This question already has an answer here:
How to make audio autoplay on chrome
14 answers
I was writing an html code with the following code:
<audio src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay><embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true"></audio>
I used an <embed>
for those people without <audio>
supported browsers but with or without the embed tag, the audio only plays when the submit button of my random form is pressed although I was expecting audio to play after it has loaded and not after a press of a button.
Just some more background information:
- the /home/user/public_html/ is the path of my file I am using with my web host
- my web host is x10 hosting
- I tried different arrangements of audio and embed arguments and the same result is present
- I also have a back to top button which somehow stops the audio from playing after the submit button is pressed
- I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?
- I have a javascript controlled welcoming pop-up that also comes in action once loaded
So again, how do I make audio play once loaded and not after a press of a submit button?
html html5 audio html5-audio
marked as duplicate by Kaiido, Community♦ Mar 28 at 2:52
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to make audio autoplay on chrome
14 answers
I was writing an html code with the following code:
<audio src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay><embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true"></audio>
I used an <embed>
for those people without <audio>
supported browsers but with or without the embed tag, the audio only plays when the submit button of my random form is pressed although I was expecting audio to play after it has loaded and not after a press of a button.
Just some more background information:
- the /home/user/public_html/ is the path of my file I am using with my web host
- my web host is x10 hosting
- I tried different arrangements of audio and embed arguments and the same result is present
- I also have a back to top button which somehow stops the audio from playing after the submit button is pressed
- I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?
- I have a javascript controlled welcoming pop-up that also comes in action once loaded
So again, how do I make audio play once loaded and not after a press of a submit button?
html html5 audio html5-audio
marked as duplicate by Kaiido, Community♦ Mar 28 at 2:52
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
developers.google.com/web/updates/2017/09/…
– Kaiido
Mar 27 at 2:59
Chrome makes autoplay audio near impossible read this and despair
– zer00ne
Mar 27 at 3:00
Possible duplicate of How to make audio autoplay on chrome But beware two most upvoted answers are relying on bugs (which seem to have been fixed already)
– Kaiido
Mar 27 at 3:09
The problem still is there on my friend's mobile safari, and I am using a web host not the default chrome html runner. Also, the audio actually plays on my chrome, just not automatically, it is with the help of a submit button.
– user11221449
Mar 27 at 14:56
it isn't duplicate but it help fix my problem with my web host running in chrome, I am not sure about my friend's safari problem though...
– user11221449
Mar 28 at 2:53
add a comment |
This question already has an answer here:
How to make audio autoplay on chrome
14 answers
I was writing an html code with the following code:
<audio src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay><embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true"></audio>
I used an <embed>
for those people without <audio>
supported browsers but with or without the embed tag, the audio only plays when the submit button of my random form is pressed although I was expecting audio to play after it has loaded and not after a press of a button.
Just some more background information:
- the /home/user/public_html/ is the path of my file I am using with my web host
- my web host is x10 hosting
- I tried different arrangements of audio and embed arguments and the same result is present
- I also have a back to top button which somehow stops the audio from playing after the submit button is pressed
- I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?
- I have a javascript controlled welcoming pop-up that also comes in action once loaded
So again, how do I make audio play once loaded and not after a press of a submit button?
html html5 audio html5-audio
This question already has an answer here:
How to make audio autoplay on chrome
14 answers
I was writing an html code with the following code:
<audio src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay><embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true"></audio>
I used an <embed>
for those people without <audio>
supported browsers but with or without the embed tag, the audio only plays when the submit button of my random form is pressed although I was expecting audio to play after it has loaded and not after a press of a button.
Just some more background information:
- the /home/user/public_html/ is the path of my file I am using with my web host
- my web host is x10 hosting
- I tried different arrangements of audio and embed arguments and the same result is present
- I also have a back to top button which somehow stops the audio from playing after the submit button is pressed
- I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?
- I have a javascript controlled welcoming pop-up that also comes in action once loaded
So again, how do I make audio play once loaded and not after a press of a submit button?
This question already has an answer here:
How to make audio autoplay on chrome
14 answers
html html5 audio html5-audio
html html5 audio html5-audio
edited Mar 27 at 4:29
Kaiido
51.4k4 gold badges76 silver badges119 bronze badges
51.4k4 gold badges76 silver badges119 bronze badges
asked Mar 27 at 2:49
user11221449
marked as duplicate by Kaiido, Community♦ Mar 28 at 2:52
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kaiido, Community♦ Mar 28 at 2:52
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kaiido, Community♦ Mar 28 at 2:52
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
developers.google.com/web/updates/2017/09/…
– Kaiido
Mar 27 at 2:59
Chrome makes autoplay audio near impossible read this and despair
– zer00ne
Mar 27 at 3:00
Possible duplicate of How to make audio autoplay on chrome But beware two most upvoted answers are relying on bugs (which seem to have been fixed already)
– Kaiido
Mar 27 at 3:09
The problem still is there on my friend's mobile safari, and I am using a web host not the default chrome html runner. Also, the audio actually plays on my chrome, just not automatically, it is with the help of a submit button.
– user11221449
Mar 27 at 14:56
it isn't duplicate but it help fix my problem with my web host running in chrome, I am not sure about my friend's safari problem though...
– user11221449
Mar 28 at 2:53
add a comment |
developers.google.com/web/updates/2017/09/…
– Kaiido
Mar 27 at 2:59
Chrome makes autoplay audio near impossible read this and despair
– zer00ne
Mar 27 at 3:00
Possible duplicate of How to make audio autoplay on chrome But beware two most upvoted answers are relying on bugs (which seem to have been fixed already)
– Kaiido
Mar 27 at 3:09
The problem still is there on my friend's mobile safari, and I am using a web host not the default chrome html runner. Also, the audio actually plays on my chrome, just not automatically, it is with the help of a submit button.
– user11221449
Mar 27 at 14:56
it isn't duplicate but it help fix my problem with my web host running in chrome, I am not sure about my friend's safari problem though...
– user11221449
Mar 28 at 2:53
developers.google.com/web/updates/2017/09/…
– Kaiido
Mar 27 at 2:59
developers.google.com/web/updates/2017/09/…
– Kaiido
Mar 27 at 2:59
Chrome makes autoplay audio near impossible read this and despair
– zer00ne
Mar 27 at 3:00
Chrome makes autoplay audio near impossible read this and despair
– zer00ne
Mar 27 at 3:00
Possible duplicate of How to make audio autoplay on chrome But beware two most upvoted answers are relying on bugs (which seem to have been fixed already)
– Kaiido
Mar 27 at 3:09
Possible duplicate of How to make audio autoplay on chrome But beware two most upvoted answers are relying on bugs (which seem to have been fixed already)
– Kaiido
Mar 27 at 3:09
The problem still is there on my friend's mobile safari, and I am using a web host not the default chrome html runner. Also, the audio actually plays on my chrome, just not automatically, it is with the help of a submit button.
– user11221449
Mar 27 at 14:56
The problem still is there on my friend's mobile safari, and I am using a web host not the default chrome html runner. Also, the audio actually plays on my chrome, just not automatically, it is with the help of a submit button.
– user11221449
Mar 27 at 14:56
it isn't duplicate but it help fix my problem with my web host running in chrome, I am not sure about my friend's safari problem though...
– user11221449
Mar 28 at 2:53
it isn't duplicate but it help fix my problem with my web host running in chrome, I am not sure about my friend's safari problem though...
– user11221449
Mar 28 at 2:53
add a comment |
3 Answers
3
active
oldest
votes
try this:
<audio controls autoplay>
<src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay>
<embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true">
</audio>
I prefer no controls and is there such thing as a<src>
tag? also, I know how remove control argument to remove controls
– user11221449
Mar 27 at 15:34
add a comment |
I think that you need to learn some JavaScript to improve your code.
The HTML5 has a tag named input
,you need to use it and write some ECMAScript to use together.
This is my web code about the music,I think this can be a example to you.
<input type="bottom" value="music" onclick="music()">
<script>
function music()
var change_music = document.body.createElement("audio");
change_music.autoplay = 1;
change_music.controls = 1;
change_music.src = "/home/user/public_html/copyrighted-music.mp3";
document.body.append(music);
;
</script>
umm... all it gives is a text input and theonclick
function doesn't work
– user11221449
Mar 28 at 2:41
add a comment |
<audio controls>
<source src="/home/user/public_html/copyrighted-music.mp3" type="audio/mpeg">
</audio>
Yous should probaly read more on audio in html5 espcially from w3schools site. By the way why on earth are using copyrighted-music.mp3
?
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
try this:
<audio controls autoplay>
<src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay>
<embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true">
</audio>
I prefer no controls and is there such thing as a<src>
tag? also, I know how remove control argument to remove controls
– user11221449
Mar 27 at 15:34
add a comment |
try this:
<audio controls autoplay>
<src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay>
<embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true">
</audio>
I prefer no controls and is there such thing as a<src>
tag? also, I know how remove control argument to remove controls
– user11221449
Mar 27 at 15:34
add a comment |
try this:
<audio controls autoplay>
<src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay>
<embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true">
</audio>
try this:
<audio controls autoplay>
<src="/home/user/public_html/copyrighted-music.mp3" hidden autoplay>
<embed src="/home/user/public_html/copyrighted-music.mp3" width="180" height="90" hidden="true">
</audio>
answered Mar 27 at 5:07
PHP GeekPHP Geek
1,9801 gold badge8 silver badges20 bronze badges
1,9801 gold badge8 silver badges20 bronze badges
I prefer no controls and is there such thing as a<src>
tag? also, I know how remove control argument to remove controls
– user11221449
Mar 27 at 15:34
add a comment |
I prefer no controls and is there such thing as a<src>
tag? also, I know how remove control argument to remove controls
– user11221449
Mar 27 at 15:34
I prefer no controls and is there such thing as a
<src>
tag? also, I know how remove control argument to remove controls– user11221449
Mar 27 at 15:34
I prefer no controls and is there such thing as a
<src>
tag? also, I know how remove control argument to remove controls– user11221449
Mar 27 at 15:34
add a comment |
I think that you need to learn some JavaScript to improve your code.
The HTML5 has a tag named input
,you need to use it and write some ECMAScript to use together.
This is my web code about the music,I think this can be a example to you.
<input type="bottom" value="music" onclick="music()">
<script>
function music()
var change_music = document.body.createElement("audio");
change_music.autoplay = 1;
change_music.controls = 1;
change_music.src = "/home/user/public_html/copyrighted-music.mp3";
document.body.append(music);
;
</script>
umm... all it gives is a text input and theonclick
function doesn't work
– user11221449
Mar 28 at 2:41
add a comment |
I think that you need to learn some JavaScript to improve your code.
The HTML5 has a tag named input
,you need to use it and write some ECMAScript to use together.
This is my web code about the music,I think this can be a example to you.
<input type="bottom" value="music" onclick="music()">
<script>
function music()
var change_music = document.body.createElement("audio");
change_music.autoplay = 1;
change_music.controls = 1;
change_music.src = "/home/user/public_html/copyrighted-music.mp3";
document.body.append(music);
;
</script>
umm... all it gives is a text input and theonclick
function doesn't work
– user11221449
Mar 28 at 2:41
add a comment |
I think that you need to learn some JavaScript to improve your code.
The HTML5 has a tag named input
,you need to use it and write some ECMAScript to use together.
This is my web code about the music,I think this can be a example to you.
<input type="bottom" value="music" onclick="music()">
<script>
function music()
var change_music = document.body.createElement("audio");
change_music.autoplay = 1;
change_music.controls = 1;
change_music.src = "/home/user/public_html/copyrighted-music.mp3";
document.body.append(music);
;
</script>
I think that you need to learn some JavaScript to improve your code.
The HTML5 has a tag named input
,you need to use it and write some ECMAScript to use together.
This is my web code about the music,I think this can be a example to you.
<input type="bottom" value="music" onclick="music()">
<script>
function music()
var change_music = document.body.createElement("audio");
change_music.autoplay = 1;
change_music.controls = 1;
change_music.src = "/home/user/public_html/copyrighted-music.mp3";
document.body.append(music);
;
</script>
edited Mar 27 at 6:02
gameon67
1,5389 silver badges28 bronze badges
1,5389 silver badges28 bronze badges
answered Mar 27 at 4:51
God.wangGod.wang
11 bronze badge
11 bronze badge
umm... all it gives is a text input and theonclick
function doesn't work
– user11221449
Mar 28 at 2:41
add a comment |
umm... all it gives is a text input and theonclick
function doesn't work
– user11221449
Mar 28 at 2:41
umm... all it gives is a text input and the
onclick
function doesn't work– user11221449
Mar 28 at 2:41
umm... all it gives is a text input and the
onclick
function doesn't work– user11221449
Mar 28 at 2:41
add a comment |
<audio controls>
<source src="/home/user/public_html/copyrighted-music.mp3" type="audio/mpeg">
</audio>
Yous should probaly read more on audio in html5 espcially from w3schools site. By the way why on earth are using copyrighted-music.mp3
?
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
add a comment |
<audio controls>
<source src="/home/user/public_html/copyrighted-music.mp3" type="audio/mpeg">
</audio>
Yous should probaly read more on audio in html5 espcially from w3schools site. By the way why on earth are using copyrighted-music.mp3
?
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
add a comment |
<audio controls>
<source src="/home/user/public_html/copyrighted-music.mp3" type="audio/mpeg">
</audio>
Yous should probaly read more on audio in html5 espcially from w3schools site. By the way why on earth are using copyrighted-music.mp3
?
<audio controls>
<source src="/home/user/public_html/copyrighted-music.mp3" type="audio/mpeg">
</audio>
Yous should probaly read more on audio in html5 espcially from w3schools site. By the way why on earth are using copyrighted-music.mp3
?
answered Mar 27 at 3:03
user11263494
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
add a comment |
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
it was a name replacement I am using for this question in case someone thinks I took credit
– user11221449
Mar 27 at 14:46
add a comment |
developers.google.com/web/updates/2017/09/…
– Kaiido
Mar 27 at 2:59
Chrome makes autoplay audio near impossible read this and despair
– zer00ne
Mar 27 at 3:00
Possible duplicate of How to make audio autoplay on chrome But beware two most upvoted answers are relying on bugs (which seem to have been fixed already)
– Kaiido
Mar 27 at 3:09
The problem still is there on my friend's mobile safari, and I am using a web host not the default chrome html runner. Also, the audio actually plays on my chrome, just not automatically, it is with the help of a submit button.
– user11221449
Mar 27 at 14:56
it isn't duplicate but it help fix my problem with my web host running in chrome, I am not sure about my friend's safari problem though...
– user11221449
Mar 28 at 2:53