@uniai-fe/uds-templates 0.6.5 → 0.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/styles.css
CHANGED
|
@@ -110,6 +110,7 @@
|
|
|
110
110
|
--cctv-live-state-dot-off: var(--color-border-strong);
|
|
111
111
|
--cctv-live-state-text-off: var(--color-label-disabled);
|
|
112
112
|
/* Error */
|
|
113
|
+
--cctv-status-text-color: var(--color-common-99);
|
|
113
114
|
--cctv-error-text-color: var(--color-label-disabled);
|
|
114
115
|
--cctv-error-icon-color: var(--color-label-disabled);
|
|
115
116
|
/* Pagination */
|
|
@@ -1798,14 +1799,23 @@
|
|
|
1798
1799
|
}
|
|
1799
1800
|
|
|
1800
1801
|
.cctv-video-error-icon {
|
|
1802
|
+
display: none;
|
|
1801
1803
|
margin-bottom: 2px;
|
|
1802
1804
|
fill: var(--cctv-error-icon-color);
|
|
1803
1805
|
}
|
|
1804
1806
|
|
|
1805
1807
|
.cctv-video-error-message {
|
|
1806
1808
|
font-size: 13px;
|
|
1807
|
-
color: var(--cctv-
|
|
1809
|
+
color: var(--cctv-status-text-color);
|
|
1808
1810
|
line-height: 1.5em;
|
|
1811
|
+
font-weight: 500;
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
.cctv-video-overlay-body.is-error .cctv-video-error-icon {
|
|
1815
|
+
display: block;
|
|
1816
|
+
}
|
|
1817
|
+
.cctv-video-overlay-body.is-error .cctv-video-error-message {
|
|
1818
|
+
color: var(--cctv-error-text-color);
|
|
1809
1819
|
font-weight: 600;
|
|
1810
1820
|
}
|
|
1811
1821
|
|
package/package.json
CHANGED
|
@@ -139,14 +139,26 @@
|
|
|
139
139
|
justify-content: center;
|
|
140
140
|
}
|
|
141
141
|
.cctv-video-error-icon {
|
|
142
|
+
display: none;
|
|
142
143
|
margin-bottom: 2px;
|
|
143
144
|
fill: var(--cctv-error-icon-color);
|
|
144
145
|
}
|
|
145
146
|
.cctv-video-error-message {
|
|
146
147
|
font-size: 13px;
|
|
147
|
-
color: var(--cctv-
|
|
148
|
+
color: var(--cctv-status-text-color);
|
|
148
149
|
line-height: 1.5em;
|
|
149
|
-
font-weight:
|
|
150
|
+
font-weight: 500;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.cctv-video-overlay-body.is-error {
|
|
154
|
+
.cctv-video-error-icon {
|
|
155
|
+
display: block;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.cctv-video-error-message {
|
|
159
|
+
color: var(--cctv-error-text-color);
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
}
|
|
150
162
|
}
|
|
151
163
|
|
|
152
164
|
.cctv-video-status-text {
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
export const CCTV_MESSAGE = {
|
|
8
8
|
selectCam: "카메라를 선택하세요.",
|
|
9
9
|
fetching: "CCTV 데이터를 불러오는 중입니다.",
|
|
10
|
-
preparing: "
|
|
10
|
+
preparing: "CCTV 영상을 연결하고 있습니다.",
|
|
11
11
|
sessionEnded:
|
|
12
12
|
"장시간 미사용으로 연결이 종료되었습니다. 계속 확인하시려면 다시 연결해 주세요.",
|
|
13
13
|
tokenError: "토큰을 발급하지 못했습니다.",
|
|
@@ -21,6 +21,10 @@ const RTC_PREPARING_STATES = new Set<RTCPeerConnectionState>([
|
|
|
21
21
|
"closed",
|
|
22
22
|
]);
|
|
23
23
|
|
|
24
|
+
const RTC_SESSION_ENDED_RECONNECT_STATES = new Set<RTCPeerConnectionState>([
|
|
25
|
+
"closed",
|
|
26
|
+
]);
|
|
27
|
+
|
|
24
28
|
/**
|
|
25
29
|
* CCTV; 스트리밍 상태에 따른 메시지 추출
|
|
26
30
|
* @param {CctvVideoOverlayMessageParams} params 상태 파라미터
|
|
@@ -51,12 +55,14 @@ export function getOverlayMessage({
|
|
|
51
55
|
}
|
|
52
56
|
|
|
53
57
|
if (!cam.cam_online) return CCTV_MESSAGE.offline;
|
|
54
|
-
if (canReconnect) return CCTV_MESSAGE.sessionEnded;
|
|
55
58
|
// 에러 상태가 준비 상태와 겹칠 때는 에러 문구가 최종 표시 계약을 우선한다.
|
|
56
59
|
if (isTokenError) return CCTV_MESSAGE.tokenError;
|
|
57
60
|
if (streamError) return streamError;
|
|
58
|
-
if (isTokenLoading || isStreaming) return CCTV_MESSAGE.preparing;
|
|
59
61
|
if (connectionState === "failed") return CCTV_MESSAGE.offline;
|
|
62
|
+
if (canReconnect && RTC_SESSION_ENDED_RECONNECT_STATES.has(connectionState)) {
|
|
63
|
+
return CCTV_MESSAGE.sessionEnded;
|
|
64
|
+
}
|
|
65
|
+
if (isTokenLoading || isStreaming) return CCTV_MESSAGE.preparing;
|
|
60
66
|
if (RTC_PREPARING_STATES.has(connectionState)) return CCTV_MESSAGE.preparing;
|
|
61
67
|
return null;
|
|
62
68
|
}
|