• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Audio not working in mobile Preview

New Here ,
Dec 07, 2017 Dec 07, 2017

Copy link to clipboard

Copied

I'm making a simple webpage for a project using a trial of Dreamweaver 2017.1; here's the audio and video code:

<video autoplay loop muted>

    <source src="SkyLetterVideo.mp4" type="video/mp4">

  

</video>

<audio autoplay loop>

<source src="background.mp3" type="audio/mpeg">

<source src="background.ogg" type="audio/ogg">

</audio>

Audio and video work fine in live view and in browser previews (Chrome 8 and Safari 10) but I can't hear audio in mobile previews on a Google Pixel 2 (Android 8 Chrome v62) or an iPhone 5 (Webkit v602). Video however does work on both mobile devices.

Can anyone help explain why I can't get audio to work in mobile? Thanks to anyone who looks at this!

Views

252

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

correct answers 1 Correct answer

Community Expert , Dec 08, 2017 Dec 08, 2017

For starters, mobile devices don't respect autoplay because it eats up bandwidth and costs more money for people on limited data plans.    Let people decide for themselves if they want to accept the bandwidth.

Unless I'm missing something, you're trying to invoke both files at the same time???

A better approach is to put audio into your video file so it syncs correctly.

Votes

Translate

Translate
Community Expert ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

For starters, mobile devices don't respect autoplay because it eats up bandwidth and costs more money for people on limited data plans.    Let people decide for themselves if they want to accept the bandwidth.

Unless I'm missing something, you're trying to invoke both files at the same time???

A better approach is to put audio into your video file so it syncs correctly.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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
community guidelines
New Here ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

Thank you for the response.

I'm invoking both files because the audio loop is longer than the video. I'll try using a shorter audio file to see if it works though.

And I know that autoplay is data taxing. Like I said, this is just a project and if I did make it into a site, it would be an artistic site that few people would ever use.

What I wanted to know was is this a problem with Dreamweaver or it's preview. Since I used two different mobile devices, iOS and Android, I didn't think there was a problem with the code. Unless audio autoplay just isn't supported at all on mobile?

Votes

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
community guidelines
Community Expert ,
Dec 08, 2017 Dec 08, 2017

Copy link to clipboard

Copied

LATEST

Autoplay is not going to work on mobiles.

Try it without and see if it works.

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

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