如何在 PHP 中获取 m4a 音频文件长度
我有一个 php 生成的页面,其中列出了数百个带有音频控件的 m4a 音频文件。
如果我使用 <音频预加载=“元数据” 由于从所有音频文件获取元数据超时,它不会加载所有文件。
如果我使用 <音频预加载=“无” 它加载良好,当我单击“播放”时,它会显示我单击“播放”时没有问题的 m4a 文件的长度(持续时间)。
有没有办法读取 PHP 中 m4a 文件的持续时间,以便我可以显示它?我可以在 php 中获取 mp3 的持续时间,但在任何地方都找不到如何在 PHP 中获取 m4a 音频文件的持续时间
I have a php generated page that lists a few hundred m4a audio files with the audio controls.
If I use
<audio preload="metadata"
it doesn't load all the files due to timeouts getting the meta data from all the audio files.
If I use
<audio preload="none"
it loads fine and when I click play it shows the length (duration) of the m4a file I clicked play on no problem.
Is there a way to read the duration of the m4a file in PHP so I can display that? I can get the duration of an mp3 in php but can't find anywhere how to get the duration of an m4a audio file in PHP
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论