Counterpart Files

Why Add Counterparts?

Counterpart files are totally optional, the plugin doesn’t force you to use them, you can supply some, all, or none for any player.

A counterpart (or fallback format) is an additional copy of your audio track but in a different file format. In other words it means you provide two separate files for each track in a playlist. The reason for doing this is to give alternatives to any browsers/devices that have limited audio support, it basically increases the chances that your visitors will be able to successfully play your audio.
 

Manually Adding Counterparts

Use the parameter counterpart in your shortcode and specify a url to your counterpart file, eg:

[mp3j track="myfile.m4a" counterpart="http://example.com/mycounterpart.webm"]

The same works for playlist players, just separate your counterpart urls with a comma ,.

You can use any mix of formats for any track and counterpart.
 

Automatic Counterparting

With the ‘Auto-Counterpart’ option ticked on the settings page the plugin will automatically look for counterpart files for you. It will do this whenever you use a file from the MPEG family in a playlist, that’s files ending with any of the following extensions: .mp3 .mp4 .m4a

There are 2 things to remember:

1) Put your counterparts in the same location as your MPEGs –

Meaning if you use the Media Library then upload your counterparts to the library, if you use ftp and folders then put the counterparts in the same folder as the MPEGs (this works for FEEDs too).

2) Give them the same names as the MPEGs –

So if an MPEG file is called octopus.m4a and you have an .ogg counterpart for it, then the ogg file should be named octopus.ogg

Your counterpart formats can be any of the following extensions: .ogg .oga .webm .webma .wav but it’s recommended to stick to .ogg or .oga.

If you only have some counterparts, that’s fine, you can just upload the ones you have.



Posted in Help Articles.



Copyright © 2017 MP3-jPlayer, Simon Ward, Matt Jones, Jack Dale.