model-action 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/Poi.d.ts +10 -0
- package/dist/modules/Poi.js +24 -2
- package/dist/modules/VideoFusion.d.ts +8 -2
- package/dist/modules/VideoFusion.js +16 -10
- package/package.json +1 -1
- package/src/modules/Poi.ts +25 -2
- package/src/modules/VideoFusion.ts +16 -10
package/dist/modules/Poi.d.ts
CHANGED
@@ -28,6 +28,16 @@ export declare class PoiAction extends Action {
|
|
28
28
|
* @param {*} linkId POI关联的设备ID
|
29
29
|
*/
|
30
30
|
static poiAdd(type: PoiType['type'], location: LocationItem, text?: PoiType['text'], place?: PoiType['place'], description?: PoiType['description'], linkId?: PoiType['linkId']): void;
|
31
|
+
/**
|
32
|
+
* 更新poi
|
33
|
+
* @param {*} type 相机type
|
34
|
+
* @param {*} location poi点位置
|
35
|
+
* @param {*} text POI标题
|
36
|
+
* @param {*} place POI所在位置
|
37
|
+
* @param {*} description POI描述
|
38
|
+
* @param {*} linkId POI关联的设备ID
|
39
|
+
*/
|
40
|
+
static poiUpdate(type: PoiType['type'], location: LocationItem, text?: PoiType['text'], place?: PoiType['place'], description?: PoiType['description'], linkId?: PoiType['linkId']): void;
|
31
41
|
/**
|
32
42
|
* 删除poi
|
33
43
|
* @param {*} id 点ID
|
package/dist/modules/Poi.js
CHANGED
@@ -23,7 +23,29 @@ export class PoiAction extends Action {
|
|
23
23
|
description,
|
24
24
|
linkId
|
25
25
|
};
|
26
|
-
this.sendParam(param, '
|
26
|
+
this.sendParam(param, '新增POI');
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* 更新poi
|
30
|
+
* @param {*} type 相机type
|
31
|
+
* @param {*} location poi点位置
|
32
|
+
* @param {*} text POI标题
|
33
|
+
* @param {*} place POI所在位置
|
34
|
+
* @param {*} description POI描述
|
35
|
+
* @param {*} linkId POI关联的设备ID
|
36
|
+
*/
|
37
|
+
static poiUpdate(type = 'Camera', location, text = '', place = '', description = '', linkId = '') {
|
38
|
+
const param = {
|
39
|
+
cmd: "POI",
|
40
|
+
action: "update",
|
41
|
+
type,
|
42
|
+
text,
|
43
|
+
location,
|
44
|
+
place,
|
45
|
+
description,
|
46
|
+
linkId
|
47
|
+
};
|
48
|
+
this.sendParam(param, '更新POI');
|
27
49
|
}
|
28
50
|
/**
|
29
51
|
* 删除poi
|
@@ -83,7 +105,7 @@ export class PoiAction extends Action {
|
|
83
105
|
action: "status",
|
84
106
|
state
|
85
107
|
};
|
86
|
-
this.sendParam(param,
|
108
|
+
this.sendParam(param, `恢复poi至${state}状态`);
|
87
109
|
}
|
88
110
|
/**
|
89
111
|
* 获取指定POI
|
@@ -36,13 +36,19 @@ export declare class VideoFusionAction extends Action {
|
|
36
36
|
/**
|
37
37
|
* 开启视频融合
|
38
38
|
* @param {*} ids id列表
|
39
|
+
* @param {*} isLocation 是否定位到第一个点。 true = 定位第一个, false = 不定位
|
40
|
+
* @param {*} backPlay
|
41
|
+
* @param {*} videoType Video:实时流,Record:录像,默认实时流 Video
|
39
42
|
*/
|
40
|
-
static videoFusionStart(ids: VideoFusionType['ids']): void;
|
43
|
+
static videoFusionStart(ids: VideoFusionType['ids'], isLocation?: boolean, backPlay?: boolean, videoType?: 'Video' | 'Record'): void;
|
41
44
|
/**
|
42
45
|
* 关闭视频融合
|
43
46
|
* @param {*} ids id列表
|
47
|
+
* @param {*} isLocation 是否定位到第一个点。 true = 定位第一个, false = 不定位
|
48
|
+
* @param {*} backPlay
|
49
|
+
* @param {*} videoType Video:实时流,Record:录像,默认实时流 Video
|
44
50
|
*/
|
45
|
-
static videoFusionStop(ids: VideoFusionType['ids']): void;
|
51
|
+
static videoFusionStop(ids: VideoFusionType['ids'], isLocation?: boolean, backPlay?: boolean, videoType?: 'Video' | 'Record'): void;
|
46
52
|
/**
|
47
53
|
* 刷新视频融合
|
48
54
|
* @param {*} token TOKEN
|
@@ -34,19 +34,22 @@ export class VideoFusionAction extends Action {
|
|
34
34
|
id,
|
35
35
|
fov,
|
36
36
|
};
|
37
|
-
this.sendParam(param);
|
37
|
+
this.sendParam(param, `飞行到视频融合点位【${id}】`);
|
38
38
|
}
|
39
39
|
/**
|
40
40
|
* 开启视频融合
|
41
41
|
* @param {*} ids id列表
|
42
|
+
* @param {*} isLocation 是否定位到第一个点。 true = 定位第一个, false = 不定位
|
43
|
+
* @param {*} backPlay
|
44
|
+
* @param {*} videoType Video:实时流,Record:录像,默认实时流 Video
|
42
45
|
*/
|
43
|
-
static videoFusionStart(ids) {
|
46
|
+
static videoFusionStart(ids, isLocation = false, backPlay = false, videoType = 'Video') {
|
44
47
|
const param = {
|
45
48
|
cmd: "videoFusion",
|
46
49
|
action: "start",
|
47
|
-
isLocation
|
48
|
-
videoType
|
49
|
-
backPlay
|
50
|
+
isLocation,
|
51
|
+
videoType,
|
52
|
+
backPlay,
|
50
53
|
ids,
|
51
54
|
};
|
52
55
|
this.sendParam(param, '开启视频融合');
|
@@ -54,14 +57,17 @@ export class VideoFusionAction extends Action {
|
|
54
57
|
/**
|
55
58
|
* 关闭视频融合
|
56
59
|
* @param {*} ids id列表
|
60
|
+
* @param {*} isLocation 是否定位到第一个点。 true = 定位第一个, false = 不定位
|
61
|
+
* @param {*} backPlay
|
62
|
+
* @param {*} videoType Video:实时流,Record:录像,默认实时流 Video
|
57
63
|
*/
|
58
|
-
static videoFusionStop(ids) {
|
64
|
+
static videoFusionStop(ids, isLocation = false, backPlay = false, videoType = 'Video') {
|
59
65
|
const param = {
|
60
66
|
cmd: "videoFusion",
|
61
67
|
action: "stop",
|
62
|
-
isLocation
|
63
|
-
videoType
|
64
|
-
backPlay
|
68
|
+
isLocation,
|
69
|
+
videoType,
|
70
|
+
backPlay,
|
65
71
|
ids,
|
66
72
|
};
|
67
73
|
this.sendParam(param, '关闭视频融合');
|
@@ -76,6 +82,6 @@ export class VideoFusionAction extends Action {
|
|
76
82
|
action: "refresh",
|
77
83
|
token,
|
78
84
|
};
|
79
|
-
this.sendParam(param);
|
85
|
+
this.sendParam(param, '刷新视频融合');
|
80
86
|
}
|
81
87
|
}
|
package/package.json
CHANGED
package/src/modules/Poi.ts
CHANGED
@@ -41,7 +41,30 @@ export class PoiAction extends Action {
|
|
41
41
|
description,
|
42
42
|
linkId
|
43
43
|
};
|
44
|
-
this.sendParam(param, '
|
44
|
+
this.sendParam(param, '新增POI')
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* 更新poi
|
49
|
+
* @param {*} type 相机type
|
50
|
+
* @param {*} location poi点位置
|
51
|
+
* @param {*} text POI标题
|
52
|
+
* @param {*} place POI所在位置
|
53
|
+
* @param {*} description POI描述
|
54
|
+
* @param {*} linkId POI关联的设备ID
|
55
|
+
*/
|
56
|
+
static poiUpdate(type: PoiType['type'] = 'Camera', location: LocationItem, text: PoiType['text'] = '', place: PoiType['place'] = '', description: PoiType['description'] = '', linkId: PoiType['linkId'] = '') {
|
57
|
+
const param: RequiredSome<PoiType, 'action' | 'type' | 'location'> = {
|
58
|
+
cmd: "POI",
|
59
|
+
action: "update",
|
60
|
+
type,
|
61
|
+
text,
|
62
|
+
location,
|
63
|
+
place,
|
64
|
+
description,
|
65
|
+
linkId
|
66
|
+
};
|
67
|
+
this.sendParam(param, '更新POI')
|
45
68
|
}
|
46
69
|
|
47
70
|
/**
|
@@ -107,7 +130,7 @@ export class PoiAction extends Action {
|
|
107
130
|
action: "status",
|
108
131
|
state
|
109
132
|
};
|
110
|
-
this.sendParam(param,
|
133
|
+
this.sendParam(param, `恢复poi至${state}状态`)
|
111
134
|
}
|
112
135
|
|
113
136
|
/**
|
@@ -55,20 +55,23 @@ export class VideoFusionAction extends Action {
|
|
55
55
|
id,
|
56
56
|
fov,
|
57
57
|
};
|
58
|
-
this.sendParam(param)
|
58
|
+
this.sendParam(param,`飞行到视频融合点位【${id}】`)
|
59
59
|
}
|
60
60
|
|
61
61
|
/**
|
62
62
|
* 开启视频融合
|
63
63
|
* @param {*} ids id列表
|
64
|
+
* @param {*} isLocation 是否定位到第一个点。 true = 定位第一个, false = 不定位
|
65
|
+
* @param {*} backPlay
|
66
|
+
* @param {*} videoType Video:实时流,Record:录像,默认实时流 Video
|
64
67
|
*/
|
65
|
-
static videoFusionStart(ids: VideoFusionType['ids']) {
|
68
|
+
static videoFusionStart(ids: VideoFusionType['ids'], isLocation: boolean = false, backPlay: boolean = false, videoType: 'Video' | 'Record' = 'Video') {
|
66
69
|
const param: VideoFusionType = {
|
67
70
|
cmd: "videoFusion",
|
68
71
|
action: "start",
|
69
|
-
isLocation
|
70
|
-
videoType
|
71
|
-
backPlay
|
72
|
+
isLocation,
|
73
|
+
videoType,
|
74
|
+
backPlay,
|
72
75
|
ids,
|
73
76
|
};
|
74
77
|
this.sendParam(param, '开启视频融合')
|
@@ -77,14 +80,17 @@ export class VideoFusionAction extends Action {
|
|
77
80
|
/**
|
78
81
|
* 关闭视频融合
|
79
82
|
* @param {*} ids id列表
|
83
|
+
* @param {*} isLocation 是否定位到第一个点。 true = 定位第一个, false = 不定位
|
84
|
+
* @param {*} backPlay
|
85
|
+
* @param {*} videoType Video:实时流,Record:录像,默认实时流 Video
|
80
86
|
*/
|
81
|
-
static videoFusionStop(ids: VideoFusionType['ids']) {
|
87
|
+
static videoFusionStop(ids: VideoFusionType['ids'], isLocation: boolean = false, backPlay: boolean = false, videoType: 'Video' | 'Record' = 'Video') {
|
82
88
|
const param: VideoFusionType = {
|
83
89
|
cmd: "videoFusion",
|
84
90
|
action: "stop",
|
85
|
-
isLocation
|
86
|
-
videoType
|
87
|
-
backPlay
|
91
|
+
isLocation,
|
92
|
+
videoType,
|
93
|
+
backPlay,
|
88
94
|
ids,
|
89
95
|
};
|
90
96
|
this.sendParam(param, '关闭视频融合')
|
@@ -100,6 +106,6 @@ export class VideoFusionAction extends Action {
|
|
100
106
|
action: "refresh",
|
101
107
|
token,
|
102
108
|
};
|
103
|
-
this.sendParam(param)
|
109
|
+
this.sendParam(param,'刷新视频融合')
|
104
110
|
}
|
105
111
|
}
|