简体   繁体   English

加载ID3标签而不在AS3中加载声音

[英]Loading ID3 tags without loading sound in AS3

有没有一种方法可以在不加载声音的情况下在AS3中加载ID3标签?

well you can simply start loading the sound, with bufferTime = 0, and when the id3 data is available, you just close the stream. 好了,您可以简单地以bufferTime = 0开始加载声音,并且当id3数据可用时,您只需关闭流即可。

or, if the sound is distributed through a server, then the server could read out the ID3 and provide an API to get it. 或者,如果声音是通过服务器分发的,则服务器可以读出ID3并提供API来获取它。

Well using AS3 to read the ID3 Tags is probably not the way to go. 使用AS3读取ID3标签可能不是走的路。 You can of course use PHP, C#, Python or any other language to read the ID3 tags out of an MP3. 当然,您可以使用PHP,C#,Python或任何其他语言从MP3中读取ID3标签。

For instance you can have a PHP Script "id3Reader.php?file=mymp3.php" and will return an XML containing all the ID3 info, then you can parse that in AS3 which is rather quick. 例如,您可以拥有一个PHP脚本“ id3Reader.php?file = mymp3.php”,并返回一个包含所有ID3信息的XML,然后您可以在AS3中对其进行解析,这相当快。 I recommend using caching in the PHP part or probably having a data store like mysql so you don't have to be reading the id3 tag over an over. 我建议在PHP部分中使用缓存,或者建议使用类似mysql的数据存储区,这样您就不必遍历读取id3标记。 Although PHP is a rotten language it does its job and for this kind of task it does it well. 尽管PHP是一种烂语言,但它确实可以完成工作,并且对于这种任务,它也可以很好地完成工作。

Reading ID3 with PHP 用PHP读取ID3

http://php.net/manual/en/ref.id3.php http://php.net/manual/en/ref.id3.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM