简体   繁体   English

从 Hls.js 流中丢弃特定时间之前的音频

[英]Discard audio before certain time from Hls.js stream

I am using Hls.js to live stream an audio feed into an audio element in my HTML.我正在使用 Hls.js 将音频馈送实时流式传输到我的 HTML 中的音频元素中。 In my custom audio controls I limit the user to only be able to scroll back to the most recent five minutes of audio in the stream.在我的自定义音频控件中,我将用户限制为只能滚动回流中最近五分钟的音频。 However the audio for any time beyond the most recent five minutes still exists.但是,最近五分钟之后的任何时间的音频仍然存在。

Is there any way to discard/trim the audio source beyond the most recent five minutes?有没有办法在最近五分钟之后丢弃/修剪音频源? Given i only care about the most recent five minutes of audio and the livestream could be constantly playing for multiple hours on end, what is the best method discard any of the unneeded audio from the source?鉴于我只关心最近五分钟的音频,并且直播可能会连续播放多个小时,那么最好的方法是从源中丢弃任何不需要的音频?

Thanks!谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM