This is my code below in onclick event of button. Attached is the screenshot of the tada.wav file location.
It looks this time I coded properly. But still no success.
var sound = new Audio('/test/tada.wav');
sound.play();
Thanks.
Play a sound file from Rich Display File App
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Play a sound file from Rich Display File App
- Attachments
-
- Capture.JPG (43.7 KiB) Viewed 1117 times
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Play a sound file from Rich Display File App
I don't see anything obvious wrong with what you posted.
What is the error? Have you looked in the browser's developer tools to see what the error is?
What is the error? Have you looked in the browser's developer tools to see what the error is?
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Play a sound file from Rich Display File App
I just looked and found following error message in Console tab:
"MEDIA12899: AUDIO/VIDEO: Unknown MIME type:"
"MEDIA12899: AUDIO/VIDEO: Unknown MIME type:"
-
- Profound User
- Posts: 76
- Joined: Fri Jan 11, 2013 6:11 pm
- First Name: Sean
- Last Name: Tyree
- Company Name: US HealthWorks
- State / Province: California
- Zip / Postal Code: 91355
- Country: United States
- Contact:
Re: Play a sound file from Rich Display File App
According to this page: https://www.w3schools.com/html/html5_audio.asp IE does not support WAV files.
Sean
Sean
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Play a sound file from Rich Display File App
Yes, if you still use Internet Explorer (which Microsoft has discontinued, and wants people to stop using) then you may have to use an MP3 file instead of WAV. But, it should work fine in other browsers.
-
- New User
- Posts: 11
- Joined: Tue Sep 01, 2015 11:24 am
- First Name: Sayed
- Last Name: Mohsen
- Company Name: Astro-Med, Inc.
- Phone: 401-298-8605
- State / Province: Rhode Island
- Country: United States
- Contact:
Re: Play a sound file from Rich Display File App
.MP3 works with both IE and Chrome and .WAV works with Chrome.
Thank you all for your patience and help.
Thank you all for your patience and help.
Who is online
Users browsing this forum: No registered users and 0 guests