[英]How to merge multiple m4a or audio files and attach it to audio tag, and show the time on controller correctly
<audio id="audio" controls>
<source src="Countdown.m4a" type="audio/x-m4a">
Your browser does not support the audio element.
</audio>
This is the html element, I want to repeat "Countdown.m4a" three times, and as "Countdown.m4a" is 5 mins longer, the controller slider should show 15 mins instead of 5 mins.这是 html 元素,我想重复“Countdown.m4a”三次,由于“Countdown.m4a”长 5 分钟,controller slider 应该显示 15 分钟而不是 5 分钟。
How to achieve this?如何做到这一点?
tried using, but not able to modify control slider length.尝试使用,但无法修改控件 slider 的长度。 Tried finding how we can merge the files using js, but nothing I could find online.
试图找到我们如何使用 js 合并文件,但我在网上找不到任何东西。
Because all a/v media is inherently more complex and involved than it seems (meaning concatenating media is more problematic than you might think for a whole bunch of reasons), your best bet would be to concatenate sound by doing all your work server side, where you can leverage command line apps like ffmpeg.因为所有的 a/v 媒体本质上都比看起来更复杂和复杂(意味着连接媒体比你想象的更成问题,原因有很多),你最好的选择是通过在服务器端完成所有工作来连接声音,您可以在其中使用命令行应用程序,例如 ffmpeg。
That said, check this out: https://mitya.uk/articles/concatenating-audio-pure-javascript , which has a refreshingly thorough client side approach.也就是说,请查看: https://mitya.uk/articles/concatenating-audio-pure-javascript ,它具有令人耳目一新的客户端方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.