title: Morphing Video
tags: ts-swap
id: video
----
<p>This is a hard problem to solve with other algorithms (notably, morphdom gets
  it wrong). HTML structure is changed a lot, and element with an
  <code>id</code> is deep (enough) inside that structure, but Youtube video
  still plays after change.
</p>

<div class="card example">
  <div class="card-header">
    <h5 class="d-inline mr-2">Demo</h5>
    <button class="btn btn-link btn-sm reset">Reset</button>
    <button class="btn btn-link btn-sm source">V