The flash-sound class loads MP3 files in different domains and obtains ID3 information.

Source: Internet
Author: User
Tags id3

Previously, we were working on an MP3 player for others, which was always used to load MP3 files from other domains. We all used sound. load method. The first parameter of this method is an MP3 address request, and the second parameter is something we usually ignore, the ID3 information can be output in the local test, but the MP3 files in different domains can be read on the server, and thus the ID3 information cannot be output at all, and then the file is searched in 9ria, it is found that the cross-origin policy file is accessed. First, the domain must have a cross-origin policy file, and second, sound. the second parameter of the load method, soundloadercontext, must be set to new soundloadercontext (1000, true). True is very important, because "specifies whether the Flash Player should be before loading the sound, download the cross-origin policy file from the server where the sound is loaded ". therefore, after this parameter is added, it is found that ID3 information is successfully read ~ Haha ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.