Conversation
android/src/main/kotlin/me/albemala/native_video_player/NativeVideoPlayerViewController.kt
Outdated
Show resolved
Hide resolved
f8cc6fd to
8f473bd
Compare
69db7b1 to
c4cdb27
Compare
|
Looking forward to this PR. I tried to evaluate seeking a bit and for local files the iOS Photos app is super smooth while Immich is certainly less smooth (just for clarification, both have been tested with local files). It indeed looks as if this is due to seconds vs. milliseconds precision. I also tried seeking videos from the Immich server (H.265 1080p30 Dolby Vision recorded with an iPhone 16 Pro). Server is a Raspberry Pi 5 (8 GB) (content is stored on a PCIe 3.0 SSD) and Wi-Fi speed to the server is around 300 mbps on an iPhone 16 Pro: I don't really know what to expect here but obviously it is much more choppy compared to local files. [EDIT] Plex on NAS (with HDD) streaming Blu-ray content (1080p24 H.264, avg. bitrate 29.9 Mb/s) without transcoding: YouTube (1080p60 HDR) over 100mbps Internet: |
|
Seeking local files is still much smoother with the Apple Photos app. May it be that millisecond accuracy can cause a regression for network file playback? I was under the impression that there have been less updates when moving the slider. iPerf3 speed has been measured at around 400 mbps. |

This PR changes the player APIs from using seconds to milliseconds, allowing for much more precise seeking and position updates. It updates the position up to every 1/120 seconds so as to keep fluidity for high frame rate videos. Because the volume of updates is higher, it also makes optimizations to lower the amount of communication needed between the Dart and platform side. Specifically, the position is now polled on the platform side and not emitted to Dart unless the value is actually different from the last one.
Tested on a branch using these changes in the main Immich app on iOS and Android.
Based on #10, which should be merged first.