R
R
rafaelSalihov2020-02-26 12:17:01
Java
rafaelSalihov, 2020-02-26 12:17:01

How to insert external subtitles by playback time?

You need to play the video and subtitles separately from the video below so that when you click on one word in the subtitle, an action occurs.
Like this
2VGEt.jpg

Such a situation, I made an online player using the link

library , since the youtube api did not fit due to a number of reasons.

With the help of this library, I play the video and get the time separately. I was also able to get subtitles from my site, it is being loaded, so I can immediately upload all the subtitles below, but this will not work.

The only problem is now you need to insert subtitles according to the received time, i.e. if it is now 10 seconds at the bottom, subtitles from this time interval should be shown.

I already thought to write a program myself, for example, to split the text file of subtitles into an array, then pull out the times from there in the form of a multi-dimensional array or even an sql database and insert it, the head boils difficult, if I do it for a long time, I’ll do it.
What are the ready-made solutions for such a problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question