feat: add configurable operator appearance and layout
This commit is contained in:
@@ -76,12 +76,30 @@
|
||||
playout.nextKind !== "none" && playout.nextKind !== "endOfPlaylist";
|
||||
}
|
||||
|
||||
function statusState(playout, busy) {
|
||||
if (!playout) return "error";
|
||||
if (playout.outcomeUnknown === true ||
|
||||
playout.connectionState === "outcomeUnknown") {
|
||||
return "outcome-unknown";
|
||||
}
|
||||
if (busy) return "busy";
|
||||
if (playout.mode === "disabled" ||
|
||||
playout.connectionState === "faulted" ||
|
||||
playout.connectionState === "disposed") {
|
||||
return "error";
|
||||
}
|
||||
if (playout.phase === "program") return "program";
|
||||
if (playout.phase === "prepared") return "prepared";
|
||||
return "idle";
|
||||
}
|
||||
|
||||
function render(state) {
|
||||
currentState = state || currentState;
|
||||
const playout = currentState && currentState.playout;
|
||||
const nativeBusy = !!(currentState && currentState.isBusy) ||
|
||||
!!(playout && playout.isBusy);
|
||||
const busy = localBusy || nativeBusy;
|
||||
status.dataset.state = statusState(playout, busy);
|
||||
if (!playout) {
|
||||
connection.textContent = "미연결";
|
||||
status.textContent = "송출 엔진 상태를 사용할 수 없습니다.";
|
||||
@@ -193,6 +211,7 @@
|
||||
});
|
||||
} else {
|
||||
setAllDisabled(true);
|
||||
status.dataset.state = "error";
|
||||
status.textContent = "WebView2 송출 브리지를 사용할 수 없습니다.";
|
||||
status.title = status.textContent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user