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;








1
















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:



  1. the /home/user/public_html/ is the path of my file I am using with my web host

  2. my web host is x10 hosting

  3. I tried different arrangements of audio and embed arguments and the same result is present

  4. I also have a back to top button which somehow stops the audio from playing after the submit button is pressed

  5. I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?

  6. 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?










share|improve this 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

















1
















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:



  1. the /home/user/public_html/ is the path of my file I am using with my web host

  2. my web host is x10 hosting

  3. I tried different arrangements of audio and embed arguments and the same result is present

  4. I also have a back to top button which somehow stops the audio from playing after the submit button is pressed

  5. I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?

  6. 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?










share|improve this 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













1












1








1









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:



  1. the /home/user/public_html/ is the path of my file I am using with my web host

  2. my web host is x10 hosting

  3. I tried different arrangements of audio and embed arguments and the same result is present

  4. I also have a back to top button which somehow stops the audio from playing after the submit button is pressed

  5. I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?

  6. 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?










share|improve this question

















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:



  1. the /home/user/public_html/ is the path of my file I am using with my web host

  2. my web host is x10 hosting

  3. I tried different arrangements of audio and embed arguments and the same result is present

  4. I also have a back to top button which somehow stops the audio from playing after the submit button is pressed

  5. I notice the link changes once each of the two buttons is pressed so maybe the audio likes a certain link?

  6. 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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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

















  • 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












3 Answers
3






active

oldest

votes


















0














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>





share|improve this answer

























  • 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



















0














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>





share|improve this answer



























  • umm... all it gives is a text input and the onclick function doesn't work

    – user11221449
    Mar 28 at 2:41


















-1














<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?






share|improve this answer

























  • it was a name replacement I am using for this question in case someone thinks I took credit

    – user11221449
    Mar 27 at 14:46


















3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














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>





share|improve this answer

























  • 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
















0














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>





share|improve this answer

























  • 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














0












0








0







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>





share|improve this answer













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>






share|improve this answer












share|improve this answer



share|improve this answer










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


















  • 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














0














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>





share|improve this answer



























  • umm... all it gives is a text input and the onclick function doesn't work

    – user11221449
    Mar 28 at 2:41















0














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>





share|improve this answer



























  • umm... all it gives is a text input and the onclick function doesn't work

    – user11221449
    Mar 28 at 2:41













0












0








0







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>





share|improve this answer















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>






share|improve this answer














share|improve this answer



share|improve this answer








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 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
















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











-1














<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?






share|improve this answer

























  • it was a name replacement I am using for this question in case someone thinks I took credit

    – user11221449
    Mar 27 at 14:46















-1














<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?






share|improve this answer

























  • it was a name replacement I am using for this question in case someone thinks I took credit

    – user11221449
    Mar 27 at 14:46













-1












-1








-1







<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?






share|improve this answer













<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?







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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



Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript