Kiwix-android: Video seeking does not work anymore with 3.4.2

Created on 1 Dec 2020  Â·  16Comments  Â·  Source: kiwix/kiwix-android

Testing with https://download.kiwix.org/zim/other/mali-pour-les-nuls_fr_all_2020-12.zim.
If I click on the progressbar, the cursor is always put to the start.

bug question

All 16 comments

@macgills @rgaudin Something new? Or something you are aware of?

Let me confirm the behaviour of 3.4.1, see if a regression exists between the 2

Introduced in 3.4.2. Investigating further

Service Worker related, more investigation required.

@macgills Just to be clear: the test ZIM given on this ticket does not have any SW.

I am aware. Right now it looks like the change in addressing scheme means that our code for loading videos does not get called, in a surprising turn of events

Yeah confirmed, post the change to https the app is not in charge of loading videos. They get loaded independently.... I have no immediate ideas?

image
This override should be getting hit but isn't

after clicking on the progressbar with old scheme

2020-12-02 10:37:37.457 org.kiwix.kiwixmobile I/chromium: [INFO:CONSOLE(12)] "Unable to preventDefault inside passive event listener invocation.", source: zim://content/-/assets/videojs/video.min.js (12)
2020-12-02 10:37:37.457 org.kiwix.kiwixmobile I/chromium: [INFO:CONSOLE(12)] "Unable to preventDefault inside passive event listener invocation.", source: zim://content/-/assets/videojs/video.min.js (12)
2020-12-02 10:37:37.492 org.kiwix.kiwixmobile E/WebClient: shouldInterceptRequest: zim://content/I/videos/141/video.webm
2020-12-02 10:37:37.493 org.kiwix.kiwixmobile D/ZimFileReader: getting mimetype for zim://content/I/videos/141/video.webm = video/webm
2020-12-02 10:37:37.493 org.kiwix.kiwixmobile E/ZimFileReader: loading asset zim://content/I/videos/141/video.webm
2020-12-02 10:37:37.520 org.kiwix.kiwixmobile W/AudioManager: Use of stream types is deprecated for operations other than volume control
2020-12-02 10:37:37.520 org.kiwix.kiwixmobile W/AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2020-12-02 10:37:37.551 org.kiwix.kiwixmobile W/AudioManager: Use of stream types is deprecated for operations other than volume control
2020-12-02 10:37:37.551 org.kiwix.kiwixmobile W/AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2020-12-02 10:37:37.584 org.kiwix.kiwixmobile E/WebClient: shouldInterceptRequest: zim://content/I/videos/141/video.webm
2020-12-02 10:37:37.585 org.kiwix.kiwixmobile D/ZimFileReader: getting mimetype for zim://content/I/videos/141/video.webm = video/webm
2020-12-02 10:37:37.587 org.kiwix.kiwixmobile E/ZimFileReader: loading asset zim://content/I/videos/141/video.webm
2020-12-02 10:37:56.704 org.kiwix.kiwixmobile D/AudioTrack: stop() called with 1313470 frames delivered

clicking on progressbar with new scheme

2020-12-02 10:40:20.186 org.kiwix.kiwixmobile I/chromium: [INFO:CONSOLE(12)] "Unable to preventDefault inside passive event listener invocation.", source: https://kiwix.app/-/assets/videojs/video.min.js (12)
2020-12-02 10:40:20.186 org.kiwix.kiwixmobile I/chromium: [INFO:CONSOLE(12)] "Unable to preventDefault inside passive event listener invocation.", source: https://kiwix.app/-/assets/videojs/video.min.js (12)
2020-12-02 10:40:20.278 org.kiwix.kiwixmobile W/AudioManager: Use of stream types is deprecated for operations other than volume control
2020-12-02 10:40:20.278 org.kiwix.kiwixmobile W/AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case
2020-12-02 10:40:20.319 org.kiwix.kiwixmobile W/AudioManager: Use of stream types is deprecated for operations other than volume control
2020-12-02 10:40:20.319 org.kiwix.kiwixmobile W/AudioManager: See the documentation of requestAudioFocus() for what to use instead with android.media.AudioAttributes to qualify your playback use case

Have hit a brick wall. Unsure of how to get more information on wtf is happening and not seeing a way forward that doesn't involve disabling SW support by changing scheme

@macgills OK, we will need to have a look in depth again, but this week and next week are already full booked.

@macgills After talking with @rgaudin it seems it was working, see https://github.com/kiwix/kiwix-android/issues/2347#issuecomment-700019433. So with https://github.com/kiwix/kiwix-android/pull/2406 it was working. It would be good to confirm and see what has changed in the meantime.

ah, must have screwed up when I was reverting service workers, I'll get started on patching it back in

Haven't looked at the 3.4.1 vs 3.4.2 diff but IMO the only service-worker related work was regarding the unregistration of those and I wouldn't think it would affect this. But looking at this part kind of contradicts what I just said.

What surprises me is the following:

-    const val CONTENT_PREFIX = "zim://content/"
+    const val CONTENT_PREFIX = "https://kiwix.app/"

How come we had the SW working in 3.4.1 if the content was accessed using zim://content? Or maybe it wasn't and that was reserved to some non-zim stuff? Can you elaborate a bit on this change?
I guess changing this and the shouldIntercept stuff kind of moved video handling out of where it was supposed to be handled but given it was working, that seems fixable.

We decided to go ahead with reverting service worker support for 3.4.1 and support was moved to 3.4.2, when reverting changes I overdid it. Re-adding your work should be sufficient. I'll know in a few moments and hopefully have a PR out soon

Ah… got it now

Was this page helpful?
0 / 5 - 0 ratings