mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Add openapi doc for player settings
This commit is contained in:
parent
74e97347bb
commit
200193262c
1 changed files with 168 additions and 0 deletions
|
@ -260,6 +260,8 @@ tags:
|
||||||
description: Operations dealing with managing chapters of a video.
|
description: Operations dealing with managing chapters of a video.
|
||||||
- name: Video Channels
|
- name: Video Channels
|
||||||
description: Operations dealing with the creation, modification and listing of videos within a channel.
|
description: Operations dealing with the creation, modification and listing of videos within a channel.
|
||||||
|
- name: Player Settings
|
||||||
|
description: Operations dealing with video player settings for videos and channels.
|
||||||
- name: Video Comments
|
- name: Video Comments
|
||||||
description: >
|
description: >
|
||||||
Operations dealing with comments to a video. Comments are organized in threads: adding a
|
Operations dealing with comments to a video. Comments are organized in threads: adding a
|
||||||
|
@ -5063,6 +5065,107 @@ paths:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
|
||||||
|
|
||||||
|
'/api/v1/player-settings/videos/{videoId}':
|
||||||
|
get:
|
||||||
|
summary: Get video player settings
|
||||||
|
description: Get player settings for a specific video. Returns video-specific settings merged with channel player settings.
|
||||||
|
operationId: getVideoPlayerSettings
|
||||||
|
tags:
|
||||||
|
- Player Settings
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/idOrUUID'
|
||||||
|
- name: raw
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
description: Return raw settings without merging channel defaults
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PlayerVideoSettings'
|
||||||
|
'404':
|
||||||
|
description: video not found
|
||||||
|
put:
|
||||||
|
summary: Update video player settings
|
||||||
|
description: Update player settings for a specific video
|
||||||
|
operationId: updateVideoPlayerSettings
|
||||||
|
security:
|
||||||
|
- OAuth2: []
|
||||||
|
tags:
|
||||||
|
- Player Settings
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/idOrUUID'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PlayerVideoSettingsUpdate'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PlayerVideoSettings'
|
||||||
|
'404':
|
||||||
|
description: video not found
|
||||||
|
|
||||||
|
'/api/v1/player-settings/video-channels/{handle}':
|
||||||
|
get:
|
||||||
|
summary: Get channel player settings
|
||||||
|
description: Get player settings for a video channel.
|
||||||
|
operationId: getChannelPlayerSettings
|
||||||
|
tags:
|
||||||
|
- Player Settings
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/channelHandle'
|
||||||
|
- name: raw
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
description: Return raw settings without applying instance defaults
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PlayerChannelSettings'
|
||||||
|
'404':
|
||||||
|
description: video channel not found
|
||||||
|
put:
|
||||||
|
summary: Update channel player settings
|
||||||
|
description: Update default player settings for a video channel.
|
||||||
|
operationId: updateChannelPlayerSettings
|
||||||
|
security:
|
||||||
|
- OAuth2: []
|
||||||
|
tags:
|
||||||
|
- Player Settings
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/channelHandle'
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PlayerChannelSettingsUpdate'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PlayerChannelSettings'
|
||||||
|
'404':
|
||||||
|
description: video channel not found
|
||||||
|
|
||||||
|
|
||||||
/api/v1/video-playlists/privacies:
|
/api/v1/video-playlists/privacies:
|
||||||
get:
|
get:
|
||||||
summary: List available playlist privacy policies
|
summary: List available playlist privacy policies
|
||||||
|
@ -12018,6 +12121,71 @@ components:
|
||||||
$ref: "#/components/schemas/VideoPassword/properties/password"
|
$ref: "#/components/schemas/VideoPassword/properties/password"
|
||||||
uniqueItems: true
|
uniqueItems: true
|
||||||
|
|
||||||
|
PlayerTheme:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- galaxy
|
||||||
|
- lucide
|
||||||
|
description: The player theme to use
|
||||||
|
|
||||||
|
PlayerThemeChannelSetting:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- instance-default
|
||||||
|
- galaxy
|
||||||
|
- lucide
|
||||||
|
description: >
|
||||||
|
Player theme setting for a channel:
|
||||||
|
- `instance-default` Use the instance default theme
|
||||||
|
- `galaxy` Use the galaxy theme
|
||||||
|
- `lucide` Use the lucide theme
|
||||||
|
|
||||||
|
PlayerThemeVideoSetting:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- channel-default
|
||||||
|
- instance-default
|
||||||
|
- galaxy
|
||||||
|
- lucide
|
||||||
|
description: >
|
||||||
|
Player theme setting for a video:
|
||||||
|
- `channel-default` Use the channel default theme
|
||||||
|
- `instance-default` Use the instance default theme
|
||||||
|
- `galaxy` Use the galaxy theme
|
||||||
|
- `lucide` Use the lucide theme
|
||||||
|
|
||||||
|
PlayerVideoSettings:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
theme:
|
||||||
|
$ref: '#/components/schemas/PlayerThemeVideoSetting'
|
||||||
|
description: Player settings for a video
|
||||||
|
|
||||||
|
PlayerChannelSettings:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
theme:
|
||||||
|
$ref: '#/components/schemas/PlayerThemeChannelSetting'
|
||||||
|
description: Player settings for a channel
|
||||||
|
|
||||||
|
PlayerVideoSettingsUpdate:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
theme:
|
||||||
|
$ref: '#/components/schemas/PlayerThemeVideoSetting'
|
||||||
|
required:
|
||||||
|
- theme
|
||||||
|
description: Player settings update for a video
|
||||||
|
|
||||||
|
PlayerChannelSettingsUpdate:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
theme:
|
||||||
|
$ref: '#/components/schemas/PlayerThemeChannelSetting'
|
||||||
|
required:
|
||||||
|
- theme
|
||||||
|
description: Player settings update for a channel
|
||||||
|
|
||||||
FileStorage:
|
FileStorage:
|
||||||
type: integer
|
type: integer
|
||||||
enum:
|
enum:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue