-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
desktop v0.1.6 - add multimedia plugin, improve BtnConfig plugins list
- Loading branch information
Showing
7 changed files
with
126 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
// export * from './mydeck' | ||
import companion from './companion' | ||
import multimedia from './multimedia' | ||
|
||
export { | ||
companion, | ||
multimedia, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { ipcMain } from 'electron' | ||
import loudness from 'loudness' | ||
|
||
const multimedia = ({ store, toIO, sendMessageToRenderer, updateProps }) => { | ||
// await loudness.setVolume(45) | ||
// const vol = await loudness.getVolume() | ||
// // vol = 45 | ||
// await loudness.setMuted(false) | ||
// const mute = await loudness.getMuted() | ||
// // mute = false | ||
const start = () => { | ||
ipcMain.on('update-board', (event, board) => { | ||
console.log(`[multimedia] received update-board`) | ||
updateProps() | ||
}) | ||
} | ||
|
||
const stop = () => {} | ||
|
||
const actions = () => ({ | ||
'vol-up': { | ||
label: 'Volume Up Button', | ||
fire: async (data) => { loudness.setVolume(await loudness.getVolume() + 10) }, | ||
}, | ||
'vol-down': { | ||
label: 'Volume Down Button', | ||
fire: async (data) => { loudness.setVolume(await loudness.getVolume() - 10) }, | ||
}, | ||
'vol-to': { | ||
label: 'Volume To Value Button', | ||
fire: async (data) => { loudness.setVolume(data.volume) }, | ||
}, | ||
'mute': { | ||
label: 'Mute Button', | ||
fire: async (data) => { loudness.setMuted(true) }, | ||
}, | ||
'unmute': { | ||
label: 'Unmute Button', | ||
fire: async (data) => { loudness.setMuted(false) }, | ||
}, | ||
'mute-toggle': { | ||
label: 'Mute Toggle Button', | ||
fire: async (data) => { loudness.setMuted(!await loudness.getMuted()) }, | ||
}, | ||
}) | ||
|
||
return { | ||
start, | ||
stop, | ||
actions, | ||
} | ||
} | ||
|
||
export default multimedia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"description": "A powerful deck board app for your streaming needs! This is the desktop app, use it as a configurator for your companion mobile app (soon MyDeck on majors Stores).", | ||
"author": "Benedetto Abbenanti b3nab <[email protected]>", | ||
"homepage": "https://github.com/b3nab/mydeck", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"main": "app/background.js", | ||
"scripts": { | ||
"dev": "nextron", | ||
|
@@ -34,6 +34,7 @@ | |
"jsondiffpatch": "^0.4.1", | ||
"jsum": "^2.0.0-alpha.3", | ||
"live-plugin-manager": "^0.16.0", | ||
"loudness": "^0.4.1", | ||
"material-ui-popup-state": "^1.9.3", | ||
"pluginclerk": "^4.13.0", | ||
"react-colorful": "^5.4.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters