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

Captions on lesson videos #71

Closed
scowalt opened this issue Feb 12, 2015 · 10 comments · Fixed by #97
Closed

Captions on lesson videos #71

scowalt opened this issue Feb 12, 2015 · 10 comments · Fixed by #97
Assignees

Comments

@scowalt
Copy link
Contributor

scowalt commented Feb 12, 2015

Load captions available in sysassets and show them as the lesson video is playing.

More information to come.

@scowalt
Copy link
Contributor Author

scowalt commented Feb 12, 2015

@neelabhg, could you assign myself and / or @jdtran23 to this issue?

@scowalt scowalt changed the title Subtitles on lesson videos Captions on lesson videos Feb 24, 2015
@scowalt
Copy link
Contributor Author

scowalt commented Feb 24, 2015

Changed all instances of "subtitles" to "captions" per this source

Some implementation details:

  1. Video captions should be written in WebVTT format
  2. Captions will be stored in and loaded from the sysassets project
  3. Captions would (preferably) not appear overlayed on the video. Code examples often take up all of the screen on the videos, and covering any portion of the screen could prevent viewer understanding.
  4. It may be good to have an option to disable captions

Code should also have fault tolerance, so that a video will still play if its captions cannot be found or loaded.

Loading these captions from sysassets will require cross-domain requests to be enabled on sysassets, as describe in #70

@scowalt
Copy link
Contributor Author

scowalt commented Mar 11, 2015

An isolated (but working) prototype of this exists in this repository.

One thing this implementation does well is show the previous and upcoming lines along with the current caption. This helps put the material into better context, which will be especially important when users search for terms and potentially start in the middle of videos.

Before much more progress can be made on this issue, the transcripts need to be added to the sysassets project in the WebVTT format. This is a work in progress.

@scowalt
Copy link
Contributor Author

scowalt commented Mar 16, 2015

There is a poorly-documented method of adding captions (or text tracks) from a remote source in videojs here. There is also at least one library to help add captions to videojs, although I would prefer not to add another dependency to the project.

UPDATE: According to this stackoverflow post, captions can only be added to the videojs player when the player is created, so adding the captions after creation won't work.

UPDATE2: So the method I mentioned before is the correct way to go. Apparently it is poorly document because it is a relatively new addition to videojs. See #85.

@scowalt
Copy link
Contributor Author

scowalt commented Mar 19, 2015

An issue I'm running into now is that getting a remote track with videojs doesn't work with xdomain. (the videojs library expects CORS headers)

I believe this is caused by the fact that videojs implements its own http request module. I may need to make a pull request on videojs or xdomain to fix this issue. I hope that we won't have to use a custom build of either library or do a complicated hack.

@scowalt
Copy link
Contributor Author

scowalt commented Apr 1, 2015

The issue I described in my previous comment has magically disappeared.

The completion of this issue is currently blocked by an issue with sysassets

(EDIT: To clarify, even though completion of this issue is blocked by the sysassets issue, I will still be able to make significant progress using my personal fork of sysassets)

@angrave
Copy link
Contributor

angrave commented Apr 2, 2015

On 4/1/15 3:36 PM, Scott Walters wrote:

The issue I described in my previous comment
#71 (comment)
has magically disappeared.

The completion of this issue is currently blocked by an issue with
sysassets cs-education/sysassets#7


Reply to this email directly or view it on GitHub
#71 (comment).

Re. magically dissappeared -> because we moved sysassets to cs-education ?

@scowalt
Copy link
Contributor Author

scowalt commented Apr 2, 2015

Actually I don't think that was the cause.

Basically, my issue was that the request for the remote caption track (made by videojs) wasn't being routed through xdomain. Thus, I was getting the CORS errors that led us to use xdomain in the first place.

However, today I went to reproduce the error, and this issue was no longer present. The request for the transcripts is now being routed through xdomain as expected.

In both of these instances I was/am testing using my personal fork of sysassets, at http://scowalt.github.io/sysassets, so I don't think the domain switch of sysassets was the cause.

UPDATE: It appears that I'm still getting CORS issues on Chrome, but am not getting CORS issues on Firefox. More investigation to come

@scowalt
Copy link
Contributor Author

scowalt commented Apr 6, 2015

I did a bit of research on using videojs-caption as a library to help with moving the subtitles out of the video player. However, using this library would require us to modify our subtitles out of the WebVTT format and into something less universal.

@angrave
Copy link
Contributor

angrave commented Apr 7, 2015

If you haven't already, you could ask Bob(jren4) how he implemented the subtitles on the system programming videos at http://classtranscribe.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants