3 Replies Latest reply on Oct 24, 2008 9:34 AM by stormstudios

    Read ID3 of external MP3

    pl!
      Hi,

      Currently I'm working on a MP3 Player. I start loading the MP3 using the Sound.loadSound(URL, true) method.
      In the Sound.onID3 event, I try to read the Tags using Sound.id3.TALB.

      Now I run a test with 2 files. The first one is on localhost, the second one is on an external server.
      Starting the player out of the flash development environment (STRG+SHIFT+ENTER), I get the album ID3 for each file.
      Running the player as an embedded SWF on a HTML site (running on localhost), I get the album ID3 for the file saved on localhost but not for the external one. I can play it and read it's duration and total bytes, though.
        • 1. Re: Read ID3 of external MP3
          stormstudios
          Have you uploaded the .SWF and .HTML onto the same domain name server as the MP3 or are you still testing from localhost with a file external to that? I was confused.
          • 2. Re: Read ID3 of external MP3
            pl! Level 1
            SWF and HTML are on localhost (same server).

            Testcase 1 is the MP3 on the same server. Here, I get the ID3 Tags.
            Testcase 2 is the MP3 on another domain without getting ID3s.
            • 3. Re: Read ID3 of external MP3
              stormstudios Level 1
              search crossdomain.xml and add that file (edited to fit your domains) to the domain where your MP3 file is.

              Flash definitely cannot access data across domains under the new security models so you require a crossdomain.xml which allows your domain to pull data from that server. My guess is the sound comes through because Flash is allowed to access a music stream cross domain. Data definitely not. It's kind of confusing for sure what the difference is, but data cannot be accessed for sure.