当我使用AVPlayer在联机mp3文件上寻求特定的timestamp时,它将从该特定的时间戳中拉出缓冲区以进行播放。
我不想下载整个mp3文件,而是要访问音频文件特定段的缓冲区(例如startTime 1:30到endTime 2:00)并将其转换为base64编码的字符串。有办法吗?
//e.g. This should a load a buffer of the audio binary from 10s onwards
// How would I access the buffer of this audio file from lets say 10s - 20s?
let item = AVPlayerItem(Url: "https://audiofile.com/abc.mp3"
let player = AVPlayer(item: item)
player.seek(to: CMTime(seconds: 10, preferredTimeScale:1))