This commit is contained in:
parent
cef4707307
commit
58392b7d6a
10 changed files with 80 additions and 122 deletions
|
|
@ -657,39 +657,6 @@
|
|||
setTimeout(() => { message = ''; error = ''; }, 3000);
|
||||
}
|
||||
|
||||
async function testRestreamDestination(realmId, destId) {
|
||||
const realm = realms.find(r => r.id === realmId);
|
||||
if (!realm?.isLive) {
|
||||
error = 'Stream must be live to test restream';
|
||||
setTimeout(() => error = '', 3000);
|
||||
return;
|
||||
}
|
||||
|
||||
restreamLoading = true;
|
||||
try {
|
||||
const response = await fetch(`/api/realms/${realmId}/restream/${destId}/test`, {
|
||||
method: 'POST',
|
||||
credentials: 'include'
|
||||
});
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
if (response.ok && data.success) {
|
||||
message = 'Restream connection successful!';
|
||||
await loadRestreamDestinations(realmId);
|
||||
} else {
|
||||
error = data.error || 'Restream connection failed';
|
||||
}
|
||||
} catch (e) {
|
||||
error = 'Error testing restream';
|
||||
console.error(e);
|
||||
} finally {
|
||||
restreamLoading = false;
|
||||
}
|
||||
|
||||
setTimeout(() => { message = ''; error = ''; }, 3000);
|
||||
}
|
||||
|
||||
// Video functions
|
||||
async function loadVideos() {
|
||||
videosLoading = true;
|
||||
|
|
@ -3614,14 +3581,6 @@
|
|||
>
|
||||
{dest.enabled ? 'Disable' : 'Enable'}
|
||||
</button>
|
||||
<button
|
||||
class="btn"
|
||||
style="padding: 0.25rem 0.75rem; font-size: 0.85rem; background: #17a2b8;"
|
||||
on:click={() => testRestreamDestination(restreamRealmId, dest.id)}
|
||||
disabled={restreamLoading}
|
||||
>
|
||||
Test
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
style="padding: 0.25rem 0.75rem; font-size: 0.85rem;"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue