[英]Playing an .m4a audio file in an HTML page doesn't work
I'm trying to play an m4a file on a webpage and it doesn't work.我正在尝试在网页上播放m4a文件,但它不起作用。 I'm using the voice memo app on an iPhone to generate these files.
我正在使用 iPhone 上的语音备忘录应用程序来生成这些文件。
The problem is that all the files that I need to use were generated using the Lossless setting.问题是我需要使用的所有文件都是使用无损设置生成的。
Any ideas???有任何想法吗???
<audio controls>
<source src="fileURL">
<source src="fileURL">
Your browser does not support the audio element.
</audio>
Thank you guys!感谢你们!
The lossless files will most likely be encoded with Apple Lossless .无损文件很可能使用Apple Lossless进行编码。 As the name implies this is the format that Apple software uses to produce lossless files.
顾名思义,这是 Apple 软件用于生成无损文件的格式。 To be sure you could open the files with Quicktime or iTunes to see what codec is used.
确保您可以使用 Quicktime 或 iTunes 打开文件以查看使用的编解码器。
As far as I remember not even Safari for iOS does play Apple Lossless files natively.据我所知,甚至 iOS 的 Safari 都不能原生播放 Apple 无损文件。 If you can't re-encode the files alac.js could be an alternative.
如果您无法重新编码文件alac.js可能是一种替代方法。 It's an Apple Lossless decoder written in JavaScript.
这是用 JavaScript 编写的 Apple 无损解码器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.