aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js32
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/style.css24
2 files changed, 4 insertions, 52 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index cb3e05b..5a50010 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -997,18 +997,13 @@ function GroupPage({ groupId, group, token, username }) {
<${MembersPanel} groupId=${groupId} group=${group} token=${token} />
`}
`}
- ${cached && entries.length > 0 && status !== 'connected' && tab === 'files' && html`
- <p class="page-message" style="margin-top:8px">
- <span class="spinner"></span>${' '}${t('status.connecting')}
- </p>
- `}
${status === 'offline' && html`
<p class="page-message">
${t('group.offline_title')}
${' '}${t('group.offline_hint')}
</p>
`}
- ${(status === 'discovering' || status === 'connecting' || status === 'fetching') && html`
+ ${!cached && (status === 'discovering' || status === 'connecting' || status === 'fetching') && html`
<p class="page-message">${statusLabel}</p>
`}
${previewEntry && html`
@@ -1478,9 +1473,7 @@ function _mseSupported(codec) {
function VideoPlayer({ entry, transportRef, gekRef, onClose }) {
const [phase, setPhase] = useState('loading');
- const [progress, setProgress] = useState(0);
const [error, setError] = useState('');
- const [buffered, setBuffered] = useState(0);
const videoRef = useRef(null);
const msRef = useRef(null);
const sbRef = useRef(null);
@@ -1524,7 +1517,6 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose }) {
}
let streamCodec = null;
- let totalBytes = 0;
transport.onStreamInit = (msg) => {
if (cancelled) return;
@@ -1548,10 +1540,6 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose }) {
sbRef.current = sb;
sb.addEventListener('updateend', () => {
appendingRef.current = false;
- if (videoRef.current) {
- setBuffered(videoRef.current.buffered.length > 0
- ? videoRef.current.buffered.end(0) : 0);
- }
flushQueue();
});
setPhase('streaming');
@@ -1568,8 +1556,6 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose }) {
try {
const plaintext = await window.MeshBayCrypto.decryptChunkBin(
gekRef.current, entry.id, msg.segment_index, msg.nonce, msg.ct);
- totalBytes += plaintext.byteLength;
- setProgress(entry.size > 0 ? totalBytes / entry.size : 0);
queueRef.current.push(plaintext);
flushQueue();
} catch (e) {
@@ -1632,7 +1618,9 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose }) {
${phase === 'loading' && html`
<div class="video-loading">
- <div class="video-loading-label">${t('video.buffering')}</div>
+ <div class="video-loading-label">
+ <span class="spinner"></span>${' '}${t('video.buffering')}
+ </div>
</div>
`}
@@ -1642,18 +1630,6 @@ function VideoPlayer({ entry, transportRef, gekRef, onClose }) {
</div>
`}
- ${phase === 'streaming' && progress < 1 && html`
- <div class="video-stream-bar">
- <div class="video-progress-bar small">
- <div class="video-progress-fill"
- style="width:${Math.round(progress * 100)}%"></div>
- </div>
- <span class="video-stream-label">
- ${formatSize(Math.round(progress * entry.size))} / ${formatSize(entry.size)}
- </span>
- </div>
- `}
-
${phase === 'error' && html`
<div class="video-error">${error}</div>
`}
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/style.css b/packages/meshbay-hub/src/meshbay_hub/static/style.css
index faf8b0f..f3dcbf4 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/style.css
+++ b/packages/meshbay-hub/src/meshbay_hub/static/style.css
@@ -909,30 +909,6 @@ button:disabled { opacity: 0.5; cursor: not-allowed; }
max-width: 400px;
}
-.video-stream-bar {
- position: absolute;
- bottom: 60px;
- left: 50%;
- transform: translateX(-50%);
- display: flex;
- align-items: center;
- gap: 8px;
- background: rgba(0, 0, 0, 0.6);
- padding: 4px 12px;
- border-radius: 12px;
- z-index: 10;
-}
-
-.video-progress-bar.small {
- width: 120px;
- height: 4px;
-}
-
-.video-stream-label {
- font-size: 0.7em;
- color: rgba(255, 255, 255, 0.7);
- white-space: nowrap;
-}
.play-btn {
background: none;