Play a sound file from Rich Display File App

Use this board to ask questions or have discussions with other Rich Displays users.
smohsen
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

Post by smohsen »

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.
Attachments
Capture.JPG
Capture.JPG (43.7 KiB) Viewed 1117 times
Scott Klement
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

Post by Scott Klement »

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

Post by smohsen »

I just looked and found following error message in Console tab:
"MEDIA12899: AUDIO/VIDEO: Unknown MIME type:"
SeanTyree
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

Post by SeanTyree »

According to this page: https://www.w3schools.com/html/html5_audio.asp IE does not support WAV files.

Sean
Scott Klement
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

Post by Scott Klement »

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

Post by smohsen »

.MP3 works with both IE and Chrome and .WAV works with Chrome.
Thank you all for your patience and help.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests