differentiate between pausing and stopping an audio track

When seek(-1) is called, it signals the track finished.
Howl.pause() would keep track of the current position, so when the skottie would loop, it would play the end of the audio file instead of starting from the beginning.

Change-Id: I756a8ea15af071d2f9d4e13d60260495316f411c
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/372582
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
diff --git a/skottie/modules/audio.js b/skottie/modules/audio.js
index 110129f..b9ace89 100644
--- a/skottie/modules/audio.js
+++ b/skottie/modules/audio.js
@@ -18,7 +18,7 @@
   };
   this.pause = function() {
     for(const player of this.map.values()) {
-      player.seek(-1);
+      player.pause();
     }
   }
   this.setVolume = function(v) {
@@ -41,6 +41,12 @@
     src: [source],
     preload: true
   });
+  this.pause = function() {
+    if(this.playing) {
+      this.howl.pause();
+      this.playing = false
+    }
+  }
   this.seek = function(t) {
     if (!this.playing && t >=0) {
       this.howl.play();
@@ -49,7 +55,7 @@
 
     if (this.playing) {
       if (t < 0) {
-        this.howl.pause();
+        this.howl.stop();
         this.playing = false;
       } else {
         const playerPos = this.howl.seek();