How to use the lottie-web.goToAndStop function in lottie-web

To help you get started, we’ve selected a few lottie-web examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magna25 / lottie-editor / src / App.js View on Github external
seekByArrowKeys = (val) => {//seek using arrow keys or clicking on the track
    let currentFrame = this.state.currentFrameTime + val
    lottie.goToAndStop(currentFrame,true)
    if(!this.state.paused){
      lottie.play()
    }
  }
  playPause = () => {
github magna25 / lottie-editor / src / App.js View on Github external
                  <div> {this.setState({paused:true});lottie.goToAndStop(v.time+1,true)}} style={{padding:'5px 0 5px 50px',borderBottom:'1px solid #ddd'}}&gt;  t = {v.time + 1}</div>
                {
github magna25 / lottie-editor / src / App.js View on Github external
seekByMouseClick = (val) => {
    lottie.goToAndStop(val.x,true)
    if(!this.state.paused){
      lottie.play()
    }
  }
  seekByArrowKeys = (val) => {//seek using arrow keys or clicking on the track
github magna25 / lottie-editor / src / App.js View on Github external
playPause = () => {
    if(this.state.currentView != 2) return
    let playButtonState = null
    if(this.state.paused){
      lottie.goToAndStop(this.state.currentFrameTime,true)
      lottie.play()
      playButtonState = false
    }
    else{
      lottie.goToAndStop(this.state.currentFrameTime,true)
      playButtonState = true
    }
    this.setState({paused:playButtonState})
    
  }
  clearAllChanges = () => {