lbry-desktop/ui/component/viewers
infinite-persistence 7cbb7a54aa
Handle browsers that don't support IntersectionObserver (#1739)
* Remove ad-handling in videojs.jsx

Primary impetus is to remove unnecessary IntersectionObserver usage, but it should be removed anyway because:
- no longer relevant today with Adnimation's script.
- we also globally hide floating ads now, so no more invisible divs.
- the code is wrongly placed -- it's not the responsibility of the Videojs component.

* use-lazy-loaded: skip if IntersectionObserver is not supported

## Issue
Page not loading in older Safari (e.g. ipad air 2)

## Approach
Instead of using a polyfill (which comes with implementation caveats), just not apply the lazy-loading for those old browsers. Not lazy-loading is better than not loading at all, plus this is way easier to test (even by just reading the code) than testing out the polyfill implementation's caveats.

The cons is we would need the polyfill if we use it in other places in the future.

## Code Changes
Factor out the src-setting code, and use it directly when IntersectionObserver is not found.
2022-06-23 08:10:27 -04:00
..
appViewer Desktop cherry-pick: "7240 Integrate lbry redux and lbryinc" 2021-10-19 20:40:07 +08:00
threeViewer Fix and enable 3D viewer: #4035 2020-04-27 14:27:04 -04:00
videoViewer Handle browsers that don't support IntersectionObserver (#1739) 2022-06-23 08:10:27 -04:00
codeViewer.jsx Remove alert 2020-02-07 09:21:28 -05:00
comicBookViewer.jsx fix comic-book content-type detection 2020-05-13 10:18:36 -04:00
documentViewer.jsx Improve CLS on Posts 2021-07-22 10:38:01 +08:00
docxViewer.jsx semi-broken 2020-04-29 11:00:42 -04:00
htmlViewer.jsx semi-broken 2020-04-29 11:00:42 -04:00
imageViewer.jsx Open ZoomableImage viewer when clicking on the image 2021-02-19 14:05:51 -05:00
pdfViewer.jsx semi-broken 2020-04-29 11:00:42 -04:00