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

feat: do not output cues that started before the segment #1535

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SebastienChauvin
Copy link

@SebastienChauvin SebastienChauvin commented Jul 17, 2024

Chromecast shakaplayer does not de-duplicate cues in HLS.

This fixes it by only outputing cues that start during the segment.

From my understanding (and some testing), the subtitles will not disappear early on segment change in normal playback if they are not duplicated in all segments. The only ill effect I can think of is that the cue will not appear on seek in some cases. But this is not a common use case, so a much less visible impact than duplicated segments.

For example with 8s segments, segment 2 will be from 00:08:00 to 00:16:00

Before:

s-1-f7.vtt

WEBVTT

1
00:00:00.120 --> 00:00:4.120
Dies ist ein Text auf Türkisch

2
00:00:07.320 --> 00:00:09.920
* Roter Hintergrund *

s-2-f7.vtt

WEBVTT

2
00:00:07.320 --> 00:00:09.920
* Roter Hintergrund *

3
00:00:10.120 --> 00:00:12.120
Dies ist ein Text auf Türkisch

After:

s-1-f7.vtt

WEBVTT

1
00:00:00.120 --> 00:00:4.120
Dies ist ein Text auf Türkisch

2
00:00:07.320 --> 00:00:09.920
* Roter Hintergrund *

s-2-f7.vtt

WEBVTT

3
00:00:10.120 --> 00:00:12.120
Dies ist ein Text auf Türkisch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant