Media Manager has a restful service where you can retrieve content as JSON.
It is possible to completely bypass having Media Manager send you an outlet, and instead grab the JSON, and render the markup yourself.
assume a distribution url
json. So you get
In that json, you want to look at
assetContainers.assets.renditionGroups. You'll see a fully qualified url to the raw asset there.
- Reads the url and switches it to json
- Does an ajax request to get the data
- After getting the data, finds the raw audio file
- Creates an
<audio> element and adds the url to it
I don't have a perfect example, but a few years back I made a jQuery plugin for video outlets in Media Manager: https://github.com/paceaux/Media-Manager-Plugins-for-Tridion (demo of it here: https://jsfiddle.net/Paceaux/ubbzo87t/ ). It follows the exact steps I outlined, except it feeds the source into a
<video> and a
I also wrote a blog post that highlights these high-level details of the jQuery plugin. I think you could follow these steps to make a plugin of your own.
I had never thought to make it work for audio, but I'd certainly welcome a pull request!