0
votes

After researching many topics and different fourms I feel at a loss. I understand the answer may be simple but i'm just not seeing it. So without further ado here is what i have going on.

I have a locally hosted webpage that currently if loaded in Internet Explorer plays audio files (WAV format) through Windows Media Player Plugin. Being that Internet Explorer has been removed from 98% of our computers I am looking to make this page more accessible to the users. Therefore my idea was to code a HTML5 player using the audio tags directly on to the page. Now comes the tricky part. The audio WAV files are being delivered to the user from a database.

I have been able to get the player to load by using the following

<audio controls="controls" id="player" type="audio/wav">        
Your browser does not support the audio element.
</audio>

and then I modified the code on the audio file to

<span jwcid="@If" condition="ognl:item.recSegment.tape != null">
<button style="border:0px; background-color: transparent;"  onclick="document.getElementById('player').play()"jwcid="@Any" src="ognl:item.recSegment.tape.Url">
<center><img jwcid="@Image" image="asset:play" alt="Play"/></center>
</button>
</span>

After making these changes I opened up chrome and nothing happened. So then I opened up Firefox and when the button is clicked the player controls goes from paused to playing but does not load the file. So for a final try I loaded up Internet Explorer on a laptop and when the button is clicked the player says "Error:An unkown error occurred".

I feel at a loss here and know it is something simple I am missing. Does anybody have any Ideas?

Nick

1
I would convert everything to a .mp3 file, you will save server space and you will be able to play on almost all devices including mobile.cmorrissey
I would love to be able to do that but the software that is encoding it into wave doesn't support mp3. It actually is takeing a McF capture file and transcoding into a wav format with GSM compression.Nick Mcneil

1 Answers

1
votes

Various browsers have differing support for the various codecs. Even though everyone thinks of WAV as just WAV, there are different codecs for that as well as differing bit depths and different browser have varying support for it (Internet Explorer [IE] has no support for WAV).

Firefox won't play .WAV files using the HTML5 <audio> tag?

http://www.w3schools.com/html/html5_audio.asp

According to the Mozilla Developer Network (MDN) the most widely supported formats are MP3 and AAC/MP4: https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats#Browser_compatibility