Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting from 5.1.4 npm release, assToVtt generates incorrect VTT format #763

Closed
HFO4 opened this issue Jun 2, 2024 · 2 comments
Closed

Comments

@HFO4
Copy link

HFO4 commented Jun 2, 2024

Expected behaviour

assToVtt should generates correct format like below

WEBVTT

1
00:00:00.000 --> 00:00:05.000
This is a test of the ASS format and some basic features in it.

2
00:00:05.000 --> 00:00:07.000
This and the previous line should both show at the bottom of the video in 20 pixel high white Arial with a 2 pixel black outline and 2 pixel offset shadow. This line is long so it should automatically be broken into several lines that are approximately even length, with upper lines being longer.

Actual behaviour

The generated VTT missing End of line \n\n:

WEBVTT 1 00:00:00.000 --> 00:00:05.000 This is a test of the ASS format and some basic features in it.

2 00:00:05.000 --> 00:00:07.000 This and the previous line should both show at the bottom of the video in 20 pixel high white Arial with a 2 pixel black outline and 2 pixel offset shadow. This line is long so it should automatically be broken into several lines that are approximately even length, with upper lines being longer.

The borowser cannot parse such VTT format, so not subtitle shown for ASS files anymore.

Steps to reproduce

You can inspect dist from 5.1.4, the line break \n\n is somehow missing in assToVtt, but it did appears in srtToVtt:
image

Environment

  • Browser:
  • Version: 5.1.4
  • Operating System:
  • Version:

Console errors (if any)

None

Link to where the bug is happening

None

@zhw2590582
Copy link
Owner

Fixed in artplayer@5.1.5

@HFO4
Copy link
Author

HFO4 commented Jun 2, 2024

Comfirm it's fixed. Thanks!

@HFO4 HFO4 closed this as completed Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants