| Summary: | AX: Embedded CSS in WebVTT is not considered if vtt file is referenced from playlist | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | shivaksk1 | ||||
| Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | shivaksk1, webkit-bug-importer | ||||
| Priority: | P1 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Mac | ||||||
| OS: | macOS 10.15 | ||||||
| Attachments: |
|
||||||
|
Description
shivaksk1
2020-09-16 19:33:06 PDT
The rendered DOM (Shadow) are as follows:
(As you can notice, the <style> tag is added when WebVTT is included as a <track> element, but missing when WebVTT is embedded in the playlist).
When WebVTT is included as a <track> element:
<div class="media-controls-container">
<div pseudo="-webkit-media-text-track-display" style="position: absolute; unicode-bidi: plaintext; direction: ltr; writing-mode: horizontal-tb; top: 0%; left: 1.3888888888888928%; width: 97.22222222222221%; height: auto; min-width: min-content; max-width: 100%; text-align: center; font-size: 14px; overflow: visible;">
<div pseudo="-webkit-media-text-track-display-backdrop">
<span pseudo="cue" style="overflow: visible;">
<c>New Subtitle. English subtitle 1 -Unforced- (00:00:01.000)</c>
</span>
</div>
<style></style>
<style>::cue { font-family: Arial; font-size: 30px; font-style: normal; font-weight: normal; background-color: green; color: red; text-align: center; }</style>
</div>
</div>
When WebVTT is embedded in the playlist:
<div class="media-controls-container">
<div pseudo="-webkit-media-text-track-display" style="position: absolute; unicode-bidi: plaintext; direction: ltr; writing-mode: horizontal-tb; top: 0%; left: 1.3888888888888928%; width: 97.22222222222221%; height: auto; min-width: min-content; max-width: 100%; text-align: center; font-size: 14px; overflow: visible;">
<div pseudo="-webkit-media-text-track-display-backdrop">
<span pseudo="cue" style="overflow: visible;">
<c>New Subtitle. English subtitle 1 -Unforced- (00:00:01.000)</c>
</span>
</div>
<style></style>
</div>
</div>
|