Comments (14)
Thanks @benoit74 for isolating that. I'll look into it. I hadn't tested on macOS yet, only on Safari for iOS. Note I don't do any processing of video in the PWA or Browser Extesnion for Zimit2, and I don't block Safari in any way. The URL transformations are happening in the code loaded from the ZIM, not in the PWA loading code, but I'll check this.
from kiwix-js.
I'm more inclined toward a weird Safari/JS bug linked to PWA + Youtube player JS + Safari.
Nota: should it help you, video is served at https://dev.library.kiwix.org/content/mes-quartiers-chinois_fr_all_2024-05/youtube.fuzzy.replayweb.page/videoplayback%3Fid%3Do-AB_-44JyE8Kx3EbRwXtKcWWsfTqj9tDWRqJCbisVNt8A
from kiwix-js.
Thanks, I reproduce the issue with Girona video on macOS Ventura on Safari 17.1 with both https://pwa.kiwix.org and https://browser-extension.kiwix.org (this is the PWA that underlies the Browser Extensions in ServiceWorker mode).
I also confirm that that the video works in same machine and OS in Firefox in the PWA and in browser-extension.kiwix.org.
And I've checked that in the Kiwix Serve version of the mequartierschinois ZIM the video works in Safari on iPad, iPhone and macOS, all using Safari 17+.
So we have some weird bug only in Safari when the videos are being served from a Service Worker that extracts the content from the ZIM. I need to check if we're setting headers for partial video content inside the Service Worker when the BLOB is returned from the ZIM. It's possible Safari doesn't understand the way headers are being set, whereas Firefox and Chrome do. That's the only place I can think of where any "processing" occurs. Needs debugging...
from kiwix-js.
Good luck !
Might be an issue on how zimit2 writes something where Safari is less permissive than Firefox and Chrome.
But at least I need your help to investigate, I lack skills in debugging Service Workers.
If it looks like the issue you find is not likely to be produced by another scraper, then I don't mind to implement the fix in zimit2. At least I would prefer you do not have something like "if zimit2_zim then ..." in your codebase.
from kiwix-js.
No, don't worry, I wouldn't do that, not when it's working fine in two of the three most important browsers. I'll share any solution I find, but I suspect it will be specific to the emulation of a steaming server inside our Service Worker.
from kiwix-js.
Potentially related discovery: TED Talks video appears not to work on iOS Safari (17+) in Kiwix Serve. N.B. it works on macOS Safari. E.g. https://library.kiwix.org/viewer#ted_en_playlist-5-questions-about-climate-change_2022-08/index on an iPhone or iPad (tested via BrowserStack Live). Nothing very informative in console log except some information about a WASM compile failure (which seems odd, because Kiwix Serve doesn't rely on WASM, but it could be something in the ZIM that is trying to compile a player, possibly video-js). I'll check for such an issue on the relevant Repo and open one if there is none, but I'm documenting it here as well.
from kiwix-js.
No obvious issues on kiwix-tools, openzim/ted or openzim/youtube Repos. Since Zimit2 video works in Kiwix Serve on iOS, it doesn't appear to be a Kiwix Serve issue, And it's probably more generic than TED. It's probably somewhere upstream in a component of the video player used.
from kiwix-js.
Videos from TED and youtube are known to have problems on Safari with WebM preset v1. Issues have already been solved and closed (openzim/ted#145 and openzim/youtube#181 and openzim/youtube#33).
These videos should be reencoded with WebM preset v2 (few have been in dev library, e.g. https://dev.library.kiwix.org/viewer#ted_mul_humanities_2024-04) but we are not yet releasing it into the wild because we suspect we might transition soon to a preset v3 based on VP9 (instead of VP8).
You most probably already know it, but note that youtube/ted setup is totally different from Zimit because:
- in youtube / ted the video is reencoded by us where we keep the raw stream in zimit
- in youtube / ted we use the video.js player where we keep the original player in zimit (Youtube player here)
WebM preset used: https://github.com/openzim/python-scraperlib/blob/7d498319baadba715316c15cf9857ff2f6974a00/src/zimscraperlib/video/presets.py#L33
Issue about VP9 transition: openzim/python-scraperlib#79
from kiwix-js.
@benoit74 Thank you for the very helpful info. I was aware that TED/YouTube use webm and the zimit2 whatever was scraped (usually mp4), but thought that it might be some common Safari issue that is also hitting me. I think that's pretty much ruled out now, but it'll be useful to test KJS playback of the new VP8 format on Safari to help isolate what's going wrong in the KJS readers (or to find out what works). 🙏
from kiwix-js.
The videos in ZIM ted_mul_humanities_2024-04
play in the PWA on Safari 17 on iOS/iPhone 15 Max Pro (apart from exhibiting the bug mentioned here: openzim/ted#145 (comment) - you have to exit fullscreen, then play inline). This at least gives some basis for finding out how to serve zimit2 video in an iOS-Safari-friendly way in the KJS Service Worker, albeit video.js is probably doing some fancy stuff and it's webm not mp4.
from kiwix-js.
Note: video on Safari on iOS in Browser Extension and PWA now works with YouTube videos in the new format. I didn't do anything, it's the new format that now works fine. Tested on project-fuel_en_2024-08.zim
. Not sure what the significance of this is for Zimit2, if at all, but it's good to know it can be played.
from kiwix-js.
project-fuel is a youtube ZIM, not zimit 😞
from kiwix-js.
(youtube ZIM are not using the youtube player which is used in website scraped by zimit, it directly loads the video with video.js player)
from kiwix-js.
project-fuel is a youtube ZIM, not zimit 😞
Yes, I was aware of that, but as videos didn't work reliably (with big bugs) before on Safari iOS (in PWA / KJS), and now they work perfectly with the new format, I was hopeful that there might be a common underlying cause. But I was also pretty doubtful, just wanted to confirm with you that the fix was completely unrelated, which it seems it is. Thank you!
from kiwix-js.
Related Issues (20)
- Possibly work around need to add final slash to root URLs when checking a link clicked by user
- Test if JQuery can be fully removed by upgrading Bootstrap HOT 5
- Consider adding support for calling a local (or remote) LLM API to manipulate article contents HOT 4
- Update the firefox extension add-ons link in the README file HOT 1
- Support Xapian title index (via libzim) - aka "suggestions" HOT 2
- Add ZIM info to the security dialogue box when opening a ZIM for the first time HOT 6
- Create new function in uiUtil.js to navigate to the opened ZIM in order to reduce redundancy HOT 5
- Support Safari extensions (for macOS)
- Extend popover support to new tabs or windows
- When opening a folder of archives with FSA API, do not jump straight to the first file HOT 1
- Wait longer for the SW to cache assets before rebooting if the SW fails to register
- Users seem confused when the Chrome extension won't do some stuff in ServiceWorkerLocal mode HOT 9
- When displaying external link dialogue box from zimit2 archives, we need to decode the over-encoded querystring HOT 6
- Rename "Safe Mode" to "Restricted Mode"
- Add filtering for custom URI schemata (e.g. `mailto:`, `skype:`) to the filterClickEvent to force these to open outside the sandbox HOT 2
- Release v4.1.0 HOT 9
- In zimit2 ZIMs, pages that do not have an overflow cannot swipe away the menu and nav bar HOT 4
- Display of main article sections broken in Restricted mode for new mobile html endpoint Wikimedia ZIMs
- Brief article description is showing inappropriately in popovers from Wikivoyage (at least) ZIMs scraped from new mobile HTML endpoint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiwix-js.