xperseguers / t3ext-fal-protect

This extension protects everything within fileadmin/ based on associated file restrictions.
https://extensions.typo3.org/extension/fal_protect
GNU General Public License v2.0
11 stars 7 forks source link

MP4 file not playing in Safari #25

Closed cdaecke closed 4 years ago

cdaecke commented 4 years ago

I noticed, that MP4 videos are not playing in Safari (with, or without the changes of #22). The size of the video does not matter. Even small files won't be shown.

Maybe the linked page in the answer on Stackoverflow helps: https://www.techstruggles.com/mp3-streaming-for-apple-iphone-with-php-readfile-file_get_contents-fail/

xperseguers commented 4 years ago

@cdaecke I thought of this problematic as we discussed your problem. Thanks for the ticket and link to the code on SO. I'd like you to test the PR.

cdaecke commented 4 years ago

Hi @xperseguers, unfortunately the change in #26 does not help to make it work on Safari :-(

Maybe the network log of Safari helps:

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "WebKit Web Inspector",
      "version": "605.1.15"
    },
    "pages": [
      {
        "startedDateTime": "2020-11-24T09:38:57.342Z",
        "id": "page_0",
        "title": "http://test.localhost/fileadmin/Daten/file_example_MP4_480_1_5MG.mp4",
        "pageTimings": {
          "onContentLoad": 699690.3748200003,
          "onLoad": 699847.850094
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_0",
        "startedDateTime": "2020-11-24T09:38:57.484Z",
        "time": 0.27692799994838424,
        "request": {
          "method": "GET",
          "url": "http://test.localhost/fileadmin/Daten/file_example_MP4_480_1_5MG.mp4",
          "httpVersion": "",
          "cookies": [],
          "headers": [],
          "queryString": [],
          "headersSize": -1,
          "bodySize": -1
        },
        "response": {
          "status": 0,
          "statusText": "",
          "httpVersion": "",
          "cookies": [],
          "headers": [],
          "content": {
            "size": 0,
            "compression": 0,
            "mimeType": "video/mp4"
          },
          "redirectURL": "",
          "headersSize": -1,
          "bodySize": -1
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": -1,
          "connect": -1,
          "ssl": -1,
          "send": 0,
          "wait": 0.2499960000932333,
          "receive": 0.026931999855150934
        }
      }
    ]
  }
}

The video I am testing with was taken from File Examples website (direct link):

cdaecke commented 4 years ago

Unfortunately #26 breaks Firefox as well. I get No video with supported format and MIME type found again.

xperseguers commented 4 years ago

I can indeed reproduce the problem, my fault, will fix and enhance.

xperseguers commented 4 years ago

The code in SO was slightly buggy, I prepared the PR blindly...

cdaecke commented 4 years ago

Nice, nice, nice, it is working! Thanks a lot!

The code in SO was slightly buggy, I prepared the PR blindly...

No problem at all!

Did I tell you, that I like your slick extension a lot? It is very focussed, clean and straight forward. Thanks a lot again!