Continues playing the animation from its current position. If speed < 0, it will play backwards
from the current position.
323751
@MainThread
  public void resumeAnimation() {
    if (compositionLayer == null) {
      lazyCompositionTasks.add(new LazyCompositionTask() {
        @Override
        public void run(LottieComposition composition) {
          resumeAnimation();
        }
      });
      return;
    }
    animator.resumeAnimation();
  }
512024
public void play() {
        checkState();
        if (mState == STATE_PAUSED) {
            PlaybackService.resume(getContext(), mClientKey);
        } else if (mState == STATE_STOPPED) {
            SoundCloudTrack track = mPlayerPlaylist.getCurrentTrack();
            if (track != null) {
                PlaybackService.play(getContext(), mClientKey, track);
            } else {
                return;
            }
        }
        mState = STATE_PLAYING;
    }
1220584
protected void playSlide(int currentPosition, int previousPosition) {
        final SlideStatus slideStatus = adapter.getSlideStatus(currentPosition);
        final PlayList pl = getPlaylist();

        // Don't play anything if we have reached the end
        if (currentPosition < 0) {
            stop();
            return;
        }

        // Stop anything planned
        slideHandler.removeCallbacksAndMessages(null);

        // If the slide is ready, then we can display it straight away
        switch (slideStatus) {
            case READY:
                notAvailableSlidesSkipped = 0;

                // We are playing the slide show!
                status = Status.PLAYING;

                // Schedule next slide
                if (pl.isAutoAdvanceEnabled()) {
                    slideHandler.postDelayed(moveToNextSlide, pl.getSlideDuration(currentPosition));
                }

                // Display the slide
                displaySlide(currentPosition, previousPosition);

                break;

            case NOT_AVAILABLE:
                Log.w("SlideShowView", "Slide is not available: " + currentPosition);

                // Stop if we have already skipped all slides
                ++notAvailableSlidesSkipped;
                if (notAvailableSlidesSkipped < adapter.getCount()) {
                    prepareSlide(pl.getNextSlide());
                    next();
                } else {
                    Log.w("SlideShowView", "Skipped too many slides in a row. Stopping playback.");
                    stop();
                }
                break;

            case LOADING:
                Log.d("SlideShowView", "Slide is not yet ready, waiting for it: " + currentPosition);

                // Show an indicator to the user
                showProgressIndicator();

                // Start waiting for the slide to be available
                waitForCurrentSlide.startWaiting(currentPosition, previousPosition);

                break;
        }
    }
556201
public void startFlashing(boolean forever, AnimationSpeed speed) {
        Animation fadeIn = new AlphaAnimation(0, 1);

        //set up extra variables
        fadeIn.setDuration(50);
        fadeIn.setRepeatMode(Animation.REVERSE);

        //default repeat count is 0, however if user wants, set it up to be infinite
        fadeIn.setRepeatCount(0);
        if (forever) {
            fadeIn.setRepeatCount(Animation.INFINITE);
        }

        fadeIn.setStartOffset(speed.getFlashDuration());
        startAnimation(fadeIn);
    }
1156168
public boolean next() {
        checkState();
        if (mPlayerPlaylist.isEmpty()) {
            return false;
        }
        PlaybackService.play(getContext(), mClientKey, mPlayerPlaylist.next());
        return true;
    }
310733
private void endAnimation() {
        sAnimations.get().remove(this);
        sPendingAnimations.get().remove(this);
        sDelayedAnims.get().remove(this);
        mPlayingState = STOPPED;
        if (mRunning && mListeners != null) {
            ArrayList<AnimatorListener> tmpListeners =
                    (ArrayList<AnimatorListener>) mListeners.clone();
            int numListeners = tmpListeners.size();
            for (int i = 0; i < numListeners; ++i) {
                tmpListeners.get(i).onAnimationEnd(this);
            }
        }
        mRunning = false;
        mStarted = false;
    }
953598
public function rewind()
	{
		// Set the current position to the first object.
		if (empty($this->objects))
		{
			$this->current = false;
		}
		else
		{
			$keys = $this->keys();
			$this->current = array_shift($keys);
		}
	}
1070760
function(axis) {
				if(!s.backAnimStarted[axis]) {
					s.speedDecelerationRatio[axis] = s.speedDecelerationRatio[axis] * (s.slowDownRatio[axis] + 
												s.slowDownRatioReverse[axis] - 
												s.slowDownRatioReverse[axis] * s.timeDiff / 10);

					s.speedDecelerationRatioAbs[axis] = Math.abs(s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis]);
					s.distanceOffset[axis] = s.lastFlickSpeed[axis] * s.speedDecelerationRatio[axis] * s.timeDiff;
					_panOffset[axis] += s.distanceOffset[axis];

				}
			}
341
void playTransition(@NonNull ViewGroup sceneRoot) {
        mStartValuesList = new ArrayList<TransitionValues>();
        mEndValuesList = new ArrayList<TransitionValues>();
        matchStartAndEnd(mStartValues, mEndValues);

        ArrayMap<Animator, AnimationInfo> runningAnimators = getRunningAnimators();
        synchronized (sRunningAnimators) {
            int numOldAnims = runningAnimators.size();
            Object windowId = ViewUtils.getWindowId(sceneRoot);
            for (int i = numOldAnims - 1; i >= 0; i--) {
                Animator anim = runningAnimators.keyAt(i);
                if (anim != null) {
                    AnimationInfo oldInfo = runningAnimators.get(anim);
                    if (oldInfo != null && oldInfo.view != null && oldInfo.windowId == windowId) {
                        TransitionValues oldValues = oldInfo.values;
                        View oldView = oldInfo.view;
                        TransitionValues startValues = getTransitionValues(oldView, true);
                        TransitionValues endValues = getMatchedTransitionValues(oldView, true);
                        if (startValues == null && endValues == null) {
                            endValues = mEndValues.viewValues.get(oldView);
                        }
                        boolean cancel = (startValues != null || endValues != null) &&
                                oldInfo.transition.isTransitionRequired(oldValues, endValues);
                        if (cancel) {
                            if (anim.isRunning() || AnimatorUtils.isAnimatorStarted(anim)) {
                                if (DBG) {
                                    Log.d(LOG_TAG, "Canceling anim " + anim);
                                }
                                anim.cancel();
                            } else {
                                if (DBG) {
                                    Log.d(LOG_TAG, "removing anim from info list: " + anim);
                                }
                                runningAnimators.remove(anim);
                            }
                        }
                    }
                }
            }
        }

        createAnimators(sceneRoot, mStartValues, mEndValues, mStartValuesList, mEndValuesList);
        runAnimators();
    }
1063610
def stop(self):
        """"""
        if self.state == PygAnimation.PLAYING:
            self.index = 0  # set up for first image in list
            self.elapsed = 0
            self.nIterationsLeft = 0

        elif self.state == PygAnimation.STOPPED:
            pass  # nothing to do

        elif self.state == PygAnimation.PAUSED:
            self.index = 0  # set up for first image in list
            self.elapsed = 0

        self.state = PygAnimation.STOPPED
965767
function() {
        // Compute the amount of play left to go
        t.playLeft = t.playEnd - Date.now();

        // Done playing
        if (t.playLeft <= 0) {
          clearInterval(t.timer);
          t.next();
        }

        // Set the progress bar width
        t.setProgress();
      }
508921
def update(self):
        
        returnValue = False  # typical return value
        if self.state != PygAnimation.PLAYING:
            return returnValue

        # The job here is to figure out the index of the image to show
        # and the matching elapsed time threshold for the current image
        self.elapsed = (time.time() - self.playingStartTime)

        if self.elapsed > self.elapsedStopTime:  # anim finished
            if self.loop:  # restart the animation
                self.playingStartTime = time.time()
                self.nextElapsedThreshold = self.endTimesList[0]
            else:  # not looping
                self.nIterationsLeft = self.nIterationsLeft - 1
                if self.nIterationsLeft == 0:  # done
                    self.state = PygAnimation.STOPPED
                    if self.callBack != None:  # if there is a callBack
                        self.callBack(self.nickname)  # do it
                    returnValue = True  # animation has ended
                else:  # another iteration - start over again
                    self.playingStartTime = time.time()
                    self.nextElapsedThreshold = self.endTimesList[0]
            self.index = 0

        elif self.elapsed > self.nextElapsedThreshold:
            # Time to move on to next picture
            self.index = self.index + 1
            self.nextElapsedThreshold = self.endTimesList[self.index]

        return returnValue
800813
def forward(self, seconds, vx=5):
        
        self.vx = vx
        self.sleep(seconds)
        self.vx = 0
298022
function () {
      if (this.state === 'playing') return;
      if ( this.loading() || this.recording.blank() ) return;

      this.state = 'playing';
      this.controller.connection.protocol = this.playbackProtocol;

      var player = this;

      // prevent the normal controller response while playing
      this.controller.connection.removeAllListeners('frame');
      this.controller.connection.on('frame', function (frame) {
        // resume play when hands are removed:
        if (player.autoPlay && player.state == 'idle' && frame.hands.length == 0) {
          player.play();
        }

        // The default LeapJS callback processes the frame, which is what we do now:
        player.controller.processFrame(frame);
      });

      // Kick off
      this.resetTimers();
      this.recording.readyPlay();
      this.stepFrameLoop();

      this.controller.emit('playback.play', this);
    }
480840
public void previous() {
        final PlayList pl = getPlaylist();

        final int previousPosition = pl.getCurrentSlide();
        pl.previous();
        final int currentPosition = pl.getCurrentSlide();

        playSlide(currentPosition, previousPosition);
    }
588786
private void updateReversing(double extrp)
    {
        current -= speed * extrp;

        // First frame reached, done
        if (Double.compare(current, first) <= 0)
        {
            current = first;

            if (repeat)
            {
                state = AnimState.PLAYING;
                current += 1.0;
            }
            else
            {
                state = AnimState.FINISHED;
            }
        }
    }
582037
function reverseAnimation(name) {
         if (typeof name !== "undefined" && typeof this.anim[name] !== "undefined") {
           this.anim[name].frames.reverse();
         } else {
           this.anim[this.current.name].frames.reverse();
         }

         return this;
       }