Play counter increment
Opened this issue · 1 comments
4b11b4 commented
line 6 -- pot/pot/templates/music/song_detail.html
For the HTML tag you can specify a js function to run "onended", when the audio play ends.
Then, create the function below. It doesn't need to be above...
now... how to access the model objects from javascript?
zachcalvert commented
This raises a question for me: Do we want to increment the counter only when the audio play ends? I think you could make the argument that it should get incremented the moment someone presses 'Play'. I could be convinced either way, but I think I lean towards incrementing the counter the moment it's played.
Either way, we will need a way to write this back to the db from the browser. This will require AJAX for now, until we move to Vue or React :)