哪裏

2017-08-30 33 views
0

我想表明我的jwplayer腳本的字幕在谷歌驅動器的視頻字幕,但我不知道哪裏是在谷歌字幕的路徑推動視頻哪裏

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

那是我的代碼但字幕不出現,我知道在文件中我必須放置字幕路徑,所以問題是如果有人知道什麼是路徑?

+0

AFAIK,驅動器文件不是分層的,如完整路徑,因爲[單個文件可以有多個parentID](https://stackoverflow.com/questions/41546503/how-to-get-absolute-path-of -a-document-and-file-from-google-drive-using-java-dri#comment70301074_41546503),並且在[論壇]中也有說明(https://productforums.google.com/forum/#!msg/驅動/ h6OkYSrWZp0/cyjdTMZ7x8gJ)。您還可以從鏈接中獲得解決方法,瞭解如何使用自定義代碼獲取完整文件路徑。 –

+0

您也可以按照[幫助頁面](https://support.google.com/drive/answer/1372218?co=GENIE.Platform%3DDesktop&hl=en&oco=1)設置視頻標題軌道。 –

+0

謝謝我的朋友爲你解答... –

回答

0

只需添加這樣../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',

像這樣與我一起工作。