Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subtitles not working on video.js #809

Closed
NeoCsatornaja opened this issue Oct 30, 2013 · 10 comments
Closed

Subtitles not working on video.js #809

NeoCsatornaja opened this issue Oct 30, 2013 · 10 comments
Labels

Comments

@NeoCsatornaja
Copy link

I tryed make subtiltes for a video,but not working on the player.
You can see what happen in here:
http://neocsatblog.mblx.hu/embeds/biber.php
My .vtt file place:
http://www.neocsatblog.mblx.hu/embeds/srts/eng/alive.vtt
You see?
Only one thing visible, the loading image...

@mmcc
Copy link
Member

mmcc commented Nov 5, 2013

So the video itself is working fine for me, but I am getting getting an error in the console when I try to activate the subtitles. There are a few minor issues with your WebVTT file, so make sure it passes validations and see if that fixes the issue.

Essentially, this is what your file should look like to be valid:

WEBVTT

00:00:13.000 --> 00:00:16.000
Well, you can tell by the way I use my walk,I'm a woman's man, no time to talk.

@NeoCsatornaja
Copy link
Author

First, thx for the responed!
Well,now the subtitle VAILD but I not see on the video.
Any other idea?

@NeoCsatornaja
Copy link
Author

Hmm.
Sometime work, sometimes not.
This very instabil right?
Once I saw this work, but when I refreshed, the subtilte has gone and never come back!...

@nAtic86
Copy link

nAtic86 commented Nov 13, 2013

well, I ran into problems myself. nothing worked.

out of desparation, i just copied your html, refreshed the links and uploaded it to my server.

guess what? subtitles don't work:

http://dm.golovtchiner.de/media/videojs.html

what am I missing?!

@nAtic86
Copy link

nAtic86 commented Nov 13, 2013

after banging my head against the wall, finaly found the solution:

it does not work, if you embed the player from a remote site.
you need to download it and install it on your own server.

@gkatsev
Copy link
Member

gkatsev commented Nov 13, 2013

it does not work, if you embed the player from a remote site.

Do you mean that you're embedding the player via an iframe from another domain or something? If so, it makes sense, captions need correct CORS headers for that other domain to be able to pick it up.

@nAtic86
Copy link

nAtic86 commented Nov 13, 2013

haha, no. i did the mistake to embed it, like the official site told me to:

by linking those in the head tag
http://vjs.zencdn.net/4.3/video-js.css
http://vjs.zencdn.net/4.3/video.js

@heff
Copy link
Member

heff commented Nov 15, 2013

Subtitles being loaded from another domain is a known limitation. Sorry you had to dig to find that. It used to be called out in the embed builder at least, and needs to be added to the docs.

Loading the player javascript from a remote domain shouldn't be an issue, as long as the subtitles file is on the same domain as the html page it's being loaded into. In your last example that's not the case. The HTML page is golovtchiner.de and the subtitles file is on mblx.hu.

@heff heff closed this as completed Nov 15, 2013
@luc-pitipuis
Copy link

Yes, please update the doc ! I spent two hours trying to understand why the subtitles weren't working, it's because it need to be on the same server serving the html.

@elbrus-alihjiayev
Copy link

I'm very sorry, I have not worked default subtitle

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants