I have 2 different servers running Apache and while MP4 plays ok on one server it does not play on the other server. The code used is...
<video width='560' height='320' controls='' oncontextmenu='return false;' poster="big_buck_bunny.jpg" playsinline>
<source src='https://example.com/big_buck_bunny.mp4' type='video/mp4'>
</video>
The html is identical on both pages. Apache directives and .htaccess files are identical. Mimetypes are identical. The only difference that I can find is that one server is CentOS 8.4 (works ok) and the other server is CentOS 7.9 (not working).
When I click the play button nothing happens, no error messages, nothing.
Both test pages play html5 video on all other devices, ie: Windows, Mac and Android. But on iPhone only one of our Apache servers play it. The same html and resource plays from Windows Server 2019 in iPhone no problem.
Changing video type is not an option and should not be necessary as most servers can play this MP4 embedded on a page as html5. Unfortunately the server that doesn't play for iPhone is our main production server, so I need to get that working somehow.
In response to suggestions that it may be due to byte-range, I did run a test and got this result...
curl -i -X HEAD --header "Range: bytes=50-100" https://example.com/big_buck_bunny.mp4
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 5381k 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
0 5381k 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
0 5381k 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0
0 5381k 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0
0 5381k 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
0 5381k 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0
curl: (18) transfer closed with 5510872 bytes remaining to read
HTTP/1.1 200 OK
Date: Mon, 18 Oct 2021 21:58:50 GMT
Server: Apache
Last-Modified: Mon, 18 Oct 2021 00:02:20 GMT
ETag: "5416d8-5ce95423c3038"
Accept-Ranges: bytes
Content-Length: 5510872
Content-Type: video/mp4
This suggests that byte-range is not the problem, right? It is only iPhone that fails to play this video. Windows, Mac OSX and Android browsers work ok.