fix streaming issue with Safari
This commit is contained in:
parent
b0710671b3
commit
7b1d712904
|
@ -28,6 +28,16 @@ export async function GET(req: Request, { params }: GetParams) {
|
||||||
responseType: "stream",
|
responseType: "stream",
|
||||||
});
|
});
|
||||||
|
|
||||||
return new Response(response.data);
|
const headers = new Headers();
|
||||||
|
|
||||||
|
headers.set('Content-Type', 'video/mp4');
|
||||||
|
headers.set('Cache-Control', 'no-cache');
|
||||||
|
headers.set('Accept-Ranges', 'bytes');
|
||||||
|
headers.set('Content-Length', response.headers['content-length']);
|
||||||
|
headers.set('Content-Disposition', 'inline');
|
||||||
|
|
||||||
|
return new Response(response.data, {
|
||||||
|
headers,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue