Audio Content Overview
Table of Contents
Pugpig Bolt comes with a feature rich, built in, native audio player. The player can invoke for audio shown on the timeline and inside an article and includes the ability to download and play tracks offline, manage a playlist and much more.
How to get audio into the app
There are many ways to include audio in the app. These are:
- Manually create a Pugpig Audio Card to show tracks on the timeline. You can either add an audio file or point to an external one. Note that article cards can also play audio from the timeline (any card with audio_meta_data)
- Create Audio Cards from RSS feeds - for example many of the podcast providers such as aCast or iTunes provide compatible feeds (this can play both external files or import files into the Media Library)
- Automatically create audio versions of your articles using our Amazon Polly feature
- Include inline links to audio files inside your content - we will automatically detect these and include the ability to play them with the player in the app. These will always be hosted externally - we do not try to import them into the media library.
- Add audio to standard articles, either via the CMS or a feed.
Audio ID3 Meta Data
We will use the metadata includes in the MP3 file to extract the information to be displayed in the audio player. We use the ID3 metadata - you can examine your files using a tool like https://tagmp3.net/
We use the following tags:
Required: title
Optional: subtitle, artist, image
If your audio file does not contain this data, we will show the name of the MP3 file, which will not look as good as the title metadata would.
Bandwidth Usage
Any audio served from an external URL will not count towards your bandwidth allocation. In most cases, we will also only stream audio, not download it in advance. You can read more about this in the article about bandwidth and data usage.
Pugpig Audio Javascript Bridge
On content pages, we supply Javascript which will invoke the native player on iOS and Android. On Web this is ignored - we use the built in HMTL5 audio player.
- For Polly, we need a special Plugin (called Text To Speech). This is because the audio file will not exist in Express, and may not even exist. The audio URL ends up in a meta field. This plugin will add the Javascript/audio markup for Polly elements to play inline.
- For Inline audio, we automatically add a script to every article that has audio
window.addEventListener("DOMContentLoaded", setupPugpigAudio)
Markup for inline audio
We are quite flexible and should detect any standard audio elements.