Cannot seek further in videos using the player time bar

1. The problem I’m having:

I cannot go further in any video on any player (I tried the simple player on mobile/desktop Edge, Kodi). When I click or tap further on the search bar, it sends me be back to the beginning of the video on Edge and on Kodi (Nvidia Shield TV) the player exits.

I didn’t observe that issue when I was using webfs.

Would you have any idea on how to solve this?
Thank you.

2. Error messages and/or full log output:

3. Caddy version:

v2.7.2

4. How I installed and ran Caddy:

Docker compose

a. System environment:

Docker compose on Debian Bookworm

b. Command:

#!/bin/bash

docker compose pull && \
docker compose up -d --remove-orphans && \
docker image prune -f

c. Service/unit/compose file:

version: "3.9"

services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    network_mode: host
    volumes:
      - ./options:/etc/caddy
      - ./site:/srv
      - /home/user/series:/srv/series
      - /home/user/films:/srv/films
      - /home/user/downloads:/srv/downloads
      - caddy_data:/data
      - caddy_config:/config

volumes:
  caddy_data:
  caddy_config:

d. My almost complete Caddy config:

Domain redacted.



root * /srv
file_server {
        browse /etc/caddy/template.html
}

basicauth /* {
        ID HASH
}

template.html

{{$useragent := .Req.Header.Get "User-Agent"}}
<!DOCTYPE html>
<html><body><table><tbody>
{{- if .CanGoUp}}
  <tr>
    <td><a href="..">..</a></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
{{- end}}
{{range .Items}}
  <tr>
    <td><a href="{{html .URL | replace "./" ""}}">{{html .Name}}</a></td>
    <td>{{.HumanModTime "2006-Jan-02 15:04:05"}}</td>
    <td>{{if .IsDir}}-{{else}}{{.HumanSize | replace " " "" | replace "iB" ""}}{{end}}</td>
    <td>{{if .IsDir}}Directory{{else}}application/octet-stream{{end}}</td>
  </tr>
{{end}}
<tbody></table></body></html>


5. Links to relevant resources:

No idea. I suggest you search the internet for more leads, because this doesn’t seem like a Caddy-specific issue at a glance. We’d need more evidence (debug logs, etc) to have some leads.

Hello, thank you for your reply. Would you know if Caddy supports byte range requests? A feature to allow skipping to another position in a streamed video in the provided file server?
I’ve searched online but cannot find any lead.
Thank you.

There’s no reason why Caddy wouldn’t support it. We proxy the headers as-is to the upstream.

Again, not much we can do to help without debug logs and more evidence, like example curl -v commands showing the behaviour.

Edit: oh sorry I didn’t reread your original post after seeing your reply so I didn’t realize you’re using file_server instead of proxying. So scratch that part.

Still though, evidence is needed.

I just played around with it just for my own info; it works fine. I’m playing an .mp4 served from file_server, with basicauth enabled, and I can skip around in the video with no trouble, on both Chrome and Firefox. Turning on the log directive, I see Content-Range response headers corresponding to the points in the video I skipped to, every time I click in the scrubber bar.

Hello Francis, thanks again for your help. It seems this is an issue with Cloudflare not transmitting the “accept-ranges” header properly. webfs, that used to work fine with byte ranges, stopped working as well. I think I’ll give up.
Thanks for your time.

You can turn off Cloudflare’s proxying by setting it to the “grey cloud” mode. That should fix it.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.