track element in html5 video player

469 views Asked by At

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.

0

There are 0 answers