mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Fix for video in safari
Video doesn't work safari. It seem to be to do with the content-range header. Safari initially asked for the first byte. However with a single byte request, the header outputs `bytes 0-0/1000` (if this file is 1000 bytes in size) It does work however if we make the end value 1. But removing the `-1` breaks it in chrome. So I suggest this change, which means the end can't be smaller than 1.
This commit is contained in:
		
							parent
							
								
									00981bcf44
								
							
						
					
					
						commit
						81f2ee7815
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -156,7 +156,7 @@ private def multipart(file, env : HTTP::Server::Context) | |||
|     env.response.status_code = 206 | ||||
|     env.response.content_length = endb - startb | ||||
|     env.response.headers["Accept-Ranges"] = "bytes" | ||||
|     env.response.headers["Content-Range"] = "bytes #{startb}-#{endb - 1}/#{fileb}" # MUST | ||||
|     env.response.headers["Content-Range"] = "bytes #{startb}-#{endb > 1 ? endb - 1 : 1}/#{fileb}" # MUST | ||||
| 
 | ||||
|     if startb > 1024 | ||||
|       skipped = 0 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue