|
@@ -145,4 +145,21 @@ public class TblDeviceController extends BaseController {
|
|
|
}
|
|
|
return R.ok(data);
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/rtmp/close/{from}")
|
|
|
+ public R<Object> closeHlsCode(@PathVariable("from") String from) {
|
|
|
+ Object data = "";
|
|
|
+ try {
|
|
|
+
|
|
|
+ from = Base64Decoder.decodeStr(from);
|
|
|
+ String p[] = from.split("/");
|
|
|
+ if (rtmptohlsmap.get(from) != null && rtmptohlsmap.get(from).isAlive()) {
|
|
|
+ rtmptohlsmap.get(from).interrupt();
|
|
|
+ rtmptohlsmap.remove(from);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
+ }
|
|
|
+ return R.ok(data);
|
|
|
+ }
|
|
|
}
|