Acompanhamento da reprodução

  Desculpe, esta página está aguardando tradução para o português

You can monitor the playback progress via the JS API. To do this, enable the Plugins / API / Permissions / Allow the played request option in the PRO version of the builder and then get the progress value with the played request.

player.api("played");

The value will come in percentages, taking into account rewinds and replay. If the user watches 10% of the video and rewinds to the end, the player will return real progress (10).

Another way

You need to enable event tracking in the player settings and catch the time event. This method does not take into account rewinding.

function PlayerjsEvents(event,id,data){
   if(event == "time"){
      let duration = player.api("duration");
      let time = data;
      if(duration > 0){
         if(time / duration > 0.5){
            // 50%
         }
      }
   }
}

19.10.26
2024 © PlayerJS

Iniciar sessão

Iniciar sessão

Inscrever-se gratuitamente

Inscrever-se
Ao inscrever-se, o utilizador concorda com Termos de Serviço
Login se tiver uma conta

Restaurar a palavra-passe

Restaurar
Esqueceu-se do e-mail? Contacte-nos