playing m4a in browser

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

  1. mcgarry
    Expand Collapse
    macrumors 6502a

    mcgarry

    Joined:
    Oct 19, 2004
    #1
    Hi,
    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,

    www.the-optimist.com/music.html

    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 the-optimist.com'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. ChicoWeb
    Expand Collapse
    macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #2
    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. mcgarry
    Expand Collapse
    thread starter macrumors 6502a

    mcgarry

    Joined:
    Oct 19, 2004
    #3
    I host myself-- an old iMac by my desk running 10.2.8 (Apache 1.3.33).
     
  4. ChicoWeb
    Expand Collapse
    macrumors 65816

    ChicoWeb

    Joined:
    Aug 16, 2004
    Location:
    California
    #4
    Then I would imagine you njeed to add this MIME type under httpd.conf file.

    Search for:

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

    Code:
    AddType audio.mp4 .mp4 .m4a .m4p
     
  5. mcgarry
    Expand Collapse
    thread starter macrumors 6502a

    mcgarry

    Joined:
    Oct 19, 2004
    #5
    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. crazzyeddie
    Expand Collapse
    macrumors 68030

    crazzyeddie

    Joined:
    Dec 7, 2002
    Location:
    Florida, USA
    #6
    m4a is mpeg4 audio (what you want to distribute). mp4 is mpeg4 protected, aka iTMS protected music, which is useless to distribute.
     
  7. mcgarry
    Expand Collapse
    thread starter macrumors 6502a

    mcgarry

    Joined:
    Oct 19, 2004
    #7
    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. crazzyeddie
    Expand Collapse
    macrumors 68030

    crazzyeddie

    Joined:
    Dec 7, 2002
    Location:
    Florida, USA
    #8
    Yes, exactly.
     
  9. Brize
    Expand Collapse
    macrumors 6502a

    Brize

    Joined:
    Jun 13, 2004
    Location:
    Europe
    #9
    I'm unsure about this. I thought that protected AAC files had the m4p extension, rather than mp4.
     
  10. rendezvouscp
    Expand Collapse
    macrumors 68000

    Joined:
    Aug 20, 2003
    Location:
    Long Beach, California
    #10
    Brize is correct. Protected AAC (MP4) files are .m4p and unprotected are .m4a, while audiobooks are .m4b. They are all MP4 files.
    -Chase
     
  11. crazzyeddie
    Expand Collapse
    macrumors 68030

    crazzyeddie

    Joined:
    Dec 7, 2002
    Location:
    Florida, USA

Share This Page