我需要使用音频标签在html5中播放一些音乐。数据是由服务器生成的base64字符串(data:audio / wav; base64,xxxxxx)。 像图像标签一样,据说音频标签也可以使用数据网址,所以我尝试了这个:
<audio controls="controls" autobuffer="autobuffer" autoplay="autoplay"
src="data:audio/midi;base64,TVRoZAAAAAYAAAABAHhNVHJrAAAOigD/Awh1bnRpdGxlZAD/AQRnZ2cKAP9YBAMCGAgA/1kCAAAA/1EDBhqAAP8GBVNldHVwAMBPALAHbgAKQADBTgCxB0QACjoAwgQAsgdVAAp8AJI0VADHBAC3Bz0ACgMAB2AACgwAyCMAuAdSAApABpc0VDaSO1AGlztQNpJAUgaXQFI2kkJaBpdCWjaSQ1YGl0NWMZJCAAVHSgGXQgAFR0IdkjsABUAAAZc7AASSNAABl0AABJJDAAGXNAAFQwAEkjBSBpcwUjaSN04GlzdONpJAVgaXQFY2kkJcBpdCXDaSQ1wGl0NcJ5JHAAVCAAGXRwAFQgAEkkdGBpdHQhOSQAAFNwABl0AABTcACZJDAAAwAAaXQwAAMAAJkjJUBpcyVDaSOUoGlzlKNpI+VgaXPlY2kkBWBpdAVjaSQlYGl0JWJ5JHAAaXRwAJkkAAAEVIBpdAAABFQhiSPgAGlz4ABJI5AABCAAUyAAGXOQAAQgAFMgAJki9UBpcvVDaSOVAGlzlQNpI+VAaXPlQ2kkBUBpdAVDaSQlQGl0JUJ5JFAAaXRQAJkkVGBpdFQAmSPgAGlz4ACZJCAAA5AAVAAAGXQgAAOQAFQAAEki8ABpcvAASSRQAFLVQAQEoAN04Bl0UAAJI8VAWXLVQAQEoAN04BPFQ1kjREBpc0RCeSNwAGlzcACZI3SgaXN0ookjwABpc8AAiSPFQGlzxULZJAAAaXQAADkkJUBpdCVDaSQgAAQ1gGl0IAAENYCZI3AAaXNwATkjQABS0AADwAAZc0AAUtAAA8AAiSL1YBQwABO0YCOUIAPk4Cly9WAUMAAJJFVgGXO0YCOUIAPk4DRVYwkjZKBpc2SimSOQAGlzkAB5I5SAaXOUgwkj4ABpc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ToBlzcABTk6MJI7AAaXOwAAkjtABpc7QCaSPgAGlz4ACpI+SAaXPkg2kkM+BpdDPoElkFMAP5FTAAaQT1otTwAPUVoAkU9aEJc5AAGSOwAGlzsABJI+AAEyAAQ5AAErAACXPgABMgACkkMAA5crAANDAAOQUQAAkU8AD5gfAACQU1oAkVFaAJgffwOSK0YBPlYAMkQBO0oAN0gElytGAT5WADJEATtKADdIIpFRAAmSMgAGlzIAAJFTWgCSMjoGlzI6MZI3AAU3OAGXNwAFNzg2kjk4Bpc5OBiQUwAZkjsABZBWWgCSOz4BlzsABTs+GJFTAA+SPgAGlz4ACZFWWgCSPj4Glz4+CZI3AAaXNwAJkFYAGZI+AAWYHwAAkFhWAJJASACYIX8Blz4ABUBIGJI5AACRVgAGlzkAE5IyAAWRWFYAkjE4AZcyAAUxOCKSOwAGlzsADpI0OgaXNDoskkAABpdAAASSOTwGlzk8GJBYAB5VVgCSPTYGlz02E5I0AAWRWAABlzQAHZFVVgCSQDwGl0A8E5IxAAA9AAWQVQABlz0AADEACZI5AAaXOQAHkisAAkAABJcrAAGYIQAAkFNaAJgjfwGXQAACki9GAUJWADZEAT9KADtIBJcvRgFCVgA2RAE/SgA7SBORVQAYkjYABpc2AACRU1oAkjZIBpc2SDGSOwAFOzwBlzsABTs8MZI7AAU9PAGXOwAFPTwxkj8ABT9AAZc/AAU/QCeSQgAGl0IACZJCRAaXQkSBNpBTAFqRUwAlkj0ABpc9ACKSNgAAPwAGlz8AADYABJJCAAaXQgAMki8ABpcvAB+YIwAA/y8A"/>
但我失败了,什么也没发生。 我搜索了结果并找到了:
Play audio using base64 data in html5
答案中有一个数据网址,我尝试过,播放效果很好。
所以我认为我的base64数据是错误的,但是当我将数据url放入浏览器地址栏时。它是由一些插件播放的!就像下面的表现一样(运行良好但需要使用插件):
<object width="50%" height="50%"type="audio/midi" data="data:audio/midi;base64,TVRoZAAAAAYAAAABAHhNVHJrAAAOigD/Awh1bnRpdGxlZAD/AQRnZ2cKAP9YBAM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WADJEATtKADdIIpFRAAmSMgAGlzIAAJFTWgCSMjoGlzI6MZI3AAU3OAGXNwAFNzg2kjk4Bpc5OBiQUwAZkjsABZBWWgCSOz4BlzsABTs+GJFTAA+SPgAGlz4ACZFWWgCSPj4Glz4+CZI3AAaXNwAJkFYAGZI+AAWYHwAAkFhWAJJASACYIX8Blz4ABUBIGJI5AACRVgAGlzkAE5IyAAWRWFYAkjE4AZcyAAUxOCKSOwAGlzsADpI0OgaXNDoskkAABpdAAASSOTwGlzk8GJBYAB5VVgCSPTYGlz02E5I0AAWRWAABlzQAHZFVVgCSQDwGl0A8E5IxAAA9AAWQVQABlz0AADEACZI5AAaXOQAHkisAAkAABJcrAAGYIQAAkFNaAJgjfwGXQAACki9GAUJWADZEAT9KADtIBJcvRgFCVgA2RAE/SgA7SBORVQAYkjYABpc2AACRU1oAkjZIBpc2SDGSOwAFOzwBlzsABTs8MZI7AAU9PAGXOwAFPTwxkj8ABT9AAZc/AAU/QCeSQgAGl0IACZJCRAaXQkSBNpBTAFqRUwAlkj0ABpc9ACKSNgAAPwAGlz8AADYABJJCAAaXQgAMki8ABpcvAB+YIwAA/y8A"></object>
所以我的问题是:这两种方式有什么区别?
我认为在使用音频标签时可能会包含一些文件头,但我不确定。
我找到了这个人使用标题模板的链接(RIFF&lt; ##&gt; WAVEfmt \ x10 \ x00 \ x00 \ x00 \ x01 \ x00 \ x01 \ x00&lt; ##&gt; &LT; ##&GT; \ X02 \ X00 \ X10 \ x00data&LT; ##&GT;&#34):
Playing audio from data:url google chrome mobile
感谢任何帮助,提前谢谢。
修改 哦,很遗憾发现大多数浏览器不支持audio / midi数据类型,object标签可以播放它,因为插件功能更强大。 我在这里找到了一个midi.js:
答案 0 :(得分:0)
你的mimetype(?)似乎是audio / midi而不是audio / wav。它也取决于浏览器。我使用相同类型的代码,除了我将audio / wav(* .wav)转换为Base64。使用audio / wav和Base64转换(http://www.motobit.com/util/base64-decoder-encoder.asp)数据,我可以播放音频。
HTML5中也无法识别autobuffer,也许这是我测试的VS 2013 Express for web的怪癖。我拿了一个音频文件,扩展名* .wav并将其转换为Base64并将其插入到你的代码中(使用audio / 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/