Allow option to remain connected on registration failure.
This commit is contained in:
parent
6412269b0f
commit
abace4e42b
3 changed files with 31 additions and 1 deletions
|
@ -144,8 +144,17 @@ export const registerForShow = (): AppThunk => async (dispatch, getState) => {
|
|||
})
|
||||
);
|
||||
if (streamer) {
|
||||
// We're connected,
|
||||
var remain_connected = getState().settings.allowStreamingOnReject;
|
||||
if (remain_connected) {
|
||||
console.log(
|
||||
"StateServer refused registration. Due to setting, staying connected.",
|
||||
e
|
||||
);
|
||||
} else {
|
||||
await streamer.stop("ApiException " + e.message);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// let raygun handle it
|
||||
throw e;
|
||||
|
|
|
@ -305,6 +305,25 @@ export function AdvancedTab() {
|
|||
/>
|
||||
<label className="form-check-label">Enable recording</label>
|
||||
</div>
|
||||
<div className="form-check">
|
||||
<input
|
||||
className="form-check-input"
|
||||
type="checkbox"
|
||||
checked={settings.allowStreamingOnReject}
|
||||
onChange={(e) =>
|
||||
dispatch(
|
||||
changeSetting({
|
||||
key: "allowStreamingOnReject",
|
||||
val: e.target.checked,
|
||||
})
|
||||
)
|
||||
}
|
||||
/>
|
||||
<label>
|
||||
Allow connection persistance for troubleshooting. (Don't enable unless
|
||||
requested to.)
|
||||
</label>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ import { INTERNAL_OUTPUT_ID, PLAYER_COUNT } from "../mixer/audio";
|
|||
|
||||
interface Settings {
|
||||
showDebugInfo: boolean;
|
||||
allowStreamingOnReject: boolean;
|
||||
enableRecording: boolean;
|
||||
tracklist: "always" | "while_live" | "never";
|
||||
doTheNews: "always" | "while_live" | "never";
|
||||
|
@ -18,6 +19,7 @@ const settingsState = createSlice({
|
|||
name: "settings",
|
||||
initialState: {
|
||||
showDebugInfo: false,
|
||||
allowStreamingOnReject: false,
|
||||
enableRecording: false,
|
||||
tracklist: "while_live",
|
||||
doTheNews: "while_live",
|
||||
|
|
Loading…
Reference in a new issue