Video - route - loading

I’ve a problem with videos.

When I load pictures I use a thumb server route. So I give the file:// and in responds I get a picture.

https://mdobler.uber.space/thumbserver/file://YkHGh8l1ebSzycJt?size_id=3

This is my input! And when I open this link I get a picture direkt in the browser or in other words my mobile app loads the picture. Works like a charm.

Now my question. Is there any way to do the same with a video?

Do you mean create different versions of video files, similar to how you can select different video types and resolutions from YouTube and the like?

No, if you klick my link the picture opens in the browser!

I just would like a link opening a video direkt in the browser. No modifications needed.

At the moment I use this:

https://mdobler.uber.space/videourl/file://oQVwrPm9GM4R4HVz

But then I’ve to load the location in my app. Would be great to get the video direct

The problem is that to display a video, you need an html video tag, not just a link to a file

When I call a video directly its playing without any html:

https://mdobler.uber.space/1.mp4

Please post the code for this route.

At the moment, I’m getting the url from the file and return it as a json. Here is my code:

    //
    // video url
    //

    [
      'pattern' => 'videourl/(:any)',
      'action'  => function ($fileUuid) {
        $file = site()->index()->files()->findBy('uuid', 'file://' . $fileUuid);
        $videoUrl = $file->url();
        $json = '{"video_url":"'.$videoUrl.'"}';
        return $json;
        }
    ],