Handling reverse playback at EOS event, and restarting rate.

This commit is contained in:
codeanticode
2012-05-11 01:31:38 +00:00
parent ef545eccde
commit ed2a2bc8ff

View File

@@ -830,7 +830,17 @@ public class Movie extends PImage implements PConstants {
protected void eosEvent() {
if (repeat) {
goToBeginning();
if (0 < rate) {
// Playing forward, so we return to the beginning
goToBeginning();
} else {
// Playing backwards, so we go to the end.
goToEnd();
}
// The rate is reset to 1 when restarting the stream, so
// we call frameRate to restart the rate.
frameRate(fps);
} else {
playing = false;
}