Use @ury1350/prettier-config
This commit is contained in:
parent
bcfd4004d7
commit
abcac8107c
7 changed files with 51 additions and 21 deletions
|
@ -124,6 +124,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@ury1350/prettier-config": "^1.0.0",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
"prettier": "^1.19.1"
|
"prettier": "^1.19.1"
|
||||||
},
|
},
|
||||||
|
@ -179,5 +180,6 @@
|
||||||
"presets": [
|
"presets": [
|
||||||
"react-app"
|
"react-app"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"prettier": "@ury1350/prettier-config"
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,10 @@ export class WebRTCStreamer extends Streamer {
|
||||||
if (state === "CONNECTED") {
|
if (state === "CONNECTED") {
|
||||||
this.newsInterval = later.setInterval(
|
this.newsInterval = later.setInterval(
|
||||||
this.doTheNews,
|
this.doTheNews,
|
||||||
later.parse.recur().on(59).minute()
|
later.parse
|
||||||
|
.recur()
|
||||||
|
.on(59)
|
||||||
|
.minute()
|
||||||
);
|
);
|
||||||
} else if (state === "CONNECTION_LOST" || state === "NOT_CONNECTED") {
|
} else if (state === "CONNECTION_LOST" || state === "NOT_CONNECTED") {
|
||||||
this.newsInterval?.clear();
|
this.newsInterval?.clear();
|
||||||
|
@ -107,14 +110,30 @@ export class WebRTCStreamer extends Streamer {
|
||||||
// Sanity check
|
// Sanity check
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
if (now.getSeconds() < 45) {
|
if (now.getSeconds() < 45) {
|
||||||
later.setTimeout(async () => {
|
later.setTimeout(
|
||||||
await MixerState.playNewsIntro();
|
async () => {
|
||||||
}, later.parse.recur().on(59).minute().on(45).second());
|
await MixerState.playNewsIntro();
|
||||||
|
},
|
||||||
|
later.parse
|
||||||
|
.recur()
|
||||||
|
.on(59)
|
||||||
|
.minute()
|
||||||
|
.on(45)
|
||||||
|
.second()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (now.getMinutes() <= 1 && now.getSeconds() < 55) {
|
if (now.getMinutes() <= 1 && now.getSeconds() < 55) {
|
||||||
later.setTimeout(async () => {
|
later.setTimeout(
|
||||||
await MixerState.playNewsEnd();
|
async () => {
|
||||||
}, later.parse.recur().on(1).minute().on(55).second());
|
await MixerState.playNewsEnd();
|
||||||
|
},
|
||||||
|
later.parse
|
||||||
|
.recur()
|
||||||
|
.on(1)
|
||||||
|
.minute()
|
||||||
|
.on(55)
|
||||||
|
.second()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -146,9 +165,9 @@ export class WebRTCStreamer extends Streamer {
|
||||||
}
|
}
|
||||||
// TODO: maybe delete non-Opus candidates?
|
// TODO: maybe delete non-Opus candidates?
|
||||||
}
|
}
|
||||||
track.fmtp[opusIndex].config += `; maxaveragebitrate=${
|
track.fmtp[opusIndex].config += `; maxaveragebitrate=${192 *
|
||||||
192 * 2 * 1024
|
2 *
|
||||||
}; stereo=1; sprop-stereo=1 ; cbr=1`;
|
1024}; stereo=1; sprop-stereo=1 ; cbr=1`;
|
||||||
});
|
});
|
||||||
|
|
||||||
offer.sdp = SdpTransform.write(parsed);
|
offer.sdp = SdpTransform.write(parsed);
|
||||||
|
|
|
@ -526,9 +526,15 @@ export const load = (
|
||||||
|
|
||||||
export const updateTimeEnding = (): AppThunk => async (dispatch) => {
|
export const updateTimeEnding = (): AppThunk => async (dispatch) => {
|
||||||
if (!timerInterval) {
|
if (!timerInterval) {
|
||||||
timerInterval = later.setInterval(() => {
|
timerInterval = later.setInterval(
|
||||||
dispatch(mixerState.actions.updateTimeEndingAt());
|
() => {
|
||||||
}, later.parse.recur().every(1).second());
|
dispatch(mixerState.actions.updateTimeEndingAt());
|
||||||
|
},
|
||||||
|
later.parse
|
||||||
|
.recur()
|
||||||
|
.every(1)
|
||||||
|
.second()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -604,7 +610,7 @@ export const {
|
||||||
} = mixerState.actions;
|
} = mixerState.actions;
|
||||||
|
|
||||||
export const redrawWavesurfers = (): AppThunk => () => {
|
export const redrawWavesurfers = (): AppThunk => () => {
|
||||||
wavesurfers.forEach(function (item) {
|
wavesurfers.forEach(function(item) {
|
||||||
item.drawBuffer();
|
item.drawBuffer();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -95,7 +95,7 @@ export function MicTab() {
|
||||||
disabled={micList === null}
|
disabled={micList === null}
|
||||||
>
|
>
|
||||||
<option value={"$NONE"} disabled label="Choose a microphone" />
|
<option value={"$NONE"} disabled label="Choose a microphone" />
|
||||||
{(micList || []).map(function (e, i) {
|
{(micList || []).map(function(e, i) {
|
||||||
return (
|
return (
|
||||||
<option value={e.deviceId} key={i}>
|
<option value={e.deviceId} key={i}>
|
||||||
{e.label !== "" ? e.label : e.deviceId}
|
{e.label !== "" ? e.label : e.deviceId}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { MYRADIO_NON_API_BASE } from "../api";
|
||||||
import { useSelector, useDispatch } from "react-redux";
|
import { useSelector, useDispatch } from "react-redux";
|
||||||
import { RootState } from "../rootReducer";
|
import { RootState } from "../rootReducer";
|
||||||
|
|
||||||
const SessionHandler: React.FC = function () {
|
const SessionHandler: React.FC = function() {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
@ -171,9 +171,7 @@ function incrReducer(state: number, action: any) {
|
||||||
return state + 1;
|
return state + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Showplanner: React.FC<{ timeslotId: number }> = function ({
|
const Showplanner: React.FC<{ timeslotId: number }> = function({ timeslotId }) {
|
||||||
timeslotId,
|
|
||||||
}) {
|
|
||||||
const {
|
const {
|
||||||
plan: showplan,
|
plan: showplan,
|
||||||
planLoadError,
|
planLoadError,
|
||||||
|
@ -202,7 +200,7 @@ const Showplanner: React.FC<{ timeslotId: number }> = function ({
|
||||||
if (element) {
|
if (element) {
|
||||||
element.classList.toggle("active");
|
element.classList.toggle("active");
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
dispatch(MixerState.redrawWavesurfers());
|
dispatch(MixerState.redrawWavesurfers());
|
||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1642,6 +1642,11 @@
|
||||||
semver "^6.3.0"
|
semver "^6.3.0"
|
||||||
tsutils "^3.17.1"
|
tsutils "^3.17.1"
|
||||||
|
|
||||||
|
"@ury1350/prettier-config@^1.0.0":
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@ury1350/prettier-config/-/prettier-config-1.0.0.tgz#c5c81d187c016a9692edbd25b3964b23132c9b06"
|
||||||
|
integrity sha512-U36sZLI1vf9BiVB9P1CRYgBCoS0lYqzpUb37Cy8sgjjQvg8XwfjA75fMjgIBS99uYRN/VtnRrNIm93OsvetVJw==
|
||||||
|
|
||||||
"@webassemblyjs/ast@1.8.5":
|
"@webassemblyjs/ast@1.8.5":
|
||||||
version "1.8.5"
|
version "1.8.5"
|
||||||
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359"
|
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359"
|
||||||
|
|
Loading…
Reference in a new issue