* Stop the current animation or video and reset it to the first frame * (paused). (Use Sprite#pause instead to freeze in place.) * @returns {Sprite} Reference to this object for method chaining
()
| 446 | * @returns {Sprite} Reference to this object for method chaining |
| 447 | */ |
| 448 | stop() { |
| 449 | this.animationpause = true; |
| 450 | if (this.isVideo) { |
| 451 | // clear the frame-anim timer/hold flags too (parity with the legacy |
| 452 | // unconditional reset), then rewind the video |
| 453 | this._frameAnim.resetTimer(); |
| 454 | this.image.pause(); |
| 455 | this.image.currentTime = 0; |
| 456 | } else { |
| 457 | // rewind the frame animation to its first frame |
| 458 | this._frameAnim.rewind(); |
| 459 | } |
| 460 | return this; |
| 461 | } |
| 462 | |
| 463 | /** |
| 464 | * make the object flicker |
nothing calls this directly
no test coverage detected