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,7 +59,7 @@
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};
} }

View File

@ -1,8 +1,5 @@
0
00:00:01,120 --> 00:00:04,520
1 1
00:00:05,000 --> 00:00:07,440 00:00:00,000 --> 00:00:07,440
In most countries In most countries
on the continent on the continent