mirror of
https://github.com/videojs/video.js.git
synced 2026-11-21 08:24:15 +01:00
11 lines
329 B
TypeScript
11 lines
329 B
TypeScript
import type { ChapterTrack } from '../sources';
|
|
|
|
export function renderChapters(tracks: readonly ChapterTrack[]): string {
|
|
return tracks
|
|
.map(
|
|
({ isDefault, label, lang, src }) =>
|
|
`<track kind="chapters" label="${label}" srclang="${lang}" src="${src}"${isDefault ? ' default' : ''} />`
|
|
)
|
|
.join('');
|
|
}
|