Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

63
Vistas
JS: Use mediaSession's action handlers if player is embedded in an iframe

I am using Spotify's Web SDK to create a new autdio player in a website. The SDK has support of the Play/Pause event but ignores previoustrack and nexttrack.

I want to grab those actions and do some logic with them. However, because the player is loaded in an Iframe the action handler does not work because in my website there is not actual audio being played.

// this will do nothing
navigator.mediaSession.setActionHandler('nexttrack', function() {}); 

Is there a workaround for this? Thank you!

7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos