Highlighted

Need help stopping Autoplay, have tried the fixes, still stumped

New Here ,
Nov 06, 2017

Copy link to clipboard

Copied

I've added an audio mp3 file to my older version of Dreamweaver MX. Works great but it autoplays everytime the page loads and I need that to stop. I've read through the forum and have tried the fix of adding a code to the parameters (autoplay="false") but it still won't stop. Here's my code:

<embed src="sermons/Adam11.5.17Sermon.mp3" width="400" height="100" align="middle" autoplay="false"></embed>

I've also tried autostart="false" and that doesn't work.

Here's the site: CUCC Sermons

Do you have any other fixes or options I could try?

Thanks, Lori

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

You can fight with the archaic <embed> and <object> tags and the discrepancies between browsers with autostart and autoplay, or you can move to an HTML5 doctype and simply use the <audio> tag that modern browsers treat the same.

HTML5 <audio> doesn't auto-play by default. If you want it to autoplay, all you need to do is add the "autoplay" attribute to the <audio> tag in the same way "controls" is added below...

<audio style="width:400px; height:100px;" controls>

      <source src="sermons/Adam11.5.17Sermon.mp3" type="audio/mp3" />

</audio>

You are also missing a doctype declaration on your page. Before the opening <html> tag, add in the following as the first line of your code...

<!doctype html>

<html>

Views

1.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Need help stopping Autoplay, have tried the fixes, still stumped

New Here ,
Nov 06, 2017

Copy link to clipboard

Copied

I've added an audio mp3 file to my older version of Dreamweaver MX. Works great but it autoplays everytime the page loads and I need that to stop. I've read through the forum and have tried the fix of adding a code to the parameters (autoplay="false") but it still won't stop. Here's my code:

<embed src="sermons/Adam11.5.17Sermon.mp3" width="400" height="100" align="middle" autoplay="false"></embed>

I've also tried autostart="false" and that doesn't work.

Here's the site: CUCC Sermons

Do you have any other fixes or options I could try?

Thanks, Lori

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

You can fight with the archaic <embed> and <object> tags and the discrepancies between browsers with autostart and autoplay, or you can move to an HTML5 doctype and simply use the <audio> tag that modern browsers treat the same.

HTML5 <audio> doesn't auto-play by default. If you want it to autoplay, all you need to do is add the "autoplay" attribute to the <audio> tag in the same way "controls" is added below...

<audio style="width:400px; height:100px;" controls>

      <source src="sermons/Adam11.5.17Sermon.mp3" type="audio/mp3" />

</audio>

You are also missing a doctype declaration on your page. Before the opening <html> tag, add in the following as the first line of your code...

<!doctype html>

<html>

Views

1.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 06, 2017 0
Adobe Community Professional ,
Nov 06, 2017

Copy link to clipboard

Copied

Please try to add the type properties to the embed file:

<embed type="audio/mpeg" ...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2017 1
Adobe Community Professional ,
Nov 06, 2017

Copy link to clipboard

Copied

And then add autoplay= false and autostart = false.

In that way also chrome could honorate the autoplay/autostart = false

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 06, 2017 1
Adobe Community Professional ,
Nov 07, 2017

Copy link to clipboard

Copied

I don't recommend using audio <embed>.

Jon's answer is the correct one.  Use the HTML5 <audio> tag. 

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2017 1
Adobe Community Professional ,
Nov 07, 2017

Copy link to clipboard

Copied

You can fight with the archaic <embed> and <object> tags and the discrepancies between browsers with autostart and autoplay, or you can move to an HTML5 doctype and simply use the <audio> tag that modern browsers treat the same.

HTML5 <audio> doesn't auto-play by default. If you want it to autoplay, all you need to do is add the "autoplay" attribute to the <audio> tag in the same way "controls" is added below...

<audio style="width:400px; height:100px;" controls>

      <source src="sermons/Adam11.5.17Sermon.mp3" type="audio/mp3" />

</audio>

You are also missing a doctype declaration on your page. Before the opening <html> tag, add in the following as the first line of your code...

<!doctype html>

<html>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2017 1
New Here ,
Nov 07, 2017

Copy link to clipboard

Copied

Thank you Jon - that worked great! One issue though - I can't seem to move the audio player to where I want it to be on the page. I want it to be under the date November 5, 2017, but it keeps showing up way above the heading Sermons. Here is the website and code CUCC Sermons .Thanks so much!!!

                          <p align="left"><strong><font color="#000000">God Loves the Canaanites, Too</font></strong><font color="#000000"><br>

                            <font size="2">Rev. Adam Ericksen<br>

                            November 5, 2017</font></font></p>

                          <hr>

   

                          <p align="left">  <tr> <audio style="width:400px; height:100px;" controls> <source src="sermons/Adam11.5.17Sermon.mp3" type="audio/mp3" />

                      </audio>

    </p>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 07, 2017 0
Adobe Community Professional ,
Nov 08, 2017

Copy link to clipboard

Copied

well the snippet that you just copy paste here, doesn't correspond to the one published on line

here are some comment on this video

11.08.2017-09.22.37

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 08, 2017 0
Adobe Community Professional ,
Nov 08, 2017

Copy link to clipboard

Copied

Check your page against the validator at http://validator.w3.org/nu and clean up the errors dealing with extra and out of position <p>, <tr> and <td> tags.

It looks to me like you may have an errant copy/paste causing some issues there.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 08, 2017 0
lpty LATEST
New Here ,
Nov 10, 2017

Copy link to clipboard

Copied

Thanks Jon - I don't have much experience with html, but I'll try this and see what I can figure out. I really appreciate your help! I'll let you know how it worked.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 10, 2017 0