mp3 issue on WordPress

Posted By on Nov 27, 2015 | 0 comments

A client of mine over at was having issues with an uploaded mp3 on a blog post. The issue is quite a technical post for me so it’s for any fellow WP users out there rather than the average client!

The problem was that the mp3 worked fine on all desktop browsers that I could test and even on my android phone but it had a couple of quirks on iOS.

  1. The duration of the mp3 was shown as NaN:NaN on the embedded player
  2. The mp3 would loop back to the start after approx 2mins 30seconds.

Turns out that the way iOS handles things is slightly different to other browsers and it means it can’t work out how long the mp3 lasts. Now this can be down to 1 of (or probably both of ) 2 reasons

  1. Access-Range – best explained in this post
  2. File redirection – htaccess being used to serve the file up from location X while the browser thinks it’s in location Y

Turns out that because I use a WordPress multisite install it was the latter that was causing the issue. Simply uploading the mp3 to somewhere else via ftp and then taking a note of it’s URL and using that in the blog post fixed the issue!