vidstack / player

UI components and hooks for building video/audio players on the web. Robust, customizable, and accessible. Modern alternative to JW Player and Video.js.
https://vidstack.io
MIT License
1.9k stars 114 forks source link

SRT Subtitles: End of line and some special syntax not supported #1270

Open Viiprogrammer opened 2 months ago

Viiprogrammer commented 2 months ago

Current Behavior:

\N is not supported {\pos(317,366)} is not supported

image image

Expected Behavior:

\N is supported {\pos(317,366)} is supported

Steps To Reproduce:

Example subs: https://reference.opengram.dev/Trigun.rus.srt Trigun.rus.zip

Code which I use to load srt subs:

const track = new TextTrack({
  src: 'https://reference.opengram.dev/Trigun.rus.srt',
  kind: 'subtitles',
  label: 'Russian',
  language: 'ru-RU',
  type: 'srt',
  default: true
})

$player.value.textTracks.add(track)

https://stackblitz.com/edit/vidstack-examples-b8rzsk?file=src%2FPlayer.vue

Environment: