- From: Silvia Pfeiffer <silviapfeiffer1@gmail.com>
- Date: Wed, 27 Feb 2013 11:18:02 +1100
- To: GIDEON ISAAC <mad.gideon.isaac@hotmail.com>
- Cc: w3 html5 forum <public-html@w3.org>
- Message-ID: <CAHp8n2=QvXkK71CGvVk+yDKztyQFd-v=KUDud2AsC1ga+C-K=Q@mail.gmail.com>
For displaying subtitles with audio files, add the audio resource to a <video> tag and the subtitles inside it in a <track> tag. The audio element has no visual display, so it can't display subtitles. I don't know how you managed to get Opera to display subtitles from <track> below the video, but that sounds like a Opera bug. On Wed, Feb 27, 2013 at 2:58 AM, GIDEON ISAAC <mad.gideon.isaac@hotmail.com>wrote: > I notice when using opera to show videos, that the subtitles in the > text-track sometimes don't appear on the video at all, but in the webpage > beneath the video. I didn't check if this is just true of very large > subtitles, or all the time. But it would be a good idea to have this for > audio too. So if an audio has subtitles, you obviously can't display those > subtitles on top of the audio, but they would appear beneath the audio > slider on the webpage. > > There are other ways to accomplish this, for instance I could use: > > myTextTrack.addEventListener('cuechange', function() { > > var cue = this.activeCues[0]; > > document.getElementById('fillmessage').innerHTML = > cue.text ; > } > > but the problem with this is that it currently doesn't work correctly with > google chrome, the only browser that worked with the javascript api of the > three I tested. In chome, I believe it works with the very first cue of a > series, but not with the next ones, at least under the intervals that I > used. > > That sounds like browser bugs. Do register bugs on browser where it doesn't work. Remember to provide full examples of what doesn't work - what you have provided here can't be used to replicate the bug. You should add at least the HTML markup that you're using. Regards, Silvia.
Received on Wednesday, 27 February 2013 00:18:50 UTC