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

fix(subs): Avoid removing in-use region elements #4724

Closed

Conversation

david-hm-morgan
Copy link
Contributor

Proposed fix: Closes #4680

Avoid removing region elements from the DOM due to risk of failing to put them back with imminent captions in the same region.

@david-hm-morgan david-hm-morgan changed the title 4680 fix proposed fix 4680 fix proposed Nov 17, 2022
@david-hm-morgan david-hm-morgan changed the title fix 4680 fix proposed fix 4680 avoid removing imminently in use region elements Nov 17, 2022
@david-hm-morgan david-hm-morgan changed the title fix 4680 avoid removing imminently in use region elements fix: 4680 avoid removing imminently in use region elements Nov 17, 2022
@github-actions
Copy link
Contributor

Incremental code coverage: 100.00%

@avelad avelad added type: bug Something isn't working correctly component: TTML The issue involves TTML subtitles specifically component: captions/subtitles The issue involves captions or subtitles priority: P1 Big impact or workaround impractical; resolve before feature release labels Nov 17, 2022
@avelad avelad added this to the v4.4 milestone Nov 17, 2022
@joeyparrish joeyparrish changed the title fix: 4680 avoid removing imminently in use region elements fix: Avoid removing imminently in use region elements Nov 17, 2022
@joeyparrish joeyparrish changed the title fix: Avoid removing imminently in use region elements fix(subs): Avoid removing in-use region elements Nov 17, 2022
@@ -280,7 +280,10 @@ shaka.text.UITextDisplayer = class {
for (const element of toUproot) {
// NOTE: Because we uproot shared region elements, too, we might hit an
// element here that has no parent because we've already processed it.
if (element.parentElement) {
// But avoid removing regions here due to risk of missing out
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your change makes the NOTE comment above false.

lib/text/ui_text_displayer.js Show resolved Hide resolved
@david-hm-morgan
Copy link
Contributor Author

alternative solution proposed with #4733

@avelad avelad removed this from the v4.4 milestone Nov 20, 2022
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles component: TTML The issue involves TTML subtitles specifically priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EBU subtitles regression in 4.1.3 - subtitles lost: not added to region
3 participants