1

I am looking for a method to add Closed Captioning to an HTML audio only tag. I am currently using the <track> tag, but it does not provide a caption box.

  <div id="audioCenter">
        <audio controls>
            <source src="~/Training/Compliance/ar/10165676.mp3" type="audio/mpeg">
            <track kind="captions" label="English SubTitles" src="~/Training/Compliance/ar/10165676.mp3" srclang="en" />
            Your browser does not support the audio element.
            </audio>
        <p style="color:white">This Section Has been Selected from Lesson 1 section 1 to allow the Test Taker to sample the audio</p>
    </div>
Scott Marcus
  • 64,069
  • 6
  • 49
  • 71
Joshua
  • 311
  • 1
  • 3
  • 19
  • See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio – Scott Marcus Dec 08 '16 at 19:59
  • Did you manage to add CC to – lviggiani Oct 16 '20 at 09:50

1 Answers1

3

The <track> element src should point to a .vtt file, not .mp3. See also this Answer at Alternative for checking browser idle

Community
  • 1
  • 1
guest271314
  • 1
  • 15
  • 104
  • 177