prettier all the things
This commit is contained in:
parent
08d797246f
commit
0778f3b230
4 changed files with 37 additions and 30 deletions
|
@ -142,7 +142,7 @@ export class WebRTCStreamer extends Streamer {
|
|||
|
||||
createPeerConnection(iceServers: RTCIceServer[]) {
|
||||
this.pc = new RTCPeerConnection({
|
||||
iceServers
|
||||
iceServers,
|
||||
});
|
||||
this.pc.oniceconnectionstatechange = async (e) => {
|
||||
if (!this.pc) {
|
||||
|
|
|
@ -18,7 +18,7 @@ import { MYRADIO_NON_API_BASE } from "../api";
|
|||
import "./navbar.scss";
|
||||
import { closeAlert } from "./state";
|
||||
import { ConnectionStateEnum } from "../broadcast/streamer";
|
||||
import {VUMeter} from "../optionsMenu/helpers/VUMeter";
|
||||
import { VUMeter } from "../optionsMenu/helpers/VUMeter";
|
||||
|
||||
function nicifyConnectionState(state: ConnectionStateEnum): string {
|
||||
switch (state) {
|
||||
|
|
|
@ -71,7 +71,10 @@ export function MicTab() {
|
|||
return (
|
||||
<>
|
||||
<h3>Mic Selection</h3>
|
||||
<p>Click the "<b>Find Microphones</b>" button, then choose the microphone you want from the dropdown.</p>
|
||||
<p>
|
||||
Click the "<b>Find Microphones</b>" button, then choose the microphone
|
||||
you want from the dropdown.
|
||||
</p>
|
||||
<button
|
||||
onClick={fetchMicNames}
|
||||
disabled={micList !== null}
|
||||
|
@ -111,8 +114,9 @@ export function MicTab() {
|
|||
<div style={{ opacity: state.open ? 1 : 0.5 }}>
|
||||
<h3>Calibration</h3>
|
||||
<p>
|
||||
Speak into the microphone at your <b>nomal presenting volume</b>. Adjust the gain slider
|
||||
until the bar below is <b>green</b> when you're speaking.
|
||||
Speak into the microphone at your <b>nomal presenting volume</b>.
|
||||
Adjust the gain slider until the bar below is <b>green</b> when you're
|
||||
speaking.
|
||||
</p>
|
||||
<div>
|
||||
<VUMeter
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useRef, useState } from "react";
|
||||
import {useSelector, useDispatch, shallowEqual, useStore} from "react-redux";
|
||||
import { useSelector, useDispatch, shallowEqual, useStore } from "react-redux";
|
||||
import {
|
||||
FaLevelDownAlt,
|
||||
FaPlayCircle,
|
||||
|
@ -16,9 +16,12 @@ import ProModeButtons from "./ProModeButtons";
|
|||
|
||||
export const USE_REAL_GAIN_VALUE = false;
|
||||
|
||||
function PlayerNumbers({ id } : { id: number}) {
|
||||
function PlayerNumbers({ id }: { id: number }) {
|
||||
const store = useStore<RootState, any>();
|
||||
const [[timeCurrent, timeLength, timeRemaining, endTime], setTimings] = useState([0, 0, 0, 0]);
|
||||
const [
|
||||
[timeCurrent, timeLength, timeRemaining, endTime],
|
||||
setTimings,
|
||||
] = useState([0, 0, 0, 0]);
|
||||
const tickerRef = useRef<number | undefined>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -26,40 +29,40 @@ function PlayerNumbers({ id } : { id: number}) {
|
|||
const now = new Date();
|
||||
const state = store.getState().mixer.players[id];
|
||||
setTimings([
|
||||
state.timeCurrent,
|
||||
state.timeLength,
|
||||
state.timeRemaining,
|
||||
now.valueOf() / 1000 + state.timeRemaining
|
||||
state.timeCurrent,
|
||||
state.timeLength,
|
||||
state.timeRemaining,
|
||||
now.valueOf() / 1000 + state.timeRemaining,
|
||||
]);
|
||||
}, 1000);
|
||||
return () => window.clearInterval(tickerRef.current);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<span id={"current-" + id} className="m-0 current bypass-click">
|
||||
{secToHHMM(timeCurrent)}
|
||||
</span>
|
||||
<span id={"length-" + id} className="m-0 length bypass-click">
|
||||
{secToHHMM(timeLength)}
|
||||
</span>
|
||||
<span id={"remaining-" + id} className="m-0 remaining bypass-click">
|
||||
{secToHHMM(timeRemaining)}
|
||||
</span>
|
||||
<span id={"ends-" + id} className="m-0 outro bypass-click">
|
||||
End -{" "}
|
||||
{timestampToHHMM(endTime)}
|
||||
</span>
|
||||
</>
|
||||
<>
|
||||
<span id={"current-" + id} className="m-0 current bypass-click">
|
||||
{secToHHMM(timeCurrent)}
|
||||
</span>
|
||||
<span id={"length-" + id} className="m-0 length bypass-click">
|
||||
{secToHHMM(timeLength)}
|
||||
</span>
|
||||
<span id={"remaining-" + id} className="m-0 remaining bypass-click">
|
||||
{secToHHMM(timeRemaining)}
|
||||
</span>
|
||||
<span id={"ends-" + id} className="m-0 outro bypass-click">
|
||||
End - {timestampToHHMM(endTime)}
|
||||
</span>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export function Player({ id }: { id: number }) {
|
||||
const playerState = useSelector(
|
||||
(state: RootState) => state.mixer.players[id],
|
||||
(a, b) => shallowEqual(
|
||||
omit(a, "timeCurrent", "timeRemaining"),
|
||||
omit(b, "timeCurrent", "timeRemaining")
|
||||
(a, b) =>
|
||||
shallowEqual(
|
||||
omit(a, "timeCurrent", "timeRemaining"),
|
||||
omit(b, "timeCurrent", "timeRemaining")
|
||||
)
|
||||
);
|
||||
const proMode = useSelector((state: RootState) => state.settings.proMode);
|
||||
|
|
Loading…
Reference in a new issue