DannyArends / DaNode

Small and flexible web server written using the D 2.0 language
https://www.dannyarends.nl
GNU General Public License v3.0
60 stars 2 forks source link

Chrome [HTML5] Video Tag does not allow to control a video #29

Open BoQsc opened 2 years ago

BoQsc commented 2 years ago

Low importance issue.

[issue's title says it all, look up the video below.]

Somehow I suspect that this has to do with the Web Server. (DaNode)
Haven't tested on Apache or other Web Servers yet.
But it (HTML video tag) seems to work perfectly for everyone else that do not use DaNode.

https://user-images.githubusercontent.com/21064622/146768482-66840ea5-c33b-4669-84ab-a2eff3075a0f.mp4

Guide to reproduce Temporary live version. (1-2 days)

  1. This is what I've used.

    <video width="320" height="240" controls>
    <source src="1.mp4" type="video/mp4">
    <source src="1.ogg" type="video/ogg">
    Your browser does not support the video tag.
    </video>
  2. Now place a video .mp4 file named 1.mp4 in the same folder alongside.

  3. Place it in the DaNode www/*/ folder

  4. Test things out and see that you can't control the video.

DannyArends commented 2 years ago

Probably has something to do with the player requesting the file in chunks.

In theory the browser asks for Transfer-Encoding field set to "chunked", the server currently doesn't do chunked (it could though).

DaNode should respond appropriately I guess.

Could you capture some of the HTML requests ?

BoQsc commented 2 years ago

Could you capture some of the HTML requests ?

HTML requests

Below this image there are exact values.

image

Values from the image above in the same order:

GET Response

Host: 78.140.136.25
DNT: 1
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Range: bytes=0-
Accept: */*
Referer: http://78.140.136.25/index2.html
Accept-Language: en-US,en;q=0.9,lt-LT;q=0.8,lt;q=0.7

HTTP/1.1 200 Ok
X-Powered-By: Digital Mars D 2.98
Server: DaNode/0.0.3
Date: 20 Dec 2021 10:30:23 CET
Content-Length: 7328150
Last-Modified: 19 Dec 2021 7:10:22 CET
Content-Type: video/mp4
Connection: Keep-Alive


Host: 78.140.136.25
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9,lt-LT;q=0.8,lt;q=0.7


HTTP/1.1 200 Ok
X-Powered-By: Digital Mars D 2.98
Server: DaNode/0.0.3
Content-Encoding: deflate
Date: 20 Dec 2021 10:30:23 CET
Content-Length: 396
Last-Modified: 20 Dec 2021 7:25:13 CET
Content-Type: text/html
Connection: Keep-Alive

Note: Capture software

DannyArends commented 2 years ago

Probably due to the

Range: bytes=0-

Header set/requested, I cannot reproduce it under Firefox, .mp4 seems to play well and can be skipped

BoQsc commented 2 years ago

Header set/requested, I cannot reproduce it under Firefox, .mp4 seems to play well and can be skipped

That's true, Firefox does do everything properly. Only Chrome seemingly affected