This repository has been archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Adding functionality in order to pull captions from Universal Subtitles... #29
Open
anvk
wants to merge
69
commits into
cgiffard:master
Choose a base branch
from
anvk:jsonCrossDomainCallback
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…k to the video when the page resizes, among other things.
Moved the generateTranscript function out of the library, because it's a user function and not part of the standard. Renamed the constants in the TextTrack class so they can be used outside of the class. Added another html page to experiment with the IDL of TextTrack. Added @default and @id attributes to the <track> element.
…pha! Email me the bugs.
…ably more to come.
…n left off - Fixes cgiffard#16
… a saner structure. As yet untested.
…r now supports SRT, SUB, SBV, and WebVTT parsing.
…for a clean bill of health.
…ck mode in the DOM, fixed some readme stuff
…es using cross domain asynchronous calls by retrieving JSONP and then converting it to the supported WebVTT format. This feature keeps video captions up-to-date using captionator with your video plus it does not require having caption files on the server. Usage: As example a caption track could be provided with src="http://www.universalsubtitles.org/api/1.0/subtitles/?video_url=http://www.youtube.com/watch?v=kmk43_2dtn0&language=en" or src="http://www.universalsubtitles.org/api/1.0/subtitles/?video_url=http://www.youtube.com/watch?v=kmk43_2dtn0&language=fr" or any other language and type="jsonp/webvtt".
… Also modified getJSONP function.
Sorry it's taken me so long to get to this! I really like the idea of specifying a JSONP resource via src. That said, I've always tried to make Captionator as standards-y as I can, so I might have to massage this a bit in order to make it fit. I'm having a look at how it'll fit into 0.6 too, since I've re-architected it a bit. |
// Generate a random callback function name | ||
var callbackName = "json"+(Math.random()*100).toString().replace(/\./g,""); | ||
// Attach the function to the global namespace | ||
window[callbackName]= function(data){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether it'd be possible to namespace this into the captionator object somehow.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
...using cross domain asynchronous calls by retrieving JSONP and then converting it to the supported WebVTT format.
This feature keeps video captions up-to-date using captionator with your video plus it does not require having caption files on the server.
Usage:
As example a caption track could be provided with src="http://www.universalsubtitles.org/api/1.0/subtitles/?video_url=http://www.youtube.com/watch?v=kmk43_2dtn0&language=en" or src="http://www.universalsubtitles.org/api/1.0/subtitles/?video_url=http://www.youtube.com/watch?v=kmk43_2dtn0&language=fr" or any other language and type="jsonp/webvtt".