fixed not displaying tc at 0:00:00,000 bug

This commit is contained in:
sanj 2010-06-04 08:55:17 +05:30
parent 639d2bb23c
commit e038b5440d
2 changed files with 555 additions and 557 deletions

View File

@ -38,6 +38,7 @@
} }
function playSubtitles(subtitleElement, opts) { function playSubtitles(subtitleElement, opts) {
var n,i,o,t;
var videoId = opts.id; var videoId = opts.id;
var srt = subtitleElement.text(); var srt = subtitleElement.text();
subtitleElement.html(''); subtitleElement.html('');
@ -58,13 +59,13 @@
for(j=3; j<st.length;j++) for(j=3; j<st.length;j++)
t += '\n'+st[j]; t += '\n'+st[j];
} }
is = toSeconds(i); is = toSeconds(i) == 0 ? 0.1 : toSeconds(i);
os = toSeconds(o); os = toSeconds(o);
subtitles[is] = {i:i, o: o, t: t}; subtitles[is] = {i:i, o: o, t: t};
} }
} }
} }
var currentSubtitle = -1; var currentSubtitle = -1;
var ival = setInterval(function() { var ival = setInterval(function() {

1107
sample.srt

File diff suppressed because it is too large Load Diff