You need to sign in to do that
Don't have an account?

audio for a visualforce page
Hi, I have the requirement like this. Say I have a Visualforce page which has '<apex:page> This is a new page </apex:page>'. Then I want an audio player on that page which will play this exact statement "This is a new page." Is this possible to be done in Apex? Or through Javascript on Apex? If anyone has done this or know about how it can be implemented, please share the relevant steps and code.
I would suggest vanilla HTML for doing this as per the documentation here:
http://www.w3schools.com/html/html5_audio.asp
In your case, you'd just want the URL to point to a resolveable URL, whether hosted in:
- A static resource
- Some kind of content in Salesforce (attachment, chatter feed, etc.)
- An external URL from a CMS, CDN, or whatever
Given your requirement of playing a single audio file I would use a zip static resource with several different files in it, so you can support as many browsers as possible. You'd then end up with something like this: If it were dynamic, I'd probably bind the src to a field that output some kind URL pointing to the file. My first choice would then use a formula field or some Apex to populate the value. If the dynamic value was not dependent on data in Salesforce, then I'd fall back to Javascript, most likely.