How to add subtitles to video in sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 20

How to add subtitles to video in sololearn?

I added subtitle but not showing in sololearn please help me to find Error. below is my code 👇👇 https://code.sololearn.com/W5OJq1b65she/?ref=app

14th Nov 2018, 8:55 AM
Ratnapal Shende
Ratnapal Shende - avatar
7 Answers
+ 11
Muhd Khairul Amirin Bin Yaacob your article is not helpful bro
15th Nov 2018, 3:42 AM
Ratnapal Shende
Ratnapal Shende - avatar
+ 11
Subtitles is clearly showing in iPhone iOS 12.1 then why not showing in Android?
16th Nov 2018, 3:24 AM
Ratnapal Shende
Ratnapal Shende - avatar
+ 5
I expect Muhd was trying to tell you that it's the cross-origin resource sharing that may be an issue here; I expect that may not be something you can fix in the sololearn environment (someone, correct if I'm wrong - I'm pretty new to this environment and don't know its limits yet). Since you are restricted to CSS, JS, and HTML, a workaround that might work would be to inline the VTT file (not optimal, but it gets around the CORS issue). By that, I mean, instead of an http: URL in the src, use a direct data: url. (ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) With your code, that would be: <track kind="subtitles" label="English" srclang="en" default src="data:text/plain;base64,V0VCVlRUCgowCjAwOjAwOjI4LjEw..." /> ... well, I gave it a try but it didn't work. If you save the VTT file in the same place as the HTML file, it loads and displays fine, but there doesn't seem to be a way to make a resource file in the code.sololearn space other than HTML/CSS/JS for a website.
15th Nov 2018, 9:43 AM
Amelia Garripoli
Amelia Garripoli - avatar
- 1
weeeeeeeoooow
16th Nov 2018, 2:54 PM
ayden
ayden - avatar
- 2
lol
16th Nov 2018, 9:07 PM
Death B. Grapes
Death B. Grapes - avatar
- 7
challenge me in HTML
15th Nov 2018, 2:33 PM
Challenge Me
Challenge Me - avatar