backend: Add support for range requests and improve media retrieval headers
This commit is contained in:
parent
f841f55c71
commit
b5b7776200
4
backend/openapi/components/headers/accept-ranges.yaml
Normal file
4
backend/openapi/components/headers/accept-ranges.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
description: Indicates that the server supports range requests for content retrieval
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: bytes
|
||||||
4
backend/openapi/components/headers/cache-control.yaml
Normal file
4
backend/openapi/components/headers/cache-control.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
description: Directives for caching mechanisms in requests/responses
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: public, max-age=3600
|
||||||
3
backend/openapi/components/headers/content-length.yaml
Normal file
3
backend/openapi/components/headers/content-length.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
description: The size of the content in bytes
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
4
backend/openapi/components/headers/content-range.yaml
Normal file
4
backend/openapi/components/headers/content-range.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
description: Specifies the range of bytes being sent and the total size of the resource
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: bytes 0-1023/10240
|
||||||
@ -2,7 +2,10 @@ name: Range
|
|||||||
in: header
|
in: header
|
||||||
required: false
|
required: false
|
||||||
description: >
|
description: >
|
||||||
Byte range for partial content retrieval.
|
This endpoint accepts a `Range` header to specify the byte range of the recording file to be streamed.
|
||||||
Example: `bytes=0-1023` to request the first 1024 bytes of the file.
|
The format of the `Range` header should be `bytes=start-end`, where `start` is required and `end` is optional.
|
||||||
|
For example,
|
||||||
|
- `bytes=0-1023` to request the first 1024 bytes of the file.
|
||||||
|
- `bytes=1000-` to request from byte 1000 to the end of the file.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@ -135,7 +135,7 @@
|
|||||||
$ref: '../components/responses/internal-server-error.yaml'
|
$ref: '../components/responses/internal-server-error.yaml'
|
||||||
/recordings/{recordingId}/media:
|
/recordings/{recordingId}/media:
|
||||||
get:
|
get:
|
||||||
operationId: getRecordingMeedia
|
operationId: getRecordingMedia
|
||||||
summary: Get recording media
|
summary: Get recording media
|
||||||
description: >
|
description: >
|
||||||
Retrieves the media of a recording with the specified recording ID.
|
Retrieves the media of a recording with the specified recording ID.
|
||||||
@ -145,6 +145,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- OpenVidu Meet - Recordings
|
- OpenVidu Meet - Recordings
|
||||||
security:
|
security:
|
||||||
|
- apiKeyInHeader: []
|
||||||
- accessTokenCookie: []
|
- accessTokenCookie: []
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '../components/parameters/recording-id.yaml'
|
- $ref: '../components/parameters/recording-id.yaml'
|
||||||
@ -154,13 +155,11 @@
|
|||||||
description: Successfully streaming the full recording
|
description: Successfully streaming the full recording
|
||||||
headers:
|
headers:
|
||||||
Accept-Ranges:
|
Accept-Ranges:
|
||||||
description: Indicates that byte-range requests are supported
|
$ref: '../components/headers/accept-ranges.yaml'
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
Content-Length:
|
Content-Length:
|
||||||
description: The total file size in bytes
|
$ref: '../components/headers/content-length.yaml'
|
||||||
schema:
|
Cache-Control:
|
||||||
type: integer
|
$ref: '../components/headers/cache-control.yaml'
|
||||||
content:
|
content:
|
||||||
video/mp4:
|
video/mp4:
|
||||||
schema:
|
schema:
|
||||||
@ -170,17 +169,13 @@
|
|||||||
description: Partial content streaming based on byte range
|
description: Partial content streaming based on byte range
|
||||||
headers:
|
headers:
|
||||||
Accept-Ranges:
|
Accept-Ranges:
|
||||||
description: Indicates that byte-range requests are supported
|
$ref: '../components/headers/accept-ranges.yaml'
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
Content-Range:
|
|
||||||
description: Specifies the range of bytes being sent
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
Content-Length:
|
Content-Length:
|
||||||
description: The length of the partial content in bytes
|
$ref: '../components/headers/content-length.yaml'
|
||||||
schema:
|
Cache-Control:
|
||||||
type: integer
|
$ref: '../components/headers/cache-control.yaml'
|
||||||
|
Content-Range:
|
||||||
|
$ref: '../components/headers/content-range.yaml'
|
||||||
content:
|
content:
|
||||||
video/mp4:
|
video/mp4:
|
||||||
schema:
|
schema:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user