Allow option to remain connected on registration failure.
Allow option to remain connected on registration failure.
This commit is contained in:
commit
bc325430ee
3 changed files with 31 additions and 1 deletions
|
@ -144,8 +144,17 @@ export const registerForShow = (): AppThunk => async (dispatch, getState) => {
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
if (streamer) {
|
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);
|
await streamer.stop("ApiException " + e.message);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// let raygun handle it
|
// let raygun handle it
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -305,6 +305,25 @@ export function AdvancedTab() {
|
||||||
/>
|
/>
|
||||||
<label className="form-check-label">Enable recording</label>
|
<label className="form-check-label">Enable recording</label>
|
||||||
</div>
|
</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 {
|
interface Settings {
|
||||||
showDebugInfo: boolean;
|
showDebugInfo: boolean;
|
||||||
|
allowStreamingOnReject: boolean;
|
||||||
enableRecording: boolean;
|
enableRecording: boolean;
|
||||||
tracklist: "always" | "while_live" | "never";
|
tracklist: "always" | "while_live" | "never";
|
||||||
doTheNews: "always" | "while_live" | "never";
|
doTheNews: "always" | "while_live" | "never";
|
||||||
|
@ -18,6 +19,7 @@ const settingsState = createSlice({
|
||||||
name: "settings",
|
name: "settings",
|
||||||
initialState: {
|
initialState: {
|
||||||
showDebugInfo: false,
|
showDebugInfo: false,
|
||||||
|
allowStreamingOnReject: false,
|
||||||
enableRecording: false,
|
enableRecording: false,
|
||||||
tracklist: "while_live",
|
tracklist: "while_live",
|
||||||
doTheNews: "while_live",
|
doTheNews: "while_live",
|
||||||
|
|
Loading…
Reference in a new issue