1

I want to add artwork song cover(image) to pushtape player.

This will be shown in the current playing song inside pushtape player block.

The image will be loaded from Image Field in the content type field_image

The module showing the current node title in the block and the module work in soundmanager2 library.

1
  • Based on the demos given, looks like this module cannot do this. Therefore, you would have to patch the module to add this new functionality.
    – No Sssweat
    Dec 9 '16 at 0:50
1

The player uses JS to load the current track title into the pushtape player block based on the audio link for the current track. Basically all the script does is take the inner HTML of the original audio link and copies it to the global player block in .pt-current-track-title. Anything between the audio's link tag will show up as the current track title.

<a href="pt-link" href="audiofile.mp3">Track title</a>

So what you could do is find whatever is generating the .pt-link link markup and add a small img tag next to the track title and upon playback it would get copied to the global pushtape control block when it is the current track.

<a href="pt-link" href="audiofile.mp3"> <img src="artwork-thumb.jpg"> Track title</a>

You might want to add some additional span markup to make it easier to style.

Also if you want to learn more, check out the pushtape-player.js github page for more details about how the script works. The Drupal module is basically just a wrapper for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.