mirror of
https://github.com/processing/processing4.git
synced 2026-01-30 03:41:15 +01:00
Handling reverse playback at EOS event, and restarting rate.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user