Merge pull request #210 from UniversityRadioYork/mstratford/silence-threshold
Fix silence detection threshold.
This commit is contained in:
commit
9be4285c32
1 changed files with 3 additions and 1 deletions
|
@ -6,6 +6,8 @@ import { useInterval } from "../lib/utils";
|
|||
import { RootState } from "../rootReducer";
|
||||
import "./timelord.scss";
|
||||
|
||||
const SILENCE_WARN_SECS = 5;
|
||||
|
||||
export function Timelord() {
|
||||
async function getSource() {
|
||||
let studio = await myradioApiRequest("/selector/studioattime", "GET", null);
|
||||
|
@ -32,7 +34,7 @@ export function Timelord() {
|
|||
async function getSilence() {
|
||||
let silence = await myradioApiRequest("/selector/issilence", "GET", null);
|
||||
|
||||
return silence;
|
||||
return silence >= SILENCE_WARN_SECS;
|
||||
}
|
||||
|
||||
const broadcastStage = useSelector(
|
||||
|
|
Loading…
Reference in a new issue