JS Api for creating a custom view for a tournament draft spectator with a example like the official one used in the competetive scene.
For an example application using this module to create something like the official esports spectator go here
The example client has been moved to a standalone repository, which can be found here
LolEsportsSpectate is installable via:
- GitHub
git clone https://github.com/Litzuck/LoLEsportsSpectate.git
- npm:
npm install lol-esports-spectate
const ChampSelectApi = require('lol-esports-spectate');
const api = new ChampSelectApi();
//start listening for events
api.start()
api.on('championSelectStarted', (data) => {
console.log("champion select started")
gameStarted = true
})
Creates a new ChampSelectApi.
Parameters
- [executablePath] {string} A path to where the LeagueClient executable resides. If not passed it will be automatically figured out from the OS process list.
Starts listening for events of from the LCU.
Sends a request to the specified enpoint of the LCU and calls the given function with the result.
Fired when the champion select started
Fired when its a new players turn
Fired when it a new players turn to ban a champion
Fired when it a new players turn to pick a champion
Fired when a player changed his hovered champion
Fired when it a new players turn to ban a champion
Fired when a champion is locked in.
Fired when the phase of the champion select changed
Fired when the team who's turn it is changed
Fired when a player changed one of this summoner spells