Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

120
Vistas
Unpause video when tab is switched for m.youtube

The Problem

I am trying to create a userscript to unpause the video when I change the tab to listen to music etc because, whenever I change the tab the video pauses itself on m.youtube.com (mobile version of youtube)

I have tried to look around the web to find any possible solutions like turning off browser flags but none of it seems to work.


Current Code

document.addEventListener("visibilitychange", event => {
  if (document.visibilityState == "visible") {
    console.log("tab is active")
  } else {
    var ytplayer = document.getElementById("movie_player"); // get youtube player
    ytplayer.playVideo(); // play it when tab inactive
  }
})

Userscript extension: Tampermonkey
Browser: Brave
Site: https://m.youtube.com (Click here to access mobile YouTube on desktop)

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda