0

I have a simple challenge I can't quite seem to make any progress on:

Get the current track (or video) playing and display a link to a transcript of the song.

This should be a simple task (and the solution might very well be simple).

I'm using the default media player for Wordpress.

Options I've thought of so far:

  1. Hooks. I don't see any I could use, yet there's a million other hooks for everything else. For example, use a filter hook when the current title changes, grab the current title, display the link underneath the title. This would be the preferrable method as I could simply name the transcript files the same.

  2. Jquery. Use some sort of change event for the current track element and display a transcript link of the same name. Couldn't get this to work.

  3. Custom Media Fields. Add the URL into a custom field for each media element. A more manual process, but I'd be OK with this. But this kind of relies on getting the PHP/Javascript correct which I've had trouble with (see above).

Any help is appreciated.

0

I did end up figuring this out and went with 2)

To keep it simple for content creators I told them to make sure the name of the transcript the same name for the pdf. When a new song comes in a playlist, I grab the text from the current track playing, parse the string with Wordpress file name URL rewriting (such as " " reverts to "-" I believe; this is an older question of mine), tack on ".pdf", check if it exists, and then if so add an anchor to the PDF below the current title track. Upon click, it opens a modal with the transcript (that was also built with jQuery).

Quite nice as it does also load the the next song's transcript into the modal if the modal is up and the the current song ends.

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.