NamPNQ / bower-videogular-youtube

Videogular `youtube` plugin repository for distribution on `bower`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to display subtitle?

tuanbs opened this issue · comments

commented

Hi, could you tell me how to display my own subtitle on youtube video. I tried this:

In html file I added: "...vg-tracks="config.tracks"...", and in js file I added:
tracks: [
{
src: $scope.story.subtitleUrl,
kind: "subtitles",
srclang: "en",
label: "English",
default: "default"
}
]
But the subtitle is not shown. Thanks.

Can you provide me a codepen

commented

Hi, I cannot create Codepen account using Facebook.
Basically, I just added the tracks property to load the subtitle and using vg-tracks to show. If you still cannot figure it out, could you please give me a codepen example of using videogular-youtube displaying subtitle? Thanks.

@tuanbs Oops, as i remember, u can not do that, because vgtrack use native subtitle of video tag, and this is a reason it don't work like you want, dicuss with @2fdevs to implement it

commented

Ok. I'll create an issue with @2fdevs . Thanks for your reply.
FYI, this is the codepen: http://codepen.io/tuanbs/pen/oxmwBv