Skip to content

Commit

Permalink
try to make notes synchronized
Browse files Browse the repository at this point in the history
well.. the result is not good
  • Loading branch information
cornguo committed Dec 21, 2013
1 parent 0f20601 commit 316e98d
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions func.devel.js
Expand Up @@ -73,18 +73,30 @@ function sayToken(tokens, keys, pos) {
urls: genPath(keys[pos+1]),
}).unload();
}
if ('+' === keys[pos][0]) {
setTimeout(function() {
if (pos+1 < keys.length) {
sayToken(tokens, keys, pos+1);
} else {
tokens.removeClass('talking');
playing = false;
}
}, 250);
}
},
onloaderror: function() {
if (pos+1 < keys.length) {
sayToken(tokens, keys, pos+1);
}
},
onend: function() {
if (pos+1 < keys.length) {
sayToken(tokens, keys, pos+1);
} else {
tokens.removeClass('talking');
playing = false;
if ('+' !== keys[pos][0]) {
if (pos+1 < keys.length) {
sayToken(tokens, keys, pos+1);
} else {
tokens.removeClass('talking');
playing = false;
}
}
this.unload();
}
Expand Down

0 comments on commit 316e98d

Please sign in to comment.