mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 06:31:20 -08:00
8 lines
298 B
TypeScript
8 lines
298 B
TypeScript
import type { Thumbnail } from './types'
|
|
import parseVtt from './parseVtt'
|
|
|
|
// Preserve the historical source helper while registration owns its requests.
|
|
export default async function getVttArray(vttUrl = ''): Promise<Thumbnail[]> {
|
|
return parseVtt(await (await fetch(vttUrl)).text(), vttUrl)
|
|
}
|