How do I generate an audio player with the URI unique to each record?

Hi, I have unique audio for each record.

I want a unique detail-item from the list to include a javascript-based audio player.

This means that for any given list item (whether in detail or in the aggregate view), there is a player which can play the audio player.

The audio player is custom javascript code.

Has anyone done this?

It seems like there are a few possible implementations:

  1. The entire javascript code is stored into the table as a field in each record. That record is used to fill a custom code block.
  2. The custom code block has the javascript URL. But a variable from a field in the given record can be injected into the code.

But I cannot tell from the docs whether either of these is possible.