1 Reply
      Latest reply on Feb 24, 2020 8:27 AM by pascal_h
      2040charlesgill Level 1 Level 1 (0 points)

        The WebVTT specification, https://w3c.github.io/webvtt/, mentions that color (and any other formatting) of cue text can be set using the "::cue" CSS extension.

        I tried the simple vtt file:

         

        WEBVTT

         

        ::cue(#first_cue) { color: blue }

         

        X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:0

         

        first_cue

         

        00:00:00.000 --> 00:00:10.000

         

        Allo world!

         

        without any success.

         

        What is the simplest implementation that would allow coloring/formatting of cue text?

        • Re: How to set color of WebVTT subtitle?
          pascal_h Level 1 Level 1 (0 points)

          Hi,

          I am also interested in colors for webvtt.

          I tried such Webvtt file but without color display on Safari:

           

          WEBVTT

           

          STYLE

          ::cue(.cyan){ color: cyan; }

           

          00:00:00:.000 -->00:00:04.000 align:left line:4% position:8%,line-left

          <c.cyan> Test WebVTT with cyan color. </c>

           

          Is color supported for WebVtt subtitles ?

           

          Thanks