Skip to content

Commit a81ace0

Browse files
committed
fix: youtube live links
1 parent 61ef64f commit a81ace0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

library.js

+2
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ async function handleSpecialEmbed(url, $anchor) {
188188
} else if (pathname.startsWith('/shorts')) {
189189
video = pathname.split('/')[2];
190190
short = true;
191+
} else if (pathname.startsWith('/live')) {
192+
video = pathname.split('/')[2];
191193
} else {
192194
video = searchParams.get('v');
193195
}

static/templates/admin/plugins/link-preview.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
<div class="form-check form-switch mb-3">
5959
<input type="checkbox" class="form-check-input" id="embedTiktok" name="embedTiktok">
60-
<label for="embedTiktok" class="form-check-label">Vimeo</label>
60+
<label for="embedTiktok" class="form-check-label">Tiktok</label>
6161
</div>
6262
</div>
6363
</form>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
<div class="ratio" style="--bs-aspect-ratio: 177%;">
2-
<iframe src="https://www.tiktok.com/embed/v2/{video}" title="TikTok video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
1+
<div class="col-sm-6">
2+
<div class="ratio" style="--bs-aspect-ratio: 177%;">
3+
<iframe src="https://www.tiktok.com/embed/v2/{video}" title="TikTok video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
4+
</div>
35
</div>

0 commit comments

Comments
 (0)