Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7819043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:46:47+00:00 2026-06-02T06:46:47+00:00

Anyone know for sure if playing local mp3 file using HTML5 is possible or

  • 0

Anyone know for sure if playing local mp3 file using HTML5 is possible or not in Android?
Playing mp3 files from url’s works fine, but not when embedded in the app. Been searching for definitive answer.

Thanks for any help

<html>
<head>
    <title>Audio Player</title>

</head>
<body>
<br /> <br />

     <audio id="player" autoplay loop controls="controls">
    <source src="bassscales.mp3"   />
     </audio>

<br /> <br /> 

<div> 
<button style="width:85;height:75" button onclick="document.getElementById('player').play()">Play</button> 

<button style="width:85;height:75" button onclick="document.getElementById('player').pause()">Pause</button> 

<button style="width:85;height:75" button onclick="document.getElementById('player').pause(); document.getElementById('player').currentTime = 0;">Stop</button>



</div>

</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:46:49+00:00Added an answer on June 2, 2026 at 6:46 am

    I had the same problem with HTML5 and <video> tag, video playing fine if called programatically from file system, but when called from the tag, didn’t work,

    the way I solved it is having a javascript function in the HTML call the android system, in your case for playing an mp3

    Android JavaScriptInterface tutorial

    also check my question in the same subject

    note that you need to place in the correct folder the mp3 [sorry don’t remember in which folder, make a search and find it easy]

    so first do a hello world javascript calling a log or basic function in android,

    then make the javascript call the play function,

    good luck

    ps.
    playing mp3 from assets folder example

    and calling Android methods with javascript
    jsInterface example

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a way to do this? Im sure its been done
Anyone know if it is possible to make the PeriodicalUpdater pass the data it
Anyone know how to read Outlook nickname list file (.NK2)? Any document on how
Anyone know if its possible to enable horizontal scrolling ONLY in a windows forms
Anyone know a good solution for filtering input using jQuery? I'd like to do
Anyone know how to specify a custom record delimiter in a schema.ini file? I
Does anyone know where to download the Visual Studio 2008 SP1 Redistributable? I sure
does anyone know if its possible to serve with cloudfront over https with your
Anyone know of an easy way to parse a Lua datastructure in C# or
Anyone know where i can find a good comparison between the generally accepted Pro's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.