反正有经由HTML5音频元素的MP3或的Ogg Vorbis的意见得到ID3元数据? [英] Is there anyway to get ID3 metadata from an MP3 or Vorbis comments from Ogg via the HTML5 audio element?

查看:234
本文介绍了反正有经由HTML5音频元素的MP3或的Ogg Vorbis的意见得到ID3元数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mozilla开发者中心的HTML5媒体指南描述了所谓的音频和视频内容的事件等待load​​edmetadata。反正是有获取文件的元数据?我写的HTML5扩展谷歌Chrome和我不知道是什么的音频文件的元数据,我创建一个球员提前。

Mozilla Developer Center's HTML5 media guide describes an event for audio and video elements called "loadedmetadata". Is there anyway to get the metadata for files? I am writing an HTML5 extension for Google Chrome and I don't know what the metadata for the audio files I'm creating a player for beforehand.

编辑:这个问题似乎被踢每个人的屁股。 :/

This question seems to be kicking everyone's ass. :/

推荐答案

据的这个你可以使用 filereader.readAsBinaryString(文件); 来得到ID3标签的二进制数据

According to this you can use filereader.readAsBinaryString(file); to get the binary data of the ID3 tag.

filereader.readAsBinaryString(文件);将异步地通过在范围[0..255]的整数psented每个字节重新$ P $返回一个二进制串。这是一个文件的数据的二进制操作非常有用,例如,寻找ID3标签的MP3文件,或寻找EXIF数据中的JPEG图像。

filereader.readAsBinaryString(file); will asynchronously return a binary string with each byte represented by an integer in the range [0..255]. This is useful for binary manipulations of a file’s data, for example to look for ID3 tags in an MP3 file, or to look for EXIF data in a JPEG image.

这篇关于反正有经由HTML5音频元素的MP3或的Ogg Vorbis的意见得到ID3元数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆