openvibers/openvibe.live Commits
Live: a channel's Videos tab links the channel on OpenVibe.Video (#105)
Changes
@@@ -375,6 +375,7 @@<div class="ch-tab-panel active" id="ch-panel-videos" role="tabpanel"><div class="ch-panel-bar"><div id="ch-vods-filter-bar" class="ch-vods-filter-bar" style="display:none"></div>++ <a id="ch-vods-video-link" class="btn btn-small btn-outline" href="#" style="display:none" title="This channel's recordings and clips on OpenVibe.Video, with AI chapters, captions and playlists"><i class="fa-solid fa-film"></i> On OpenVibe.Video</a><button class="btn btn-small btn-outline sel-all-btn" data-sel-container="ch-vods-grid" style="display:none" onclick="_selAllToggle(this.dataset.selContainer)"><i class="fa-solid fa-check-double"></i> <span class="sel-all-label">Select all</span></button></div><div class="stream-grid" id="ch-vods-grid"><p class="muted">No videos yet</p></div>@@@ -92,6 +92,15 @@ async function renderChannelVodsSection(username, liveStreams, vods, meta = {})filterBar.style.display = 'none';}++ // The same channel on OpenVibe.Video (its recordings and clips with AI chapters, captions and playlists), once it++ // has any; Video's channel pages take the usernames Live's links do.++ const videoLink = document.getElementById('ch-vods-video-link');++ if (videoLink) {++ const ok = /^[A-Za-z0-9_]{1,32}$/.test(String(username || '')) && Array.isArray(vods) && vods.length > 0;++ videoLink.style.display = ok ? '' : 'none';++ if (ok) videoLink.href = `https://openvibe.video/@${username}`;++ }++const pageSize = meta.limit || CHANNEL_VODS_PAGE_SIZE;const offset = meta.offset || 0;const total = meta.total || vods.length;
@@ -375,6 +375,7 @@
@@ -375,6 +375,7 @@
<div class="ch-tab-panel active" id="ch-panel-videos" role="tabpanel">
<div class="ch-tab-panel active" id="ch-panel-videos" role="tabpanel">
<div class="ch-panel-bar">
<div class="ch-panel-bar">
<div id="ch-vods-filter-bar" class="ch-vods-filter-bar" style="display:none"></div>
<div id="ch-vods-filter-bar" class="ch-vods-filter-bar" style="display:none"></div>
+ <a id="ch-vods-video-link" class="btn btn-small btn-outline" href="#" style="display:none" title="This channel's recordings and clips on OpenVibe.Video, with AI chapters, captions and playlists"><i class="fa-solid fa-film"></i> On OpenVibe.Video</a>
<button class="btn btn-small btn-outline sel-all-btn" data-sel-container="ch-vods-grid" style="display:none" onclick="_selAllToggle(this.dataset.selContainer)"><i class="fa-solid fa-check-double"></i> <span class="sel-all-label">Select all</span></button>
<button class="btn btn-small btn-outline sel-all-btn" data-sel-container="ch-vods-grid" style="display:none" onclick="_selAllToggle(this.dataset.selContainer)"><i class="fa-solid fa-check-double"></i> <span class="sel-all-label">Select all</span></button>
</div>
</div>
<div class="stream-grid" id="ch-vods-grid"><p class="muted">No videos yet</p></div>
<div class="stream-grid" id="ch-vods-grid"><p class="muted">No videos yet</p></div>
@@ -92,6 +92,15 @@ async function renderChannelVodsSection(username, liveStreams, vods, meta = {})
@@ -92,6 +92,15 @@ async function renderChannelVodsSection(username, liveStreams, vods, meta = {})
filterBar.style.display = 'none';
filterBar.style.display = 'none';
}
}
+ // The same channel on OpenVibe.Video (its recordings and clips with AI chapters, captions and playlists), once it
+ // has any; Video's channel pages take the usernames Live's links do.
+ const videoLink = document.getElementById('ch-vods-video-link');
+ if (videoLink) {
+ const ok = /^[A-Za-z0-9_]{1,32}$/.test(String(username || '')) && Array.isArray(vods) && vods.length > 0;
+ videoLink.style.display = ok ? '' : 'none';
+ if (ok) videoLink.href = `https://openvibe.video/@${username}`;
+ }
+
const pageSize = meta.limit || CHANNEL_VODS_PAGE_SIZE;
const pageSize = meta.limit || CHANNEL_VODS_PAGE_SIZE;
const offset = meta.offset || 0;
const offset = meta.offset || 0;
const total = meta.total || vods.length;
const total = meta.total || vods.length;