Skip to content

Commit

Permalink
VP-192: Tweaked json to send only subtitles to parser and it works
Browse files Browse the repository at this point in the history
  • Loading branch information
heidiv committed Sep 5, 2013
1 parent 6f8f807 commit eed3863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions js/VideoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,8 @@ var fluid_1_5 = fluid_1_5 || {};
// Hard coded URL to amara here
var url = encodeURI("http://www.universalsubtitles.org/api2/partners/videos/?video_url=" + videoUrl + "&callback=?");
$.getJSON(url, function( data ) {
//var captionUrl = encodeURI("http://www.universalsubtitles.org/api2/partners/videos/" + data.objects[0].id + "/languages/" + lang + "/subtitles/?callback=?");
var captionUrl = encodeURI("http://www.universalsubtitles.org/api2/partners/videos/" + data.objects[0].id + "/languages/?callback=?");
$.getJSON(captionUrl, callback );
var captionUrl = encodeURI("http://www.universalsubtitles.org/api2/partners/videos/" + data.objects[0].id + "/languages/" + lang + "/subtitles/?callback=?");
$.getJSON(captionUrl, callback);
});

};
Expand Down
2 changes: 1 addition & 1 deletion js/VideoPlayer_transcript.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ var fluid_1_5 = fluid_1_5 || {};
// Handle Universal Subtitles JSON files for transcripts
if (transcriptSource.type === "text/amarajson") {
fluid.videoPlayer.fetchAmaraJson(transcriptSource.src, transcriptSource.srclang, function (data) {
fluid.videoPlayer.transcript.parseTranscriptFile(that, data, currentIndex, fluid.identity, "text", "start_time", "end_time");
fluid.videoPlayer.transcript.parseTranscriptFile(that, data.subtitles, currentIndex, fluid.identity, "text", "start_time", "end_time");
});
} else {
var opts = {
Expand Down

0 comments on commit eed3863

Please sign in to comment.