check visibility, add quater css

This commit is contained in:
j 2022-09-26 13:35:41 +01:00
commit c32d2ec57a
2 changed files with 9 additions and 4 deletions

View file

@ -173,8 +173,9 @@ function renderAnnotation(config, video, root, clip) {
updatePlayer(video, frame, annotation['in'], annotation['out'], src, config)
}
}))
console.log('add resize')
window.addEventListener('resize', () => {
var visible = isElementInViewport(frame);
var visible = video._frame == frame;
if (config.loaded && visible) {
updatePlayerRect(video, frame, config)
}