This repository has been archived by the owner on Aug 10, 2023. It is now read-only.
-
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.
Showing
33 changed files
with
3,367 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE HTML> | ||
<html> | ||
|
||
<head> | ||
<title>com.mmattdonk.solrock</title> | ||
<meta charset="utf-8"/> | ||
<style> | ||
canvas { | ||
background-color: transparent; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- Stream Deck Libs --> | ||
<script src="libs/js/constants.js"></script> | ||
<script src="libs/js/prototypes.js"></script> | ||
<script src="libs/js/timers.js"></script> | ||
<script src="libs/js/utils.js"></script> | ||
<script src="libs/js/events.js"></script> | ||
<script src="libs/js/api.js"></script> | ||
<script src="libs/js/stream-deck.js"></script> | ||
<script src="libs/js/action.js"></script> | ||
|
||
<!-- Plugin Source --> | ||
<script src="app.js"></script> | ||
</body> | ||
|
||
</html> |
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,48 @@ | ||
/// <reference path="libs/js/action.js" /> | ||
/// <reference path="libs/js/stream-deck.js" /> | ||
|
||
const myAction = new Action('com.mmattdonk.solrock.skiptts'); | ||
const APIEndpoint = "https://solrock.mmattdonk.com/api/streamers/"; | ||
const APIKey = "4@K4rLC%G#dn$t!LhRtWVmvEZtstmuA&"; | ||
var OverlayID = ""; | ||
|
||
$SD.onConnected(({ actionInfo, appInfo, connection, messageType, port, uuid }) => { | ||
console.log('Solrock - Stream Deck connected!'); | ||
// Fetch the user's global settings | ||
$SD.getGlobalSettings(); | ||
}); | ||
|
||
$SD.onDidReceiveGlobalSettings(({payload}) => { | ||
const {settings} = payload; | ||
OverlayID = settings.overlayId; | ||
// TODO: Grab the streamer ID then use that to be able to rollback tts | ||
}); | ||
|
||
myAction.onKeyUp(({ action, context, device, event, payload }) => { | ||
if (OverlayID === "") { | ||
console.log('OverlayID does not exist, check settings!'); | ||
$SD.showAlert(context); | ||
return; | ||
} | ||
|
||
const req = new XMLHttpRequest(); | ||
req.open("POST", APIEndpoint + "skiptts"); | ||
req.setRequestHeader("Content-Type", "application/json"); | ||
req.setRequestHeader("secret", APIKey); | ||
req.setRequestHeader("source", "streamdeck"); | ||
req.onreadystatechange = () => { | ||
if (req.readyState === 4) { | ||
const status = req.status; | ||
if (status === 0 || (status >= 200 && status < 400)) { | ||
$SD.showOk(context); | ||
} else { | ||
$SD.showAlert(context); | ||
} | ||
} | ||
}; | ||
const payloadObject = { | ||
"overlayId": OverlayID | ||
}; | ||
req.send(JSON.stringify(payloadObject)); | ||
}); | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@ | ||
{ | ||
"Description": "Some buttons to interact with the Solrock TTS Service", | ||
"Name": "Solrock TTS", | ||
"Category": "Solrock TTS", | ||
"com.mmattdonk.solrock.skiptts": { | ||
"Name": "Skip TTS", | ||
"Tooltip": "Skips the currently playing TTS" | ||
}, | ||
"Localization": { | ||
"overlayID": "TTS Overlay ID", | ||
"findOverlay": "Finding Overlay ID", | ||
"findOverlayDetails": "Paste the Overlay URL link under the sensitive information button into the textbox above!", | ||
"openDashboard": "Open Dashboard" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
com.mmattdonk.solrock.sdPlugin/libs/assets/elg_calendar.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions
7
com.mmattdonk.solrock.sdPlugin/libs/assets/elg_calendar_inv.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.