Revert "Only reset played when going live, fixes #180"

This reverts commit 126d43aaa5.
This commit is contained in:
Matthew Stratford 2020-11-02 20:49:56 +00:00
parent 37f0748f1f
commit 39a0dca8da
No known key found for this signature in database
GPG key ID: 9E53C8B3F0B57395
4 changed files with 2 additions and 6 deletions

View file

@ -120,9 +120,6 @@ export class WebRTCStreamer extends Streamer {
this.state = "ANSWER";
break;
case "ACTIVATED":
if (!this.isActive) {
this.onStateChange("GOING_LIVE"); // Starting show.
}
this.isActive = true;
this.onStateChange("LIVE");
this.dispatch(BroadcastState.setTracklisting(true));

View file

@ -4,7 +4,6 @@ export type ConnectionStateEnum =
| "CONNECTED"
| "CONNECTION_LOST"
| "CONNECTION_LOST_RECONNECTING"
| "GOING_LIVE"
| "LIVE";
export type ConnectionStateListener = (val: ConnectionStateEnum) => any;

View file

@ -52,7 +52,8 @@ const considerDoingTheNews = (getState: () => RootState) => async () => {
await actuallyDoTheNews();
} else if (state.settings.doTheNews === "while_live") {
if (
state.broadcast.connectionState in ["CONNECTED", "GOING_LIVE", "LIVE"]
state.broadcast.connectionState === "CONNECTED" ||
state.broadcast.connectionState === "LIVE"
) {
const transition = await broadcastApiRequest<{
autoNews: boolean;

View file

@ -40,7 +40,6 @@ function nicifyConnectionState(state: ConnectionStateEnum): string {
case "NOT_CONNECTED":
return "Not Connected";
case "LIVE":
case "GOING_LIVE":
return "Live!";
default:
console.warn("unhandled", state);