• i have many videos and subtitles, I have uploaded it to a specific fold previously rather than upload in the media center of wordpress.
    in this way, is it possible to display the video and subtitle by a short code? if so , what is the format of the short code? is it possible to enable the subtitles automatically when it play?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    Do your subtitle filenames follow a pattern? You could probably build a script in your video template to automatically generate a shortcode that adds the subtitle track. Here are the shortcode attributes for subtitles:

    track_src="https://www.example.com/subtitles.vtt_.txt" URL of the WebVTT file.
    track_kind=subtitles/captions/chapters
    track_srclang=xx the track’s two-character language code (en, fr, es, etc)
    track_label="Track Label" text that will be shown to the user when selecting the track.
    track_default="true/false" track is enabled by default.

    A sample shortcode:

    [KGVID track_src="https://www.example.com/videos/video1_en.vtt" track_kind="subtitles" track_srclang="en" track_label="English" track_default="true"]https://www.example.com/videos/video1.mp4[/KGVID]

    • This reply was modified 4 years, 7 months ago by Kyle Gilman.
    • This reply was modified 4 years, 7 months ago by Kyle Gilman.
    Thread Starter blessedsan2

    (@blessedsan2)

    Thanks very much, buy this way, it only support one subtitle, am i right?

    Plugin Author Kyle Gilman

    (@kylegilman)

    That’s true, adding multiple text tracks via shortcode isn’t supported. I didn’t see a simple way of implementing it. The media library is really helpful for organizing that kind of thing.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to automatically enable subtitle for pre-uploaded video’ is closed to new replies.