Interruptor personalizado

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

You can configure the settings switch (for example, for looping playback) in the player interface. To do this, add a custom element with the SVG switch icon from the library.

As an action you must specify the command to switch a specific setting:

  • looping the file playback api:loop,0/1
  • looping the playlist playback api:playlistloop,0/1
  • autoplay the next file in the playlist api:autonext,0/1
  • random playback api:shuffle,0/1

The same commands can be used for the context menu.

You can see an example of such switches in this template.


How to save settings

You can save the settings on your side, for example, in the database. Just catch the event via JS API that copy the button command. For the autoplay in the playlist, the event will be the same api:autonext,0/1

In the second parameter of the event will come the value (0 or 1). It remains to save it and specify in the player code for the next loadings with the necessary option. autonext:0 for example.


19.12.14
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