Is there anyway to get ID3 metadata from an MP3 or Vorbis comments from Ogg via the HTML5 audio element?

前端 未结 1 1206
春和景丽
春和景丽 2021-01-01 06:39

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

相关标签:
1条回答
  • 2021-01-01 06:57

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

    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.

    0 讨论(0)
提交回复
热议问题