Home / Docs Center / Device API Reference / SettingsHLSSwitch(PlatformSwitch)
SettingsHLSSwitch(PlatformSwitch)
Project: Device API Documentation (New) | page_id: 364
[TOC]
Brief Description
- Enable or disable HLS live streaming
New API Implementation (Supported when the version shown in the upper right corner of the page is greater than or equal to v1.29.1026)
Request URL
/xsw/api/sys/hlsControl
Request Method
- POST
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| channel | Yes | int | Channel, i.e. the stream index, starting from 0 |
| enable | Yes | int | Whether to enable, 0 disabled, 1 enabled |
Old API Implementation (Supported by both new and old versions)
Request URL
/xsw/control
Request Method
- POST
Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| command | Yes | string | Fixed value live_control |
| value | Yes | string | start to enable, stop to disable |
| channel | Yes | int | Total number of channels * 2 + current channel index |
Unified Response Example
{"code":0,"msg":""}
Unified Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | int | 0 means success, others mean failure |
| msg | string | Error information |
Notes
- The response parameters of the new and old APIs are the same
Didn't find what you need?Contact us,Talk to our engineers directly.