0

I'm trying to show the subtitles on my jwplayer script but I don't know where are the path of the subtitles on google drive videos

tracks: [{ 
            file: "/assets/captions-en.vtt", 
            label: "Latino",
            kind: "captions",
            "default": true 
        },{ 
            file: "/assets/captions-fr.vtt", 
            kind: "captions",
            label: "Subtitulado"
        }],
primary: 'html5',

That is my code but the subtitles don't appear, I know that in file I have to put the subtitle path, so the question is if someone knows what is the path?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • AFAIK, Drive files are not hierarchical such as full path because a [single file can have a multiple parentID](https://stackoverflow.com/questions/41546503/how-to-get-absolute-path-of-a-document-and-file-from-google-drive-using-java-dri#comment70301074_41546503) and it is also stated in this [forum](https://productforums.google.com/forum/#!msg/drive/h6OkYSrWZp0/cyjdTMZ7x8gJ). You can also get a solution from the link on how to get the full file path using custom code. – Mr.Rebot Aug 31 '17 at 18:05
  • You can also set the video caption tracks by following this [help page](https://support.google.com/drive/answer/1372218?co=GENIE.Platform%3DDesktop&hl=en&oco=1). – Mr.Rebot Aug 31 '17 at 18:05
  • Thank you my friend for you answers... – Christian Abata Sep 01 '17 at 12:53

1 Answers1

0

just add like this ../assets/captions-en.vtt

tracks: [{ 
            file: "../assets/captions-en.vtt", 
            label: "Latino",
            kind: "captions",
            "default": true 
        },{ 
            file: "../assets/captions-fr.vtt", 
            kind: "captions",
            label: "Subtitulado"
        }],
primary: 'html5',

Like this is working with me.