getPath(path: string) - Returns path used by Cider by name.
srcPath - src/ folder
rendererPath - renderer/ folder
mainPath - main/ path
resourcePath - resources/ path
i18nPath - i18n/ path
ciderCache - Cider cache path
themes - Themes
plugins - Plugins
getLocale(language: string, key: string)
Fetches the i18n locale for the given language.
getStoreValue(key: string)
Gets a store value
getStore()
Returns store
setStoreValue(key: string, value: any)
Sets a store value
getWindow()
Gets the renderer window
loadJSFrontend(path: string)
Loads a JavaScript file into the renderer, this is the main method of loading front end plugins.
playback. - Controls playback
.play() - Play
.pause() - Pause
.playPause() - Toggles playback
.next() - Next track in queue
.previous() - Previous track in queue
Built in events
Cider plugins support these methods by default, however more can be made with the use of ipcMain and ipcRenderer
onReady(win) - (Required) Executes when the back end is ready
onRendererReady() - Executes when the renderer has finished loading (app.init())
onPlaybackStateDidChange(attributes) - Executes when playback state changes, passes song attributes
onNowPlayingItemDidChange(attributes) - Executes when song changes, passes song attributes
onBeforeQuit - Executes before Cider quits
Cider Frontend API (CiderFrontAPI)
App Functions/Methods (app.*)
Cider Audio (CiderAudio)
Function/Method
Usage
Details
Function/Method
Usage
Details
Function/Method
Usage
Details
StyleSheets.Add
AddMenuEntry
Objects.MenuEntry
Creating a Basic Plugin
Unsorted Features
Unsorted Quirks and Features.
These are some unsorted quirks and features about Cider that will be moved later
Cider is built with the following frameworks and technologies
Electron
Vue 2
Express
EJS
MusicKit.js
Some components from Bootstrap 5 (mainly grids and modals)
Bootstrap Vue
Bootbox
Notyf
Frontend API
This page contains documentation on the functions included in the CiderFrontAPI.
Renderer Helpers
CiderFrontAPI.*
AddMenuEntry(entry: CiderFrontAPI.Objects.MenuEntry) - Add an entry to the Cider menu
StyleSheets
Add(href: string) - Load a .less stylesheet from a URL
Registering a Vue component as a page
Registering a Vue component is done by adding plugin. to the front of the component name. Pages can then be loaded with app.appRoute("plugin/<component name without plugin.>")
Accessing static resources from the renderer
Additional resources in the plugins such as images and other files can be accessed with methods like fetch() from ./plugins/:packageName/:file this resolves to http://localhost:{port}/plugins/:packageName/:file
:packageName refers to the name property in package.json for the plugin.
CiderAudio initializes with CiderAudio.hierarchical_loading() Inside the loading process, all audioNodes are cleared and re-initialized and chained based on what the user has enabled. The designed hierarchy for loading audio functions is as follows:
getPath(path: string) - Returns path used by Cider by name.
srcPath - src/ folder
rendererPath - renderer/ folder
mainPath - main/ path
resourcePath - resources/ path
i18nPath - i18n/ path
ciderCache - Cider cache path
themes - Themes
plugins - Plugins
getLocale(language: string, key: string)
Fetches the i18n locale for the given language.
getStoreValue(key: string)
Gets a store value
getStore()
Returns store
setStoreValue(key: string, value: any)
Sets a store value
getWindow()
Gets the renderer window
loadJSFrontend(path: string)
Loads a JavaScript file into the renderer, this is the main method of loading front end plugins.
playback. - Controls playback
.play() - Play
.pause() - Pause
.playPause() - Toggles playback
.next() - Next track in queue
.previous() - Previous track in queue
Built in events
Cider plugins support these methods by default, however more can be made with the use of ipcMain and ipcRenderer
onReady(win) - (Required) Executes when the back end is ready
onRendererReady() - Executes when the renderer has finished loading (app.init())
onPlaybackStateDidChange(attributes) - Executes when playback state changes, passes song attributes
onNowPlayingItemDidChange(attributes) - Executes when song changes, passes song attributes
onBeforeQuit - Executes before Cider quits
Frontend Development
Renderer Helpers
CiderFrontAPI.*
AddMenuEntry(entry: CiderFrontAPI.Objects.MenuEntry) - Add an entry to the Cider menu
StyleSheets
Add(href: string) - Load a .less stylesheet from a URL
Registering a Vue component as a page
Registering a Vue component is done by adding plugin. to the front of the component name. Pages can then be loaded with app.appRoute("plugin/<component name without plugin.>")
Accessing static resources from the renderer
Additional resources in the plugins such as images and other files can be accessed with methods like fetch() from ./plugins/:packageName/:file this resolves to http://localhost:{port}/plugins/:packageName/:file
:packageName refers to the name property in package.json for the plugin.
CiderAudio initializes with CiderAudio.hierarchical_loading() Inside the loading process, all audioNodes are cleared and re-initialized and chained based on what the user has enabled. The designed hierarchy for loading audio functions is as follows:
Once you have completed your plugin its time to publish! Create a new repository for the plugin and upload the files.
To have the theme indexed into Cider's built in plugin explorer, add cidermusicplugin as a topic on the repository.
Plugins from GitHub in Cider will display the repos README.md file within the Explore Plugins on GitHub page, so be sure to include some screenshots showing off your plugins.