1

I am working with HTML5 video player in webkit, i have one webvtt file and i need to display subtitles in the video, however subtitles are not displayed even though i have specified webvtt file in track element. So can anyone tell me where should i keep digging in webkit so that it can work. Sorry again if my query is not put correctly but that's what i can extract best to put up here.

We are working on Samsung smart TV SDK Emulator which is using webkit on gtk port.

Apps are run from Emulator. Apps provide the subtitle information from index.html file. index file contains the below information.

<video id="player" src="Argentina.mp4" loop=true autoplay controls >
<track kind="subtitles" src="example4.vtt" srclang="en" label="English">
</video>

vtt file looks like

  WEBVTT
Region: id=fred width=50% lines=3 regionanchor=0%,100% viewportanchor=10%,90% scroll=up
Region: id=bill width=50% lines=3 regionanchor=100%,100% viewportanchor=90%,90% scroll=up

00:00:00.000 --> 00:00:20.000 region:fred align:left
<v Fred>Hi, my name is Fred

00:00:02.500 --> 00:00:22.500 region:bill align:right
<v Bill>Hi, I'm Bill

00:00:05.000 --> 00:00:25.000 region:fred align:left
<v Fred>Would you like to get a coffee?

Actually we saw a macro VIDEO_TRACK in HTMLMediaElement.cpp and we enabled it but it does not help.

Actually we tried enabling VIDEO_TRACK using

#define ENABLE_VIDEO_TRACK 1

But it didn't help.

We are seeing below code in HTMLMediaElement

#if ENABLE(VIDEO_TRACK)
    if (RuntimeEnabledFeatures::webkitVideoTrackEnabled() && (m_pendingLoadFlags & TextTrackResource))
        configureTextTracks();
#endif

but it does not execute.

Let me know if you need any more information on my query, and thanks so much again.

Thanks, Vineet.

Brian Campbell
  • 322,767
  • 57
  • 360
  • 340
  • Hi, Vineet, welcome to Stack Overflow! To be able to best help you, it would be good if you could include an example of what you have tried that isn't working; include the video element and a sample of the WebVTT file in your question. Also, WebKit covers a variety of different browsers, which may have different support for WebVTT; could you provide the precise browser and version you're testing against? – Brian Campbell Dec 24 '13 at 16:48
  • Hi Brian,I have added more clarification, please can you see if that helps. Thanks. – Vineet Chaturvedi Jan 21 '14 at 16:54
  • Hi, Vineet. To clarify your question, you should edit the question itself, rather than posting an answer to it. You should also fill out your profile information; right now, you show up as user3132990 in the question and comment but user3134154 in the answer that you posted. I will move the clarification into your question so that it will be in the right place, and ask that the answer you posed be deleted (since it's not actually an answer). I don't think that I can help you on your question itself, I was just trying to give you advice on how to ask it better for people who may be able to help – Brian Campbell Jan 21 '14 at 22:06
  • Thanks Brian, i will try to be more clear and precise from the next time i ask any question. Anyway my problem is resolved now and thanks again for your help. – Vineet Chaturvedi Jan 23 '14 at 18:55

0 Answers0