playing m4a in browser

Discussion in 'Web Design and Development (archive)' started by mcgarry, Jan 18, 2005.

  1. macrumors 6502a


    Thanks to some help from here a few weeks ago, I got my sites up and running out of my house. One of them is for my brother, who wanted me to put up some of his self-recorded songs. On the downloads page of that site,

    the mp3 links work fine in every browser, but the one test m4a link I put up returns text output only in Safari (Firefox brings a dialog up and I have not yet tested IE).

    I did create a .htaccess file in's document root, which includes the text

    AddType audio/mpeg mp3
    AddType audio/mp4 m4a

    What am I missing ? (yeah, besides the ability to design a website that doesn't look like crap -- I learned enough html to do the basics back in 1996 and I've never moved beyond)
  2. macrumors 65816


    Could be your host. Some of them don't allow you to write your own MIME types. I had a issue like this with a client and his server. I had to end up hosting the files myself.
  3. macrumors 6502a


    I host myself-- an old iMac by my desk running 10.2.8 (Apache 1.3.33).
  4. macrumors 65816


    Then I would imagine you njeed to add this MIME type under httpd.conf file.

    Search for:

     AddType application/x-tar .tgz'. 
    and after it place:

    AddType audio.mp4 .mp4 .m4a .m4p
  5. macrumors 6502a


    Thanks! that worked. Firefox opens up a player in the browser (right-click will download), and Safari begins a download; either is fine with me. I'll test on a Windows machine when I get a chance, but really I thought this would just be a nice touch for Mac or iTunes users.

    Do I still need the .htaccess file I made?

    Lastly, a note on nomencalture:what is the proper usage of m4a vs. mp4, at least in my application?
  6. macrumors 68030


    m4a is mpeg4 audio (what you want to distribute). mp4 is mpeg4 protected, aka iTMS protected music, which is useless to distribute.
  7. macrumors 6502a


    Thanks, I have not yet purchased anything from iTMS. Do purchased files use the .mp4 suffix, while the files I import into iTunes (as from my brother's CD) get .m4a?
  8. macrumors 68030


    Yes, exactly.
  9. macrumors 6502a


    I'm unsure about this. I thought that protected AAC files had the m4p extension, rather than mp4.
  10. macrumors 68000

    Brize is correct. Protected AAC (MP4) files are .m4p and unprotected are .m4a, while audiobooks are .m4b. They are all MP4 files.
  11. macrumors 68030


    m4p... mp4... You know what i mean :p

Share This Page