2

I'm trying to mock a byte range request for mp4 videos with Wiremock (standalone jar).

My mapping is currently:

{"mappings": [ {
    "request": {
      "method": "GET",
      "urlPathPattern": "/video/(.*?).mp4"
    },
    "response": {
      "status": 206,
      "headers": {
        "Content-Type": "video/mp4",
        "Transfer-Encoding": "chunked",
        "Content-Range": "bytes 0-1023/146515",
        "Content-Length": "1024"
      },
      "bodyFileName": "video/Big_Buck_Bunny_1080_10s_1MB.mp4"
    }
  }
]}

In the frontend I'm using a standard HTML5 video tag.

Unfortunately no video is playing. Is it possible to mock video playback (this way)?

Sebastian
  • 3,379
  • 2
  • 23
  • 39

0 Answers0