Add embedded player
This commit is contained in:
parent
70ce8ab72b
commit
aa1095eef2
11 changed files with 160 additions and 110 deletions
10
public/player-marker.js
Normal file
10
public/player-marker.js
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue