Can't access video file stored in "media" on Safari

You can create a file::url() component that delivers video files from the content folder if you canā€™t find out what might be wrong on the server.

Thank you for digging deeper @texnixe and @manuelmoreale. Iā€™m checking with my server provider now, but tbh I donā€™t think its a problem from their side as well. I requested exactly the same video with Kirby 2 before and that always workedā€¦

Could you post your .htaccess, please? Is that project on shared hosting? Which provider?

As I said, your exact same video, on a kirby 3 installation, works just fine in safari. So itā€™s most likely a combination of Kirby and your specific server setup.

Hereā€™s my .htaccess file. Itā€™s basically the one from the starterkit with some additions to force https, www and removing of trailing slashes.

# Kirby .htaccess

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]

# Remove multiple slashes after domain
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$
RewriteRule .* https://www.%{HTTP_HOST}/%1 [R=301,L]

# Remove multiple slashes anywhere in URL
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]

# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite

# In some environments it's necessary to
# set the RewriteBase to:
#
# RewriteBase /

# block files and folders beginning with a dot, such as .git
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
RewriteRule (^|/)\.(?!well-known\/) index.php [L]

# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]

# block all files in the site folder from being accessed directly
# except for requests to plugin assets files
RewriteRule ^site/(.*) index.php [L]

# Enable authentication header
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

# block direct access to kirby and the panel sources
RewriteRule ^kirby/(.*) index.php [L]

# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

</IfModule>

# compress text file responses
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

and itā€™s on a shared swiss provider called cyon.

Any chance you can send my a zip with your site? I also use MAMP and what i tested worked just fine so maybe itā€™s something else thatā€™s messing the video. Iā€™m happy to give it a check if you want.

Alternatively, set up a fresh Starterkit on that same server/your Mamp environment with that video. No plugins, no Javascriptā€¦

I think your missing Accept-Ranges header is causing this. Try to put a .htaccess file into the media folder with the only content:

Header set Accept-Ranges ā€œbytesā€

and check afterwards (with wget -S or similar tools) if the header is now there and set to bytes, then check your video.

We are currently trying to debug this, it seems to be an issue with the multi-site setup, not the server side of things.

Forgive me if I sound off-topic, because I donā€™t understand some of the things in this thread.
I had the same issue that a video did not load in safari only, safari said ā€œfail to loadā€ in the console. It was resolved after I removed ā€œposition: fixedā€ from the video.