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

367
Vistas
NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission

I have this audio element on my page :

 <audio id="splayer" controls="controls" class="audiocontrol" >
 <source src='{{ baseUrl}}storage/{{src}}' />
 </audio>

    start_audio()
    {  

      var player = <HTMLAudioElement> document.querySelector('#splayer');
      player.load();
      var promise = player.play();


      if (promise !== undefined) {
        promise.then(_ => {
          
        }).catch(error => { console.log('error');
          console.log(error)
        });
      }
    }

This is working on chrome and firefox but getting this error on Safari :

NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission

There is a modal which loads at the initial page load and user clicks on allow button to give permission :

   <button class="btn micallowbtn" data-dismiss="modal">Allow</button>

This works on chrome but getting error on safari.

Any solution to resolve this issue on Safari

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