Reproduzir um ficheiro de lista de reprodução específico

  Desculpe, este artigo está disponível em inglês

If the playlist has an id option, you can launch the desired file with the plstart parameter

let player = new Playerjs({id:"player", file:[{...}], plstart:"XXX"});

Or use JS API commands file and play

player.api("play","id:XXX");

Trigger via page address hash

You can also use the hash of the page address (the hash is indicated at the end of the link after the # sign).

Specify a unique identifier for each playlist element

file:[{title:"1", file:"URL", id:"first"},{title:"2", file:"URL", id:"second"},{title:"3", file:"URL", id:"third"}]

Now you can set the launch from the desired file by specifying the id in the hash with the prefix play-

//site.com/video/sample.php#play-second

This hash is to set the playlist to the second file.

The player must be directly inserted on the page, not loaded into an iframe (in this case, the frame link is used). Changing the hash does not change the starting file without reloading the page.


20.0.0
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