max-kamps / jpd-breader

MIT License
102 stars 26 forks source link

Allow popup to be shown on top of most fullscreen videos #59

Open killergerbah opened 1 year ago

killergerbah commented 1 year ago

Currently, when trying to open the popup from text inside an iframe, the popup does not appear. Instead, the popup is created in the parent document where it may not be visible. Allowing the popup to be displayed within iframes is necessary for an asbplayer integration to work, as asbplayer subtitles are displayed within the same iframe as the video element it's bound to.

EDIT: On testing again it looks like the popup does appear inside of iframes. However, on certain sites when the popup will not display when the video is in fullscreen mode. This is the case on e.g. Crunchyroll. asbplayer has to work around a similar issue when placing subtitle DOM on top of fullscreen videos. To do this it searches up the DOM tree until it finds the correct element to place subtitle DOM into, where "correct" means that the subtitle text is clickable.