|
|
@ -1051,21 +1051,20 @@ get "/videoplayback*" do |env|
|
|
|
|
|
|
|
|
|
|
|
|
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
|
|
|
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
|
|
|
|
|
|
|
|
|
|
|
chunk = Bytes[8]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loop do
|
|
|
|
|
|
|
|
count = response.body_io.read(chunk)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin
|
|
|
|
begin
|
|
|
|
env.response.write(chunk)
|
|
|
|
chunk_size = 4096
|
|
|
|
|
|
|
|
size = 1
|
|
|
|
|
|
|
|
while size > 0
|
|
|
|
|
|
|
|
size = IO.copy(response.body_io, env.response.output, chunk_size)
|
|
|
|
env.response.flush
|
|
|
|
env.response.flush
|
|
|
|
|
|
|
|
Fiber.yield
|
|
|
|
|
|
|
|
end
|
|
|
|
rescue ex
|
|
|
|
rescue ex
|
|
|
|
break
|
|
|
|
break
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get "/user/:user" do |env|
|
|
|
|
get "/user/:user" do |env|
|
|
|
|
user = env.params.url["user"]
|
|
|
|
user = env.params.url["user"]
|
|
|
|