When an episode in PiP finishes and the player moves to the next one, PiP automatically cancels itself.
From the looks of things, AnimeLab's integration of jwplayer
will completely tear down the <video>
tag and create a new one from scratch for the incoming episode.
You would assume it would be as simple as observing for the new <video>
tag and then calling webkitSetPresentationMode()
on that one, but for some reason, PiP won't activate when I tried that; it would just fail silently. I even checked the WebKit source code to see what could cause it to fail, but couldn't find anything.
In any case, the easiest solution for this would be for AnimeLab to re-use the same <video>
player between episodes.
But if anyone else wants to try and get a 'PiP autorestore' feature working, please feel free to take a crack at it. :D