openzim / overview

:balloon: Start here for current projects, how to get involved, and joining community calls. A resource for new and veteran members of the offline commmunity
2 stars 1 forks source link

Do we still need the WebP/WebM polyfill in our ZIMs? How to test these in 2024? #36

Open benoit74 opened 1 month ago

benoit74 commented 1 month ago

Should we stop to include WebP and WebM polyfills in our ZIM?

Or maybe a simpler question: which platform should I use to test that these polyfills are working properly for the new Youtube UI? Our machines are way too "recent", and the Fondation Orange tablets are either too old (v1?) and do not load at all the new Vue.JS application running inside the ZIM or too "recent" (2021) and supports WebP and WebM natively.

Given what is currently suggested in https://github.com/kiwix/libkiwix/issues/1029#issuecomment-2144594990 in terms of browser support, it looks like WebP and WebM are now supported on all our target browsers. So this covers kiwix-serve and all KJS/pwa/... readers.

For other readers, it might be another question.

I do not expect to have an issue on Android since are target is now quite recent (I don't recall exactly the API level / OS we target).

Same for apple readers which now on support MacOS 13 and I don't recall the exact iOS version.

For Linux and Windows readers, I don't know.

@Jaifroid @kelson42 @mgautierfr @rgaudin @BPerlakiH what are your views on this question?

benoit74 commented 3 weeks ago

Discussed a bit in yesterday meeting: we need to make a distinction between what we engage to support (https://github.com/kiwix/libkiwix/issues/1029#issuecomment-2144594990) and what we target to not break intentionally.

Here dropping the webp / webm polyfills would mean that we intentionally drop support for many old browsers, which is something we would like to avoid.

Regarding how to test this, publicly exposed kiwix-serve + old browsers on browserstack.com seems to be the perfect solution.

Jaifroid commented 3 weeks ago

I can only really comment from the KJS angle. We were forced to include our own WebP polyfill because the browsers that did not support WebP were also the browsers that did not support Service Workers (with some very minor exceptions), so couldn't load the provided polfyill. Hence, we test for WebP support on launch of the app and insert our polyfill if needed. In ServiceWorker mode we don't do this and the provided polyfill will load, but to be honest, in that mode it's never actually used.

So, if the WebP polyfill were removed, it wouldn't affect KJS or the PWA. It could affect Kiwix Serve, but it's worth checking which browsers that do not support WebP can actually load the Kiwix Serve UI.

I'm not sure about WebM. I haven't seen that in practice. We would need to identify which browsers are affected, but aren't we reverting to MP4 anyway?

benoit74 commented 3 weeks ago

aren't we reverting to MP4 anyway?

Not sure where we are on this effort now that webm is well supported on all readers including safari/iOS/macOS latest versions.