Open cedricium opened 2 years ago
The mentioned video is not completely hidden, but blinking erratically every 350 to 500 ms. Buckle up for a run through an async adventure.
Hellosaurus uses two relatively placed and overlapping videos and a slider that is hiding the overflow of the other video to show a comparison.
As the videos are positioned relative and the VSC Controller is also placed relative, it's inheriting it's styles. Especially the height: 100%
property, which forces the video to be completely in the hidden overflow and therefore seem to not be rendered anymore. We have two possible solutions here:
<div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;"></div>
to prevent inheriting styles. This could have major side-effects like preventing click propagation or interfering with positioning in some exotic players. The advantage here would be, that it's much more generic and could fix issues with a lot more sites, but at least it's only used in a handful of them, as we should only apply this fix, if the parent of the controller is also positioned relative.width: 100%
, and we would have to fixate a whole bunch of them or start an investigation for each.I personally more tend to solution one, but can not provide much experience in the world of exotic player setups and therefore this decision should be up to the main maintainers of VSC.
So it should be clear by now, that the blinking is caused, by the VSC Controller hiding and showing periodically. So what are the reasons for that? Several actually, let's take a look:
<video>
events, meaning, that the controller is shown again and restarting the cycle.index-15f810c74a6f04b2.js
. We can crudely, for development purposes, fix that by running qsa = document.querySelectorAll; document.querySelectorAll = (...a) => a[0] != ".vsc-controller" ? qsa.bind(document)(...a) : []
in the console:
window.setInterval((function() {
document.querySelectorAll(".vsc-controller").forEach((function(e) {
return e.classList.add("vsc-hidden")
}
))
}
), 500)
vsc-manual
.vcs-show
is not defined. I mean, this one is obvious, as it should be vsc-show
after all, but man, did I often read over this typo and wondered, why it's not applying my changes. A typo that needs urgent fixing, fortunately, this can't break anything as vsc-show
is also not defined! So that might be the issue aswellPlease take a look and let me know if you still have open questions and of what you think of the proposed solutions. These are only tested prototypically but I'd be open to create a PR for the above issues. These are the things I would like to update:
vcs-show
to vsc-show
in all occurrences
Steps to Reproduce:
Expected: Comparison slider shows two videos side by side. Actual: The two videos in the comparison slider are hidden/not displayed. Disabling this extension causes the page to work as expected.