In need to devleop a web application to play all kinds of audio files.This should be developed in such a that i had a file uploader with browse option to browse the audio file and upload option .when i click upload button i need to display the audio file name,audio file with play,pause and stop,and download button which allows the user to download the audio file to my application folder in gridview and save the audio file in database. In additon to this i need to play the audio files through keyboard that is without clicking on play,pause and stop using mouse the user should be able to play them using keyboard i had tried the code which is present in the below link that is my exact requirement but using that i am able to play only .mp3 files but i need to play other kinds of audio files also.Along with that i need to play them using keyboard can you please tell me how can i do this.
http://www.aspsnippets.com/Articles/Save-MP3-Audio-Files-to-database-and-display-in-ASPNet-GridView-with-Play-and-Download-option.aspx
Atul KumarPosted May 23, 2016, 3:20 AM
TestPosted May 23, 2016, 2:23 AM
<head runat="server">
<script>
//forward the music about 5 seconds
$("sample.mp3").prop("currentTime", $("sample.mp3").prop("currentTime") + 5);
//backward the music about 5 seconds
$("sample.mp3").prop("currentTime", $("sample.mp3").prop("currentTime") - 5);
</script>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<audio src="http://www.html.am/resources/sample.mp3" controls>
<p>If your browser doesn't support the 'audio' element, it will display the content here between the opening and closing tags.</p>
</audio>
</div>
</form>
</body>
</html>
using this code i am able to play pause and stop audio files through keyboard but when i am forwarding and back warding that is when i am using left and right buttons it is being forwarded and back warded by 15 sec but i need to do it for 5 or 10 seconds how can i do this
Atul KumarPosted May 3, 2016, 8:16 AM
$(document).on("keydown", function (e) { if (e.ctrlKey && e.altKey && e.which == 77) alert("Alt+Ctrl + M"); //Activate your button here });