Add embedded player

This commit is contained in:
Cadence Ember 2025-04-06 23:16:33 +12:00
parent 70ce8ab72b
commit aa1095eef2
11 changed files with 160 additions and 110 deletions

10
public/player-marker.js Normal file
View file

@ -0,0 +1,10 @@
function movePlayer() {
const pc = document.getElementById("player-container")
const playerExists = pc.querySelector("iframe")
if (!playerExists) return
const pm = document.getElementById("player-marker")
pm.style.height = `${pc.clientHeight}px`
pc.style.top = `${Math.round(pm.getBoundingClientRect().top)}px`
}
movePlayer()
document.body.addEventListener("htmx:afterSettle", movePlayer)