For some reason, when rendering the player across iframe, it causes the
existing player component to get unmounted. This unexpected unmounting
weirdly leaves behind some parts of the DOM even though the React
component behind it was already gone. This only happens in the cross-
window situation.
The main trigger for this bug seems to be a stale passToPersistentPlayer
function (stale because of not having the right dependency array). This
causes the persistent player to get re-rendered unnecessarily whenever
an item is handed off to it (because it thinks the player's not active
every time).
Root cause is still elusive but I think we're close enough.
For some reason, when rendering the player across iframe, it causes the existing player component to get unmounted. This unexpected unmounting weirdly leaves behind some parts of the DOM even though the React component behind it was already gone. This only happens in the cross- window situation.
The main trigger for this bug seems to be a stale passToPersistentPlayer function (stale because of not having the right dependency array). This causes the persistent player to get re-rendered unnecessarily whenever an item is handed off to it (because it thinks the player's not active every time).
Root cause is still elusive but I think we're close enough.
https://user-images.githubusercontent.com/11132446/137428986-470c6c39-e641-4105-87e7-340ab9d5e061.mp4