I came back again with a very interesting thing this time.
These day I worked a lot with the attachments and realized that if we have any audio/video attachments in org then to see them first we need to download it on local machine and only then we can play with it.
I wanted to build a script which can play attachment in the salesforce itself without asking for download.
Now the question is how this is useful :
I had a voice call with the customer and attached this call with the customer record. Now after some days I want to confirm a point was discussed in the call. So what I need to do :
So here you can see that, there will be 6 step to listen a audio file, while we just wanted to hear the discussion again. These step will be always be repeated whenever we want to listen this conversation.
So if there could be a utility which could play the files in org itself without asking for downloading, that would be better. That's whay I started work on this idea and now here I am.
I have created a visualforce page and embedded this with some JS files, which allow to play the audio files on the same screen. This shows a player only with the audio file in the same row. Check it here:
http://enable-portal-developer-edition.na8.force.com/apex/PlayMP3?id=00QC000001Oqr4J
This page can be added as inline Visualforce page with any object which supports attachments.Like :
I have created a Un-managed package for this. So you can modify this as per your requirement.
Here is the URL:
https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04tC0000000YZvS
Please comment if any modification can be done to make it better.
Regards,
Bhawani
These day I worked a lot with the attachments and realized that if we have any audio/video attachments in org then to see them first we need to download it on local machine and only then we can play with it.
I wanted to build a script which can play attachment in the salesforce itself without asking for download.
Now the question is how this is useful :
I had a voice call with the customer and attached this call with the customer record. Now after some days I want to confirm a point was discussed in the call. So what I need to do :
- Go to the customer record.
- Click on the attachment.
- Download the attachment.
- Save on local disk.
- Play audio.
- Delete file once audio done to escape from the unnecessary storage on machine.
So here you can see that, there will be 6 step to listen a audio file, while we just wanted to hear the discussion again. These step will be always be repeated whenever we want to listen this conversation.
So if there could be a utility which could play the files in org itself without asking for downloading, that would be better. That's whay I started work on this idea and now here I am.
I have created a visualforce page and embedded this with some JS files, which allow to play the audio files on the same screen. This shows a player only with the audio file in the same row. Check it here:
http://enable-portal-developer-edition.na8.force.com/apex/PlayMP3?id=00QC000001Oqr4J
This page can be added as inline Visualforce page with any object which supports attachments.Like :
I have created a Un-managed package for this. So you can modify this as per your requirement.
Here is the URL:
https://login.salesforce.com/?startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04tC0000000YZvS
Please comment if any modification can be done to make it better.
Regards,
Bhawani
Thanks for this Bhawani. A really nice post. Now I can get rid of the process of first downloading the attachment and then listening to it.
ReplyDeleteGreat Post Bhawani. I am trying to do something similar. My audio files are not stored as attachments, but are retrieved through an APEX CallOut to a .NET web service. The web service sends the audio blob as a base64binary (its a byte array that gets serialized like this). The helper controller class retrieves this string and displays in VF page byte-for-byte correct. The problem comes when I try to play this content by using a mime type of audio/wav in the VF page. At that time the player does not decode the blob properly. I have tried doing a base 64 decode to convert the string to a blob before rendering, but it does not help.
ReplyDeleteAny ideas on how I can handle this?
Thanks,
Maneesh
did you get any input on this..Please help me.i need to do the same in Video
Deletenice post. but do you have a static resource for media/movie player?
ReplyDeleteThis comment has been removed by the author.
ReplyDelete@Eugene: Yes, player is stored as static resource.
ReplyDeletethanks bhavi. i mean, what you used here is a audio player, it can only play sound files. what if i want to play a video? do you have a file other than a audio player that will allow me to play video attachments?it would really help alot. thank you
ReplyDeletei'm trying to find a swf player similar to your player.swf. but i want it to also play videos. thanks in advance
ReplyDeleteHi,
ReplyDeleteI have install this app in my org. It's really a nice app.
But this app is not supported all audio formats,it's work only for .mp3 format.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteI've tried posting my contribution to the blog, the video player. No success, so, email me if you want it.
ReplyDeletecheers.
ps. its complementary to this great install.
Wonderful blog & good post.Its really helpful for me, awaiting for more new post. Keep Blogging!
ReplyDeleteSalesforce Administrator Training in Chennai
I have installed the package and what I am doing is i attached a file under notes and attachements related list (mp3). I still dont have the inline play button
ReplyDeleteYou should change the url of the document in the visualforce page , replace this Url ("https://c.na9.content.force.com/") with your current org url.
DeleteI like this example. How would I modify it to play audio from a custom object rather than the lead object? Can it play wav files, or just mp3?
ReplyDeleteThank you so much for this post. When I demo www.LearningApache.com to people, they fall into ecstasy, and say things like, "I didn't even know you could do something like this." And then they ask for more volume. Is there a way to pass a volume parameter into the player ?
ReplyDeleteHi Eric, Definitely there should a one. I need to dig into this again as I wrote this blog years ago.
DeleteYou can reach me on "bhawani.sh.sharma@gmail.com" directly.
DeleteThanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing.
ReplyDeleteSalesforce training in Chennai
Hi Bhavi thanks for sharing this.
ReplyDeleteBut it is not supported in mozilla firefox can u send me any suggestions for dis.
This app can't be installed.
ReplyDeleteThere are problems that prevent this package from being installed.
Method does not exist or incorrect signature: Test.startTest() PlayAudio: Method does not exist or incorrect signature: Test.startTest()
Apex class 'PlayAudio' does not exist PlayMP3: Apex class 'PlayAudio' does not exist
What value do you really bring that benefits your market in ways that your competitors wouldn’t dream of proposing?
ReplyDelete<a href="http://www.appshark.com/salesforce-services/>salesforce services in Dallas</a>
i am getting below error help me
ReplyDeleteMethod does not exist or incorrect signature: void startTest() from the type TEST PlayAudio: Method does not exist or incorrect signature: void startTest() from the type TEST
Method does not exist or incorrect signature: void stopTest() from the type TEST PlayAudio: Method does not exist or incorrect signature: void stopTest() from the type TEST
Apex class 'PlayAudio' does not exist
I am getting this error:
ReplyDeleteInvalid conversion from runtime type Case to Lead
An unexpected error has occurred. Your development organization has been notified.
Still having probleMs getting the inline player to show I've corrected the URL
ReplyDeleteThis information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.
ReplyDeleteLearn more about:
salesforce communities solutions
salesforce to salesforce migration
global rollout consulting services
salesforce service cloud solution
izmir
ReplyDeleteErzurum
Diyarbakır
Tekirdağ
Ankara
DR1X
DDA3A
ReplyDeletepharmacy steroids
boldenone for sale
order primobolan
Kırklareli Evden Eve Nakliyat
deca durabolin for sale
testosterone propionat for sale
testosterone propionat
Çerkezköy Cam Balkon
buy halotestin
D2D05
ReplyDeleteerzurum sesli sohbet
denizli yabancı görüntülü sohbet
hakkari kadınlarla ücretsiz sohbet
erzurum sesli sohbet odası
mobil sohbet
antep canlı ücretsiz sohbet
bingöl en iyi rastgele görüntülü sohbet
kütahya görüntülü sohbet yabancı
batman kadınlarla sohbet et