- Joined
- Dec 25, 2020
Meanwhile my clanker gave me a function that fixes it in a broken video, and gave me this as well. What's really stupid is that when it spawned a MCP-controlled window, the players worked normally from the getgo. I thought maybe it was because i was not logged in, but no, a private window still made it broken, as did trying this out in a fresh profile with no extensions. I even thought of changing to the light style (i use dark exclusively), but no.
I'll redo your test now
I'll redo your test now
In Safari 27.0.1, the player’s wrappers measure 177.1875 × 315px, but the native <video> inside hlsjs-video.shadowRoot measures 177.1875 × 640px during playback.
The video stylesheet specifies height: 100%, yet the resulting height equals the stream’s intrinsic height, 640px. With object-fit: contain and object-position: 50% 50%, this places the picture 162.5px too low inside the player. The enclosing player clips it.
Setting the video height to 315px immediately corrects the displacement. Replacing that diagnostic with the following also corrects the broken player:
/* Inside hlsjs-video's shadow-root stylesheet */
video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
}
Preserve the existing object-fit: contain. An ordinary page-level CSS selector cannot reach this shadow-root video.
Reproduction page: https://kiwifarms.st/threads/random-pics-gifs-and-vids.1234/post-25633742
Reproduces in ordinary Safari, including an empty profile with extensions disabled. Did not reproduce in the Safari automation session.
(() => {
const video = document.querySelector('#media-9629638')
?.querySelector('hlsjs-video')?.shadowRoot?.querySelector('video');
if (!video) return 'Player not found—select the affected page in Console.';
if (typeof window.undoVideoHeightTest === 'function') {
window.undoVideoHeightTest();
}
const original = video.getAttribute('style');
window.undoVideoLayoutTest = () => {
if (original === null) video.removeAttribute('style');
else video.setAttribute('style', original);
};
for (const [property, value] of Object.entries({
position: 'absolute',
inset: '0',
width: '100%',
height: '100%'
})) {
video.style.setProperty(property, value, 'important');
}
console.log(video.getBoundingClientRect().toJSON());
})();