Click here to Skip to main content
15,889,853 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to develop a web application which converts dss and ds2 files programmatically an d play those converted audio files in all browsers i tried a lot but i could not do it as i am new to this can anyone help me out.

Below is the way which i tried but it is not working in chrome browser.What i did here is i had downloaded switch sound software from NCH Software and converted dss and ds2 files to .wav format.After conversion i need to place those wav files in a folder in my application and i had given the path in this works it works only in firefox browser but not in chrome browser.This is the code that i used.how can i do this such that the files should get played in all browsers

This is the first way i tried
ASP.NET
//$("#audio").attr("autoplay", true);
//document.getElementById("audio").play();//to play
//document.getElementById("audio").pause();//to pause

window.onload = function () { document.getElementById("audio").play(); }
window.addEventListener("load", function () { document.getElementById("audio").play(); });



<%-- <audio src="Sounds/DPM317.wav" controls="controls" autoplay="autoplay">--%>
<%-- <audio src="Sounds/DS250069new.wav" controls="controls" autoplay="autoplay">

<audio controls="">
<source src="Sounds/DPM317.wav" type="audio/wav" />
Your browser does not support the audio element.

--%>

<audio id="audio" controls="" autoplay="">
<source src="Sounds/DPM317.wav" type="audio/wav" />

Your browser does not support the audio element.

This is the second way i tried
ASP.NET
<title>

function PlaySound(soundobj) {
var thissound = document.getElementById(soundobj);
thissound.play();
}

function PauseSound(soundobj) {
var thissound = document.getElementById(soundobj);
thissound.pause();
}

<audio id="audio1" controls="controls" preload="auto" src="Sounds/DPM317.wav" type="audio/wav">

<audio id="audio2" controls="controls" preload="auto" src="Sounds/DS250069new.wav" type="audio/wav">
/pre>
But none of them are working in chrome browser can anyone help me out as iam new to this<

What I have tried:

i tried the above codes which i had posted but none of them are working
Posted
Updated 30-Oct-16 6:04am
v2

1 solution

You're missing script tags, closing TITLE tags - a bunch of stuff.

Make the HTML well-formed and try again.
 
Share this answer
 
Comments
Member 12324523 31-Oct-16 1:08am    
i had done but still they are not working can i know if it worked for you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900