1

I need to play some music in html5 by using audio tag. The data is a base64 string(data:audio/wav;base64,xxxxxx) which is generated by the server. Like image tag,it is said that audio tag can also use the data url,so I tried this:

<audio controls="controls" autobuffer="autobuffer" autoplay="autoplay" 
src="data:audio/midi;base64,TVRoZAAAAAYAAAABAHhNVHJrAAAOigD/Awh1bnRpdGxlZAD/AQRnZ2cKAP9YBAMCGAgA/1kCAAAA/1EDBhqAAP8GBVNldHVwAMBPALAHbgAKQADBTgCxB0QACjoAwgQAsgdVAAp8AJI0VADHBAC3Bz0ACgMAB2AACgwAyCMAuAdSAApABpc0VDaSO1AGlztQNpJAUgaXQFI2kkJaBpdCWjaSQ1YGl0NWMZJCAAVHSgGXQgAFR0IdkjsABUAAAZc7AASSNAABl0AABJJDAAGXNAAFQwAEkjBSBpcwUjaSN04GlzdONpJAVgaXQFY2kkJcBpdCXDaSQ1wGl0NcJ5JHAAVCAAGXRwAFQgAEkkdGBpdHQhOSQAAFNwABl0AABTcACZJDAAAwAAaXQwAAMAAJkjJUBpcyVDaSOUoGlzlKNpI+VgaXPlY2kkBWBpdAVjaSQlYGl0JWJ5JHAAaXRwAJkkAAAEVIBpdAAABFQhiSPgAGlz4ABJI5AABCAAUyAAGXOQAAQgAFMgAJki9UBpcvVDaSOVAGlzlQNpI+VAaXPlQ2kkBUBpdAVDaSQlQGl0JUJ5JFAAaXRQAJkkVGBpdFQAmSPgAGlz4ACZJCAAA5AAVAAAGXQgAAOQAFQAAEki8ABpcvAASSRQAFLVQAQEoAN04Bl0UAAJI8VAWXLVQAQEoAN04BPFQ1kjREBpc0RCeSNwAGlzcACZI3SgaXN0ookjwABpc8AAiSPFQGlzxULZJAAAaXQAADkkJUBpdCVDaSQgAAQ1gGl0IAAENYCZI3AAaXNwATkjQABS0AADwAAZc0AAUtAAA8AAiSL1YBQwABO0YCOUIAPk4Cly9WAUMAAJJFVgGXO0YCOUIAPk4DRVYwkjZKBpc2SimSOQAGlzkAB5I5SAaXOUgwkj4ABpc+AACSPlIGl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MJI7AAaXOwAAkjtABpc7QCaSPgAGlz4ACpI+SAaXPkg2kkM+BpdDPoElkFMAP5FTAAaQT1otTwAPUVoAkU9aEJc5AAGSOwAGlzsABJI+AAEyAAQ5AAErAACXPgABMgACkkMAA5crAANDAAOQUQAAkU8AD5gfAACQU1oAkVFaAJgffwOSK0YBPlYAMkQBO0oAN0gElytGAT5WADJEATtKADdIIpFRAAmSMgAGlzIAAJFTWgCSMjoGlzI6MZI3AAU3OAGXNwAFNzg2kjk4Bpc5OBiQUwAZkjsABZBWWgCSOz4BlzsABTs+GJFTAA+SPgAGlz4ACZFWWgCSPj4Glz4+CZI3AAaXNwAJkFYAGZI+AAWYHwAAkFhWAJJASACYIX8Blz4ABUBIGJI5AACRVgAGlzkAE5IyAAWRWFYAkjE4AZcyAAUxOCKSOwAGlzsADpI0OgaXNDoskkAABpdAAASSOTwGlzk8GJBYAB5VVgCSPTYGlz02E5I0AAWRWAABlzQAHZFVVgCSQDwGl0A8E5IxAAA9AAWQVQABlz0AADEACZI5AAaXOQAHkisAAkAABJcrAAGYIQAAkFNaAJgjfwGXQAACki9GAUJWADZEAT9KADtIBJcvRgFCVgA2RAE/SgA7SBORVQAYkjYABpc2AACRU1oAkjZIBpc2SDGSOwAFOzwBlzsABTs8MZI7AAU9PAGXOwAFPTwxkj8ABT9AAZc/AAU/QCeSQgAGl0IACZJCRAaXQkSBNpBTAFqRUwAlkj0ABpc9ACKSNgAAPwAGlz8AADYABJJCAAaXQgAMki8ABpcvAB+YIwAA/y8A"/>

But I failed,nothing happened. I searched for the result and find this:

Play audio using base64 data in html5

There is a data url in the answer and I tried it,it played well.

So I think my base64 data is wrong,but when I put the data url into the browser address bar.It is played by some plugin!!Just the same performance like below(worked well but need to use a plugin):

<object width="50%" height="50%"type="audio/midi" data="data:audio/midi;base64,TVRoZAAAAAYAAAABAHhNVHJrAAAOigD/Awh1bnRpdGxlZAD/AQRnZ2cKAP9YBAMCGAgA/1kCAAAA/1EDBhqAAP8GBVNld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TWgCSMjoGlzI6MZI3AAU3OAGXNwAFNzg2kjk4Bpc5OBiQUwAZkjsABZBWWgCSOz4BlzsABTs+GJFTAA+SPgAGlz4ACZFWWgCSPj4Glz4+CZI3AAaXNwAJkFYAGZI+AAWYHwAAkFhWAJJASACYIX8Blz4ABUBIGJI5AACRVgAGlzkAE5IyAAWRWFYAkjE4AZcyAAUxOCKSOwAGlzsADpI0OgaXNDoskkAABpdAAASSOTwGlzk8GJBYAB5VVgCSPTYGlz02E5I0AAWRWAABlzQAHZFVVgCSQDwGl0A8E5IxAAA9AAWQVQABlz0AADEACZI5AAaXOQAHkisAAkAABJcrAAGYIQAAkFNaAJgjfwGXQAACki9GAUJWADZEAT9KADtIBJcvRgFCVgA2RAE/SgA7SBORVQAYkjYABpc2AACRU1oAkjZIBpc2SDGSOwAFOzwBlzsABTs8MZI7AAU9PAGXOwAFPTwxkj8ABT9AAZc/AAU/QCeSQgAGl0IACZJCRAaXQkSBNpBTAFqRUwAlkj0ABpc9ACKSNgAAPwAGlz8AADYABJJCAAaXQgAMki8ABpcvAB+YIwAA/y8A"></object>

So my question is: what is the difference between the two ways?

I think there maybe some file header that should be contained when using audio tag,but I am not sure about it.

I find this link where the guy use the header template(RIFF<##>WAVEfmt \x10\x00\x00\x00\x01\x00\x01\x00<##><##>\x02\x00\x10\x00data<##>"):

Playing audio from data:url google chrome mobile

Appreciate for any help,thanks in advance.

EDIT Oh,so sorry to find out that most browsers do not support for the audio/midi data type,the object tag can play it because the plugin is more powerful. And I found a midi.js here:

https://github.com/mudcube/MIDI.js

4

1 回答 1

0

您的 mimetype (?) 似乎是 audio/midi 而不是 audio/wav。它也取决于浏览器。我使用了相同类型的代码,只是我将音频/wav (*.wav) 转换为 Base64。使用音频/wav 和 Base64 转换的(http://www.motobit.com/util/base64-decoder-encoder.asp)数据我可以播放音频。

在 HTML5 中也无法识别自动缓冲,这可能是我测试的 VS 2013 Express for web 的怪癖。我拿了一个扩展名为 *.wav 的音频文件并将其转换为 Base64 并将其插入您的代码(使用音频/wav),它在 Mozilla Firefox 中播放良好。

以下是 IE 11、Safari 5.1.7 和 Mozilla 26.0 显示带有音频标签的页面的方式:

http://hodentek.blogspot.com/2014/03/internet-explorer-11-cannot-play-audio.html

这是转换为 Base64 并返回的代码: http ://www.aspfree.com/c/a/vb-net/encodingdecoding-web-service-web-service-provider/

于 2014-03-13T04:34:51.483 回答