使用 ytdb-core 播放视频时获取视频的当前时间戳

Get current timestamp of video while playing it using ytdb-core

我正在使用 ytdb-core npm 模块通过我的 bot 播放流到 discord,我想在播放视频时获取视频时间戳,

我的代码:

let dispatcher = await data.connection.playStream(ytdl(data.queue[0].url, { filter: 'audioonly'} ));

然后我在其他文件中获取调度程序对象,并在视频播放时执行此文件:

console.log(dispatcher.player.streamingData);
// outputs: 

{ channels: 2,
  count: 92,
  sequence: 92,
  timestamp: 88320,
  pausedTime: 200,
  length: 20,
  missed: 0,
  startTime: 1552441690823 }

但我不知道如何将count转换成正常时间格式,当它是5s时,count = 281,这不是毫秒也不是秒

dispatcher.time returns 以毫秒为单位的进度时间