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

372
Views
Los métodos `play()` y `togglePlay()` de Spotify iFrame API no funcionan

Spotify iFrame API tiene dos métodos de gestión del estado de reproducción. Estos son play() y togglePlay() . Quiero después de escuchar cualquier disparador, inicializar y reproducir automáticamente el reproductor. Pero estos métodos no funcionan. (el método destory() funciona correctamente).

Mi fragmento de código:

 <script src="https://open.spotify.com/embed-podcast/iframe-api/v1" async></script> <div id="embed-iframe"></div> <script> window.onSpotifyIframeApiReady = (IFrameAPI) => { let element = document.getElementById('embed-iframe'); let options = { uri: 'spotify:episode:7makk4oTQel546B0PZlDM5' }; let callback = (EmbedController) => { document.addEventListener('click', () => { EmbedController.play(); }); }; IFrameAPI.createController(element, options, callback); }; </script>

El fragmento se convirtió en un reproductor de Spotify. Pero mi detector de click se ejecuta y EmbedController.play(); no trabajo.

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!