Как приостановить воспроизведение аудиофайла в angular 8? - PullRequest
0 голосов
/ 08 мая 2020

playPause(){
    let audio = new Audio();
    if(!this.play){
      this.play = true
      this.playIcon = '../../../assets/icons/icons8-pause-64.png'
      //console.log("playing")
      audio.src = this.songs[1]["songSrc"];
      audio.play();
    }
    else{
      this.play = false
      this.playIcon = '../../../assets/icons/icons8-play-64.png'
      //console.log("pause")
      audio.src = this.songs[1]["songSrc"];
      audio.pause();
    }
  }

audio.pause не работает? Как приостановить воспроизведение звука, который воспроизводится в данный момент.

...