I can’t seem to seek medias (videos) in encrypted libraries in both web and mobile clients, in mobile clients whenever i tried seeking / jumping forward to a point in a video, it just loads infinitely. In web client, the video just restarts (teleporting back to the beginning of the video when I tried.) Is this normal behavior? It only happens to encrypted libraries and otherwise fine with normal libraries.
This behavior is a known limitation of encrypted libraries in Seafile.
The reason seeking (jumping to a different time in a video) does not work in encrypted libraries is due to how security is implemented:
- Server-side Encryption: In encrypted libraries, files are encrypted into blocks using AES-256-CBC. Crucially, the Seafile server does not store your library password.
- HTTP Range Requests: Seeking in a video requires the player to make “Range requests” (requesting a specific byte range of the file). For the server to fulfill a range request for an encrypted file, it would need to decrypt the specific blocks corresponding to that timestamp on the fly.
- Security Model: Since the server doesn’t have your password, it cannot decrypt those specific parts of the file to serve them to the browser or mobile app.
In contrast, standard (unencrypted) libraries allow the server to easily serve any byte range of a file, which is why seeking works perfectly there.
Workaround:
To have full playback control (seeking, jumping forward) for videos in encrypted libraries, you will need to download the file to your device first and play it using a local media player.
For more information on how Seafile handles encryption, you can refer to the Security Features documentation.