Video wird geladen...
Video konnte nicht geladen werden
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)
17,129 Aufrufe • vor 1 Monat •via X (Twitter)
7 Kommentare

Todels ☁vor 1 Monat
you should make an entire article where you write all engineering tips or claude skill

Zafarvor 1 Monat
Wouldn’t picture-in-picture do the trick instead?

Grizvor 1 Monat
does moveBefore work in safari yet or is it chrome only for now?

Code Hzvor 1 Monat
or you can use view-transition

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

יוסיvor 1 Monat
Claude knowns it already haha

Pablo Manjarresvor 1 Monat
finally, move nodes without killing playback

