move optional/tutorial stuff to Extras
This commit is contained in:
parent
ac9c537c3c
commit
8c86c40edf
2 changed files with 0 additions and 0 deletions
51
src/main/plugins/Extras/examplePlugin.ts
Normal file
51
src/main/plugins/Extras/examplePlugin.ts
Normal file
|
@ -0,0 +1,51 @@
|
|||
let i = 1, k = 1;
|
||||
export default class ExamplePlugin {
|
||||
|
||||
/**
|
||||
* Base Plugin Details (Eventually implemented into a GUI in settings)
|
||||
*/
|
||||
public name: string = 'examplePlugin';
|
||||
public description: string = 'Example plugin';
|
||||
public version: string = '1.0.0';
|
||||
public author: string = 'Example author';
|
||||
|
||||
/**
|
||||
* Runs on plugin load (Currently run on application start)
|
||||
*/
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on app ready
|
||||
*/
|
||||
onReady(): void {
|
||||
console.log('Example plugin ready');
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on app stop
|
||||
*/
|
||||
onBeforeQuit(): void {
|
||||
console.log('Example plugin stopped');
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on playback State Change
|
||||
* @param attributes Music Attributes (attributes.state = current state)
|
||||
*/
|
||||
onPlaybackStateDidChange(attributes: object): void {
|
||||
console.log('onPlaybackStateDidChange has been called ' + i +' times');
|
||||
i++
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on song change
|
||||
* @param attributes Music Attributes
|
||||
*/
|
||||
onNowPlayingItemDidChange(attributes: object): void {
|
||||
console.log('onNowPlayingDidChange has been called ' + k +' times');
|
||||
k++
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue