mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
write head on stream flv mode
This commit is contained in:
parent
7c39556ae1
commit
c11505bacf
@ -25,7 +25,7 @@ const MediaServerConfig = {
|
|||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
port: 1000,
|
port: 1000,
|
||||||
allow_origin: '*'
|
allow_origin: "*"
|
||||||
},
|
},
|
||||||
trans: {
|
trans: {
|
||||||
ffmpeg: ffmpeg.path,
|
ffmpeg: ffmpeg.path,
|
||||||
@ -212,6 +212,11 @@ class StreamingServer {
|
|||||||
// create a buffer stream from the request
|
// create a buffer stream from the request
|
||||||
const bufferStream = request.data.pipe(new stream.PassThrough())
|
const bufferStream = request.data.pipe(new stream.PassThrough())
|
||||||
|
|
||||||
|
res.writeHead(200, {
|
||||||
|
"Cache-Control": "no-cache",
|
||||||
|
"Connection": "keep-alive"
|
||||||
|
})
|
||||||
|
|
||||||
// pipe the buffer stream to the response
|
// pipe the buffer stream to the response
|
||||||
bufferStream.on("data", (chunk) => {
|
bufferStream.on("data", (chunk) => {
|
||||||
res.write(chunk)
|
res.write(chunk)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user