Design Engineering Tip:
17.129 görüntüleme
Design Engineering Tip:
Moving a playing embed to another spot with appendChild restarts it. The iframe is removed, then inserted again. moveBefore() moves it, and it keeps playing:
if ("moveBefore" in slot) slot.moveBefore(player, null)
else slot.insertBefore(player, null)
7 Yorum
Yorumlar X (Twitter) üzerindeki orijinal gönderiden alınmıştır

@todelsz
you should make an entire article where you write all engineering tips or claude skill
4 beğeni

@zafartalks
Wouldn’t picture-in-picture do the trick instead?
1 beğeni

@itsGrizai
does moveBefore work in safari yet or is it chrome only for now?
1 beğeni

@code_hz
or you can use view-transition
1 beğeni

@dev_with_sam_
did not know moveBefore was a thing yet, this is super useful actually. saves so much state headache

@random11guy
Claude knowns it already haha

@pablomanjarress
finally, move nodes without killing playback
