Click here to Skip to main content
16,021,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to play audio files when user clicks on a particular link. I made certain links using . Now when I click on that link I want that music to played.
Posted

JavaScript is the language, find something useful that will allow you to write the JavaScript for the HTML elements (audio or video). In most cases, ready-made plugins are a great solution to those problems. You can get a media player, embed it in your website and it handles everything for you. You don't have to do anything at all, most of them are free of cost and free of royalty also. I would also recommend that you get one of those plugins and use them rather than wasting 2-5 months in writing a new plugin by asking for more code.

This Google search[^] gave like 10+ results for JavaScript plugins (jQuery plugins are built on top of jQuery; which in turn is written on top of JavaScript). You can chose from either one of them, and embed them in your code. Writing a plugin is easy, but needs much more understanding before you can do anything useful. :-)
 
Share this answer
 
Comments
Member 9671810 17-Sep-15 21:44pm    
I have no idea of using jQuery. See upto what I have done is http://www.codeproject.com/Questions/1031104/How-to-get-link-values-store-in-a-variable-and-mak?arn=0

I have made hyperlinks of all the audio file that is stored on that folder. The only thing is I want that audio to played when the user clicks on that particular hyperlink.

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