Add Video With Srt-file - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

Add Video With Srt-file

Alexander Schuch

Alexander Schuch

SP Page Builder 1 year ago

Hi, using J5 and latest SPPB5. I would like to build up a video tutorial section. Videos shall be supported with sub-titles. So I have uploaded a video on a test page, also added the srt-file for sub-titles to the folder.

How can I automatically show the subtitles from srt-file, or let the user decide, if the subtitles shall be shown, or not. Any solution for that in SPPB?

Thank you.

0
3 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #143595

Hi Alexander,

Sorry, not yet, but make research maybe there is ready HTML5 code for that you can use inside Raw Html addon.

yes, later you can share here.

0
Alexander Schuch
Alexander Schuch
Accepted Answer
1 year ago #143625

Hi Frank, I did some research and came up with following responsive solution, which fits my needs, but should be usable for all:

<video controls width=100% height=auto>

    <!-- Video source -->
    <source type="video/mp4" src="/videos/examplevideo.mp4">

    <!-- Subtitles -->
    <track src="/videos/examplevideo_DE.vtt" label="Deutsch" kind="subtitles" srclang="de" default>
    <track src="/videos/examplevideo_EN.vtt" label="English" kind="subtitles" srclang="en" >

    <!-- Fallback content -->
    Your browser does not support HTML5 video. Here is a <a href="/videos/examplevideo.mp4">link to the video</a> instead.

</video>

Hope that also helps other users!

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 1 year ago #143633

Yes, good to know, but to be honest you're first person with that request.

I think we can implement that in Video addon one day, useful also for Accessibility purposes.

BIG THANKS / DANKE :)

0