Closed (fixed)
Project:
AudioField
Version:
6.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2010 at 16:06 UTC
Updated:
3 Apr 2013 at 06:05 UTC
Hi,
I'm working on a project where I'm in serious need of a music player that counts the number of times a song has been played. The only module I've found is Audio module. But it doesn't fit my needs very well.
I'm not very good at PHP so developing a whole module to do the work isn't possible for me. Here's my idea. If there's a way to track when the user presses the play button I could then run some PHP/Java/AJAX code that flags the node containing the mp3 file. Is it possible to track when a user presses the play button!?
MrVictor
Comments
Comment #1
MrVictor commentedOh, by the way. The Audio module uses a menu callback to see if the file is being fetched. Maybe this is a good solution? Would this work with both private and public files?
Another idea I got now. Integration with trigger/actions/rules would be great. Make a trigger when user starts playing song. Isn't that a good idea?
Comment #2
jimajamma commentedDo you want it to count it when the song plays, eg, the user hits the play button, meaning the user started to listen to the song, but who knows how much of it he or she actually listened to.....or when the song finishes, meaning that the user most probably listened to the whole song?
Comment #3
MrVictor commentedWhenever a user hits play. Doesn't matter if the stats are a bit inaccurate.
I've solved it now with an other module and method. I use Mp3player + Flags + jQuery.
1. All players are hidden by jQuery hide().
2. Every player has its own flag link.
3. When user presses the link the player is revealed with jQuery show().
4. Since the mp3player is setup to auto-play, so it does.
5. The flag has been flagged, actually this only show how listeners not plays (great for me).
If there some other way to do this, please share. I've searched all over.
Comment #4
jimajamma commentedThat sure works. You can also load the statistics module and then turn on 'count content views' which will give you an idea of how many people go to the page versus actually playing the audio if that's of use as well.
Comment #5
deviantintegral commentedThis could have also been solved with a custom behaviour attached to the play button. Or even a similar method to #3 but using jPlayer instead.
Comment #7
poonam11210 commentedHi
I am looking for the same functionality That if a user clicked on audio i can change the status as heard message. someone help me resolve this issue. I am using SoundManager2 360 player mp3 and wav file player.