Javascript 是否要比getByteTimeDomainData()提前几秒钟获得结果?

Javascript 是否要比getByteTimeDomainData()提前几秒钟获得结果?,javascript,html,html5-audio,audio-streaming,web-audio-api,Javascript,Html,Html5 Audio,Audio Streaming,Web Audio Api,在Youtube播放器中使用。 它返回当前波形。 我想知道是否有可能得到未来时刻的波形 用法示例: const audioCtx = new AudioContext(); const videoSrc = audioCtx.createMediaElementSource(video); // Youtube video const analyser = audioCtx.createAnalyser(); videoSrc.connect(analyser); const dataArray

在Youtube播放器中使用。 它返回当前波形。 我想知道是否有可能得到未来时刻的波形

用法示例:

const audioCtx = new AudioContext();
const videoSrc = audioCtx.createMediaElementSource(video); // Youtube video
const analyser = audioCtx.createAnalyser();
videoSrc.connect(analyser);
const dataArray = new Uint8Array(analyser.fftSize); // Uint8Array should be the same length as the fftSize 
analyser.getByteTimeDomainData(dataArray); // fill the Uint8Array with data returned from getByteTimeDomainData()
getByteTimeDomainData
-复制
dataArray
中的当前波形。 如何在不更改Youtube
video.currentTime
的情况下获取未来波形