Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

409
Views
¿Por qué mi reproductor reproduce las canciones solo (wavesurfer.js)?

Quiero mostrar las ondas de sonido de mi reproductor de música todo el tiempo, pero cada vez que lo intento, la música se reproduce sola.

aquí hay una parte de mi código, estoy usando lib wavsurfer.js

pd: estoy llamando a la función generateWaveform en ngOnInit para que aparezcan las ondas de sonido cuando se inicia la aplicación

 new Promise((resolve): void => { this.wave = WaveSurfer.create({ container: '#waveform', waveColor: this.artist.primaryColor, progressColor: 'dark', height: 16, }); this.wave.on('ready', () => { this.wave.play(); }); this.cd.detectChanges(); this.wave.load(this.music); resolve(null); }); } onPreviewPressed(): void { this.changeButton('play'); if (!this.wave) { this.generateWaveform(); } this.cd.detectChanges(); this.wave.load(this.music); new Promise((resolve, reject) => this.wave.load(this.music)); } changeButton(chave: String) { setTimeout(() => { if (chave === 'play') { this.handlePlay(); } else { this.handlePause(); } }, 100); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!