Viewing HTML5 video with captions offline

前端 未结 2 1076
情书的邮戳
情书的邮戳 2021-01-03 08:08

I am trying to implement an HTML5 video player for viewing local videos using a local HTML file, and I would like to have VTT captions and subtitles capability.

I am

2条回答
  •  感动是毒
    2021-01-03 08:53

    Long story short, you're pretty much SOL unless you either a) put the VTT files on a public server with cross-origin headers, or b) add a simple web server to your project to serve the files.

    If you want to make this work offline and not monkey with Chrome flags, option B is probably your best bet. It would require an installation of some kind, but there are countless ways to set up a simple webserver across platforms.

提交回复
热议问题