Skip to content

Commit 3cde53e

Browse files
authored
update start and stop device params
1 parent 094d314 commit 3cde53e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/main/java/com/qiniu/qvs/DeviceManager.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,21 @@ public Response listDevice(String namespaceId, int offset, int line, String pref
8181
}
8282

8383
/*
84-
* 启动设备
84+
* 启动设备拉流
8585
*/
86-
public Response startDevice(String namespaceId, String gbId) throws QiniuException {
86+
public Response startDevice(String namespaceId, String gbId, String channels) throws QiniuException {
8787
String url = String.format("%s/v1/namespaces/%s/devices/%s/start", apiServer, namespaceId, gbId);
88-
return QvsResponse.post(url, new StringMap(), client, auth);
88+
StringMap params = new StringMap().put("channels", channels);
89+
return QvsResponse.post(url, params, client, auth);
8990
}
9091

9192
/*
92-
* 停止设备
93+
* 停止设备拉流
9394
*/
94-
public Response stopDevice(String namespaceId, String gbId) throws QiniuException {
95+
public Response stopDevice(String namespaceId, String gbId, String channels) throws QiniuException {
9596
String url = String.format("%s/v1/namespaces/%s/devices/%s/stop", apiServer, namespaceId, gbId);
96-
return QvsResponse.post(url, new StringMap(), client, auth);
97+
StringMap params = new StringMap().put("channels", channels);
98+
return QvsResponse.post(url, params, client, auth);
9799
}
98100

99101
}

0 commit comments

Comments
 (0)