网页播放器

网页播放器 是 Callaba Engine 中面向浏览器观看的交付与播放控制层。你可以用这个 API 从已有的直播 input 创建观众侧端点,发布浏览器可用的 HLS 或 DASH 输出,配置嵌入与访问设置,并控制播放器何时可用。

职责要分清:接入 API 负责源侧可靠性和传输连续性,而网页播放器负责观众体验调优和播放操作。在这个模块中,你需要指定源信号、调整打包与自适应码率行为,按需启用鉴权或按次付费,并通过 startstopgetStat 之类的方法来运营直播交付。

直播播放演练场

这个模块最好同时把两种交付表面放在一起看:一种是对公共 HLS manifest 的直连浏览器播放,另一种是托管的 Callaba 播放器 iframe 嵌入。下面的演练场把两者放到一起,同时给出观众侧实时统计,方便你看到播放层实际上在做什么。

当问题是观众体验时,先看播放器本身;当问题是播放进程上游是否仍有可信的码率与画面节奏时,再看 getStat

直播播放演示正在加载预览
测试直连 HLS 播放或托管的 Callaba 嵌入播放器
如果你想先快速验证观众侧播放效果,请使用直连 HLS;如果你想把托管的 Callaba 播放器放到自己的网站上,再切换到 iframe 嵌入。
HLS / m3u8Iframe 嵌入浏览器就绪

运行时播放信号

对于网页播放器,getStat 首先回答的是源侧问题:播放进程当前是否仍在收到具有可信码率和画面节奏的媒体。这是最直接的运营检查,能帮助你在责怪嵌入逻辑、品牌样式、访问控制或浏览器之前,先确认上游是不是还健康。

下面的预览镜像了 getStat 文档中同样的运行时字段。当播放质量看起来不对时,用它快速确认播放器进程上游是否仍有健康的输入可供打包。

Playback runtime

Preview the runtime shape behind a live web player

For web players, getStat answers both sides of the first operational question: is the player process still receiving believable source media, and are viewers actually connected right now. Together these fields tell you whether playback still has a healthy upstream signal and whether the audience is actively watching.

Runtime preview
getStat field shape
Process view

bitrate_kbits

Previewing the same runtime signal operators usually inspect first.

4,700 kbits/s
viewers
8 live
out_time_ms
3:00
updated
3:51:04 AM
Operational signals
bitrate_kbits

4,700 kbits/s

This is the source-side signal the player process still has something healthy to package.

fps

30.0

The fastest way to tell whether playback quality issues already started before the viewer layer.

viewers

8

Current connected audience reported by the same getStat response used for the live player process.

progress

continue

3:00 packaged · 1.00x worker speed

Use this runtime check before you blame the viewer layer. If bitrate and cadence already look wrong here, the issue is usually upstream of branding, access control, or embed logic.

按预设理解示例

这个模块最有价值的预设,不是只按传输协议来分,而是按播放工作流形态来分:把一个直播源暴露为一个公共播放器、在鉴权后保护播放器、把相关播放器组合在一起,或者把播放器准备成自适应码率播放。

SRT server 到公共网页播放器

{
  "vod_name": "Main stage player",
  "vod_type": "VOD_TYPE_LIVE_STREAM",
  "input": {
    "input_type": "INPUT_TYPE_SRT_SOFTWARE",
    "input_module_id": "SRT_SERVER_ID",
    "input_stream_id": "",
    "entity_name": "Main stage player",
    "module_name": "MODULE_VOD"
  },
  "authorization": {
    "authorization_type": "VOD_PASSWORD_DISABLED",
    "credentials": []
  },
  "adaptive_bitrate_settings": {
    "input_resolution": "MAX_RESOLUTION_UNSET"
  },
  "hls_fragment_size": 3,
  "hls_fragment_length": 60,
  "dash_fragment_size": 3,
  "dash_fragment_length": 60,
  "initial_live_manifest_size": 4,
  "live_sync_duration_count": 5,
  "pay_per_view_settings": {
    "type": "PAY_PER_VIEW_DISABLED",
    "client_id": ""
  },
  "active": true
}

RTMP server 到公共网页播放器

{
  "vod_name": "RTMP browser player",
  "vod_type": "VOD_TYPE_LIVE_STREAM",
  "input": {
    "input_type": "INPUT_TYPE_RTMP_SOFTWARE",
    "input_module_id": "RTMP_SERVER_ID",
    "input_stream_id": "",
    "entity_name": "RTMP browser player",
    "module_name": "MODULE_VOD"
  },
  "authorization": {
    "authorization_type": "VOD_PASSWORD_DISABLED",
    "credentials": []
  },
  "adaptive_bitrate_settings": {
    "input_resolution": "MAX_RESOLUTION_UNSET"
  },
  "hls_fragment_size": 3,
  "hls_fragment_length": 60,
  "dash_fragment_size": 3,
  "dash_fragment_length": 60,
  "initial_live_manifest_size": 4,
  "live_sync_duration_count": 5,
  "pay_per_view_settings": {
    "type": "PAY_PER_VIEW_DISABLED",
    "client_id": ""
  },
  "active": true
}

带密码保护的网页播放器

{
  "vod_name": "Partner review player",
  "vod_type": "VOD_TYPE_LIVE_STREAM",
  "input": {
    "input_type": "INPUT_TYPE_SRT_SOFTWARE",
    "input_module_id": "SRT_SERVER_ID",
    "input_stream_id": "",
    "entity_name": "Partner review player",
    "module_name": "MODULE_VOD"
  },
  "authorization": {
    "authorization_type": "VOD_PASSWORD_ONLY_MANUALLY",
    "credentials": [
      {
        "email": "[email protected]",
        "password": "guest-password"
      }
    ]
  },
  "adaptive_bitrate_settings": {
    "input_resolution": "MAX_RESOLUTION_UNSET"
  },
  "hls_fragment_size": 3,
  "hls_fragment_length": 60,
  "dash_fragment_size": 3,
  "dash_fragment_length": 60,
  "initial_live_manifest_size": 4,
  "live_sync_duration_count": 5,
  "pay_per_view_settings": {
    "type": "PAY_PER_VIEW_DISABLED",
    "client_id": ""
  },
  "active": true
}

分组变体播放器

{
  "vod_name": "Main stage EN",
  "vod_type": "VOD_TYPE_LIVE_STREAM",
  "input": {
    "input_type": "INPUT_TYPE_SRT_SOFTWARE",
    "input_module_id": "SRT_SERVER_ID",
    "input_stream_id": "",
    "entity_name": "Main stage EN",
    "module_name": "MODULE_VOD"
  },
  "authorization": {
    "authorization_type": "VOD_PASSWORD_DISABLED",
    "credentials": []
  },
  "adaptive_bitrate_settings": {
    "input_resolution": "MAX_RESOLUTION_UNSET"
  },
  "hls_fragment_size": 3,
  "hls_fragment_length": 60,
  "dash_fragment_size": 3,
  "dash_fragment_length": 60,
  "initial_live_manifest_size": 4,
  "live_sync_duration_count": 5,
  "group_settings": {
    "group_id": "VOD_GROUP_ID",
    "name": "English",
    "selected": true
  },
  "pay_per_view_settings": {
    "type": "PAY_PER_VIEW_DISABLED",
    "client_id": ""
  },
  "active": true
}

工作流示例

这些场景强调的不是请求体怎么写,而是网页播放器为什么会出现在你的生产设计里。

当直播源需要变成浏览器播放端点时,使用网页播放器

当你的目标不只是接收一条流,而是把它暴露成一个面向观众的浏览器体验,并拥有稳定的播放器 URL 与生成的 HLS 输出时,就应创建一个网页播放器。

  • 价值所在:一个 API 对象就覆盖了接入挂接、播放打包和观众侧交付设置。
  • 典型场景:活动页面、内部监看播放器、嵌入式直播播放,以及面向 SRT 或 RTMP 来源的浏览器观看。

当访问控制属于播放层时,使用网页播放器

网页播放器模块也是控制播放访问的地方,包括密码访问、按次付费,以及针对多变体或多语言观看体验的播放器分组。

  • 关键控制:authorizationgroup_settingspay_per_view_settings
  • 典型场景:合作方审核房间、受限活动直播、分语言分组播放,以及托管式观众引导。

当交付调优和源本身同样重要时,使用网页播放器

播放侧体验由分片大小、播放列表长度和自适应码率设置决定,而不仅仅是输入源本身。这意味着当你要调的是观众体验,而不只是接入可靠性时,这个模块才是正确的位置。

  • 关键控制:adaptive_bitrate_settingshls_fragment_sizehls_fragment_lengthinitial_live_manifest_sizelive_sync_duration_count
  • 运营适配:播放器启动调优、缓冲降低,以及面向 ABR 的播放准备。
Create web player
收起
POST
/api/vod/create

Creates a new web player in Callaba Engine.

The backend exposes this method as POST /api/vod/create. The payload combines a live input definition with playback-specific controls such as HLS and DASH fragment settings, adaptive bitrate configuration, optional authorization, optional pay-per-view, optional group assignment, and optional presentation fields.

The create flow follows the same shape in the product UI. In practice, the request body is assembled from source settings, playback delivery settings, optional transcoding, optional audio or video modifications, optional overlay settings, and access-control choices.

In the dashboard, operators see this through labels such as Player name, Input type, Web player URL, HLS fragment size, and authorization controls for restricted playback.

Although the examples below focus on live playback, the same module also supports on-demand-style player types and group-driven viewer experiences.

Authentication uses the dashboard-issued JWT token in the x-access-token header.

Examples by preset

The examples below are grouped by playback presets rather than by one oversized payload. That makes them easier to reuse for real viewer-facing workflows.

Workflow-oriented use cases

Use a web player when a live source should become a browser playback endpoint with stable URLs, delivery settings, and viewer-facing access rules.

  • Good fit for: public event pages, partner review players, embedded live playback, grouped language feeds, and browser-ready HLS delivery.
  • Not the same as: an ingest boundary like SRT servers or a processing pipeline like Restreams.

Once a player is live, operators usually care about three things first: whether viewers can open the player, what viewer count the playback layer currently sees, and what live bitrate and FPS the process is reporting.

Public playback

Use this preset when one managed SRT source should become one public browser playback endpoint with no access barrier.

SRT server to public web player

This is the cleanest live-player setup for open browser viewing. The player layer handles packaging and playback while the source remains managed upstream.

SRT server to public web player
curl --request POST \
--url http://localhost/api/vod/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true
}'
RTMP server to public web player

This keeps the playback contract stable even if the ingest transport on the source side remains RTMP.

RTMP server to public web player
curl --request POST \
--url http://localhost/api/vod/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "RTMP browser player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_RTMP_SOFTWARE",
"input_module_id": "RTMP_SERVER_ID",
"input_stream_id": "",
"entity_name": "RTMP browser player",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true
}'
Restricted playback

Use this preset when the player should exist, but not as a public page. The browser endpoint is still generated, but access is gated by player-side credentials.

Password-protected web player

This is a good fit for partner review, internal screenings, premium previews, or any case where access control belongs in the playback layer itself.

Password-protected web player
curl --request POST \
--url http://localhost/api/vod/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "Partner review player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Partner review player",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_ONLY_MANUALLY",
"credentials": [
{
"email": "[email protected]",
"password": "guest-password"
}
]
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true
}'
Grouped playback

Use this preset when one player should join a group of related browser endpoints, for example different languages, programs, or alternate event views.

Grouped variant player

The grouped-player path is useful when the browser experience is bigger than one isolated URL and the viewer should move between related player variants.

Grouped variant player
curl --request POST \
--url http://localhost/api/vod/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "Main stage EN",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage EN",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true,
"group_settings": {
"group_id": "VOD_GROUP_ID",
"name": "English",
"selected": true
}
}'
Delivery tuning

Use this preset when the browser side should be prepared for adaptive bitrate playback rather than a single unscaled rendition.

ABR-ready web player

The real product ties adaptive bitrate to playback tuning and transcoding. This makes it useful when startup stability and viewer-side quality adaptation matter more than one fixed rendition.

ABR-ready web player
curl --request POST \
--url http://localhost/api/vod/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "ABR main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "1080"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "libx264",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "aac",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true
}'
请求体参数
Identity
vod_name
string

Dashboard label: Player name.

Human-readable playback endpoint name. The create form validates it as required.

vod_type
string

Player type. The default live workflow uses VOD_TYPE_LIVE_STREAM, while the product also supports on-demand styles.

vod_media_type
string

Optional media type descriptor stored on the player object.

Input
input
object

Dashboard label: Input type.

Input definition built from the shared source form. Real product-facing inputs include SRT servers, RTMP servers, SRT routes, and URL-based live sources.

Playback delivery
adaptive_bitrate_settings
object

Adaptive bitrate settings for the player. The product uses input_resolution as the key delivery decision and ties ABR to the transcoding layer.

hls_fragment_size
integer

Dashboard label: HLS fragment size.

The UI guidance recommends 3 seconds for a good HLS experience.

hls_fragment_length
integer

Dashboard label: HLS fragment length.

The UI guidance recommends 60 seconds.

dash_fragment_size / dash_fragment_length
mixed

DASH-side fragment sizing controls stored with the player object.

initial_live_manifest_size
integer

Dashboard label: Minimal HLS fragment count.

Controls how many fragments are preloaded before playback begins.

live_sync_duration_count
integer

Dashboard label: Edge of live delay.

Controls how far from the latest fragment playback should start for live viewing.

Access and grouping
authorization
object

Player-side authorization settings. The UI uses this to require viewer authorization before the web player can be opened.

group_settings
object

Optional group assignment block with group_id, per-group display name, and selected default state.

pay_per_view_settings
object

Optional monetization block. The disabled state remains the normal default for most players.

Presentation
cover_path / logo_path / useCustomLogo / useCustomBackground
mixed

Optional presentation and branding settings for the browser-facing player experience.

event_date / timeZone / eventDateStatus / support_email
mixed

Optional event and support metadata stored with the player object.

Processing
transcoding / modify_audio / modify_video / overlay
object

Optional media processing blocks used when the player should do more than simple pass-through packaging.

Runtime
active
boolean

Dashboard label: Enable once created.

Controls whether the player should be active right after provisioning.

Create web player
curl --request POST \
--url http://localhost/api/vod/create \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true
}'
响应
Identity
_id
string

Mongo-style identifier of the web player.

id
string

Convenience alias for _id.

vod_name
string

Name stored for the player object.

vod_type / vod_media_type
mixed

Player type and media-type fields stored on the object.

Playback delivery
vod_port
integer

Generated internal port used by the player delivery runtime.

Input
input[]
array

Linked input object or objects used by the playback pipeline.

Playback delivery
adaptive_bitrate_settings / hls_fragment_* / dash_fragment_*
mixed

Playback-delivery settings stored on the player object.

Access and grouping
authorization / pay_per_view_settings / group_id / users
mixed

Access, monetization, group, and viewer-authorization state stored on the player.

Presentation
hidden / support_email / logo / background fields
mixed

Presentation and visibility settings returned with the player object.

Runtime
active
boolean

Current running-state flag for the player.

created / modified
string

Timestamps managed by the backend.

Operation result
success
boolean

The model exposes success: true as a virtual field in successful responses.

响应: Create web player
JSON
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:00:00.000Z",
"success": true
}
Get web players count
展开
POST
/api/vod/getCount

Returns the current number of web players visible to the authenticated user.

This is the lightweight way to confirm how many player objects exist after provisioning or cleanup runs, without loading the full list.

请求体参数
此方法没有参数
Get web players count
curl --request POST \
--url http://localhost/api/vod/getCount \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{}'
响应
count
integer

Total number of web players currently visible to the authenticated user.

响应: Get web players count
JSON
{
"count": 1
}
Get all web players
展开
POST
/api/vod/getAll

Returns the paginated list of web players.

In the dashboard, this listing is where operators scan the player name, current viewer count, current live bitrate, current FPS, and quick actions such as preview, edit, or remove.

The same row also exposes browser-facing delivery surfaces such as the web player URL, HLS URL, and embed code, even though those URLs are derived from the player object rather than returned as dedicated top-level API fields.

请求体参数
limit
integer

Optional page size for the list query.

skip
integer

Optional offset for paginated listing.

sort
object

Optional sort descriptor. The dashboard store defaults to { created: 1 }.

filter
object

Optional filter object forwarded to the backend query.

Get all web players
curl --request POST \
--url http://localhost/api/vod/getAll \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"limit": 10,
"skip": 0,
"sort": {
"created": 1
},
"filter": {}
}'
响应
array of web player objects
array

The backend returns a bare array of player objects, not a wrapped object.

响应: Get all web players
JSON
[
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:00:00.000Z",
"success": true
}
]
Get web player by id
展开
POST
/api/vod/getById

Returns one populated web player object by id.

This is the best method to inspect the complete playback configuration, including the chosen input, authorization settings, adaptive bitrate controls, group assignment, and viewer-related settings stored on the player.

请求体参数
id
string

Identifier of the web player you want to load.

Get web player by id
curl --request POST \
--url http://localhost/api/vod/getById \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"id": "66015d2997300f9385d32c00"
}'
响应
web player object
object

The backend returns the populated player object with linked input, access settings, and playback-delivery fields.

响应: Get web player by id
JSON
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:00:00.000Z",
"success": true
}
Update web player
展开
POST
/api/vod/update

Updates an existing web player by id.

The update contract mirrors create. In practice, teams use it to swap the input source, change playback delivery settings, adjust access rules, tune ABR behavior, or move the player into or out of a group without recreating the whole playback endpoint.

请求体参数
id
string

Identifier of the web player being updated.

player payload fields
mixed

The update contract mirrors create and reuses the same validation plus runtime-regeneration path.

Update web player
curl --request POST \
--url http://localhost/api/vod/update \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"vod_name": "Main stage player updated",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"input": {
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
},
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": false,
"id": "66015d2997300f9385d32c00"
}'
响应
updated web player object
object

The backend returns the updated player object together with success: true.

响应: Update web player
JSON
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player updated",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": false,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:10:00.000Z",
"success": true
}
Start web player
展开
POST
/api/vod/start

Starts the selected web player.

For live players, this action restarts the delivery-side worker and the related HLS generation path. It is the operational counterpart to provisioning a player object and then taking it live when the event actually begins.

请求体参数
id
string

Identifier of the web player to start.

Start web player
curl --request POST \
--url http://localhost/api/vod/start \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"id": "66015d2997300f9385d32c00"
}'
响应
started web player object
object

The backend marks the player as active and returns the updated player object.

响应: Start web player
JSON
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:00:00.000Z",
"success": true
}
Stop web player
展开
POST
/api/vod/stop

Stops the selected web player.

This is useful when the player should remain provisioned but the active delivery process should be paused, for example between events, after a scheduled session ends, or during troubleshooting.

请求体参数
id
string

Identifier of the web player to stop.

Stop web player
curl --request POST \
--url http://localhost/api/vod/stop \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"id": "66015d2997300f9385d32c00"
}'
响应
stopped web player object
object

The backend marks the player as inactive and returns the updated player object.

响应: Stop web player
JSON
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": false,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:15:00.000Z",
"success": true
}
Remove web player
展开
DELETE
/api/vod/remove

Deletes the selected web player and removes its related playback runtime assets.

In addition to removing the database object, the backend also tears down the generated playback side such as HLS output folders and runtime state.

查询参数
id
string

Identifier of the web player to delete.

Remove web player
curl --request DELETE \
--url http://localhost/api/vod/remove \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{
"id": "66015d2997300f9385d32c00"
}'
响应
removed web player object
object

The backend removes the player and related runtime assets while returning the previously loaded player object.

响应: Remove web player
JSON
{
"_id": "66015d2997300f9385d32c00",
"id": "66015d2997300f9385d32c00",
"vod_name": "Main stage player",
"vod_type": "VOD_TYPE_LIVE_STREAM",
"vod_media_type": "video",
"vod_port": 20840,
"input": [
{
"_id": "66015d2997300f9385d32c01",
"id": "66015d2997300f9385d32c01",
"input_type": "INPUT_TYPE_SRT_SOFTWARE",
"input_module_id": "SRT_SERVER_ID",
"input_stream_id": "",
"entity_name": "Main stage player",
"module_name": "MODULE_VOD"
}
],
"authorization": {
"authorization_type": "VOD_PASSWORD_DISABLED",
"credentials": []
},
"adaptive_bitrate_settings": {
"input_resolution": "MAX_RESOLUTION_UNSET"
},
"hls_fragment_size": 3,
"hls_fragment_length": 60,
"dash_fragment_size": 3,
"dash_fragment_length": 60,
"initial_live_manifest_size": 4,
"live_sync_duration_count": 5,
"pay_per_view_settings": {
"type": "PAY_PER_VIEW_DISABLED",
"client_id": ""
},
"group_id": null,
"users": [],
"hidden": false,
"support_email": "",
"transcoding": {
"video_transcoding": "Disabled",
"output_video_bitrate": 6000,
"preset": "ultrafast",
"tune": "Disabled",
"crf": "Disabled",
"pix_fmt": "Disabled",
"encoding_rate": "",
"filter_fps": "",
"gop": "Disabled",
"force_key_frames": 2,
"frame_width": "",
"frame_height": "",
"slices": "",
"cores": "",
"xlnx_hwdev": "0",
"audio_transcoding": "Disabled",
"output_audio_bitrate": 128,
"sample_rate": 44100
},
"modify_audio": {
"type": "DISABLED",
"channel": "1,2",
"track": "0"
},
"modify_video": {
"type": "DISABLED"
},
"overlay": {
"type": "DISABLED",
"position": {
"x": 1,
"y": 1
}
},
"active": true,
"created": "2026-03-24T14:00:00.000Z",
"modified": "2026-03-24T14:00:00.000Z",
"success": true
}
Get web player stat
展开
POST
/api/vod/getStat

Returns the current process statistics for active web players.

This is the playback-process counterpart to the dashboard's live labels. It exposes runtime values such as current bitrate, FPS, speed, and FFmpeg progress for active player workers.

Viewer count is related but separate: the product also tracks active viewers in memory for the playback layer, while getStat focuses on the running media process itself.

请求体参数
此方法没有参数
Get web player stat
curl --request POST \
--url http://localhost/api/vod/getStat \
--header 'x-access-token: <your_api_token>' \
--header 'Content-Type: application/json' \
--data '{}'
响应
processData[]
array

Current per-process statistics used by the dashboard polling layer.

processData[].bitrate / bitrate_kbits
mixed

Current FFmpeg-reported bitrate and a normalized integer bitrate_kbits field.

processData[].fps
string

Current frames-per-second progress value when the runtime reports it.

processData[].speed
string

Current worker speed, for example 1.00x.

processData[].progress
string

FFmpeg progress status such as continue or end.

processData[].viewers
number

Current connected viewer count returned by getStat for the player process.

响应: Get web player stat
JSON
[
{
"processData": {
"id": "66015d2997300f9385d32c00",
"bitrate": "4700.2kbits/s",
"bitrate_kbits": 4700,
"fps": "30",
"speed": "1.00x",
"out_time_ms": "180000",
"progress": "continue",
"viewers": 8
}
}
]