@ccos/ccsdk-lite 1.0.9 → 1.0.11

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.
@@ -3,6 +3,6 @@ export declare function setAppCommandCallback(cb: Function): void;
3
3
  export declare function unsetAppCommandCallback(): void;
4
4
  export declare function callNative(funcName: string, params: any): Promise<any>;
5
5
  export declare function callWithPersistentCallBack(funcName: string, params: any, persistentIdName: string, callback: Function): Promise<any>;
6
- export declare function deletePersistentCallBack(persistentIdName: string): void;
6
+ export declare function deletePersistentCallBack(persistentIdName: string, callback: Function): boolean;
7
7
  export declare function callbackFromNative(callbackId: string, data: string | object): void;
8
8
  export declare function initSDK(): Promise<any>;
package/lib/index.d.ts CHANGED
@@ -12,38 +12,32 @@ declare const _default: {
12
12
  getDomainName: typeof import("./network").getDomainName;
13
13
  getCommonHeader: typeof import("./network").getCommonHeader;
14
14
  downloadToFile: typeof import("./network").downloadToFile;
15
- setDownloadListener: typeof import("./network").setDownloadListener;
16
- deleteDownloadListener: typeof import("./network").deleteDownloadListener;
17
- setStreamResponseListener: typeof import("./network").setStreamResponseListener;
18
- deleteStreamResponseListener: typeof import("./network").deleteStreamResponseListener;
19
15
  };
20
16
  app: {
17
+ getUserInfo: typeof import("./app").getUserInfo;
18
+ getHostAppInfo: typeof import("./app").getHostAppInfo;
19
+ startPage: typeof import("./app").startPage;
21
20
  startActivity: typeof import("./app").startActivity;
22
- startService: typeof import("./app").startService;
23
- sendBroadcast: typeof import("./app").sendBroadcast;
24
- sendLocalBroadcast: typeof import("./app").sendLocalBroadcast;
25
- startBackEndAction: typeof import("./app").startBackEndAction;
26
21
  exitPage: typeof import("./app").exitPage;
27
- moveTaskToBack: typeof import("./app").moveTaskToBack;
28
- getUserInfo: typeof import("./app").getUserInfo;
29
- getAppList: typeof import("./app").getAppList;
30
- getAppInfo: typeof import("./app").getAppInfo;
31
- setLocalBroadcastHook: typeof import("./app").setLocalBroadcastHook;
32
- deleteLocalBroadcastHook: typeof import("./app").deleteLocalBroadcastHook;
33
- setBroadcastHook: typeof import("./app").setBroadcastHook;
34
- deleteBroadcastHook: typeof import("./app").deleteBroadcastHook;
35
- appPrivateMethod: typeof import("./app").appPrivateMethod;
22
+ movePageToBack: typeof import("./app").movePageToBack;
23
+ startService: typeof import("./app").startService;
24
+ getInstalledAppInfo: typeof import("./app").getInstalledAppInfo;
25
+ getInstalledAppsList: typeof import("./app").getInstalledAppsList;
26
+ execActionString: typeof import("./app").execActionString;
36
27
  };
37
28
  system: {
38
- getSdkVersion: typeof import("./system").getSdkVersion;
39
- setLifeCycleHook: typeof import("./system").setLifeCycleHook;
40
- deleteLifeCycleHook: typeof import("./system").deleteLifeCycleHook;
41
- enableSystemKey: typeof import("./system").enableSystemKey;
29
+ ready: typeof import("./system").ready;
30
+ getStartupParams: typeof import("./system").getStartupParams;
42
31
  getDeviceInfo: typeof import("./system").getDeviceInfo;
32
+ getDisplayInfo: typeof import("./system").getDisplayInfo;
43
33
  getProperty: typeof import("./system").getProperty;
44
- getLocation: typeof import("./system").getLocation;
45
34
  checkApi: typeof import("./system").checkApi;
46
- getDisplayInfo: typeof import("./system").getDisplayInfo;
35
+ getFontPath: typeof import("./system").getFontPath;
36
+ setKeepScreenOn: typeof import("./system").setKeepScreenOn;
37
+ addEventListener: typeof import("./system").addEventListener;
38
+ removeEventListener: typeof import("./system").removeEventListener;
39
+ sendBroadcast: typeof import("./system").sendBroadcast;
40
+ enableSystemKey: typeof import("./system").enableSystemKey;
47
41
  };
48
42
  storage: {
49
43
  setKey: typeof import("./storage").setKey;
@@ -66,8 +60,6 @@ declare const _default: {
66
60
  setLooping: typeof import("./audio").setLooping;
67
61
  setVolume: typeof import("./audio").setVolume;
68
62
  setPlayerCore: typeof import("./audio").setPlayerCore;
69
- setListener: typeof import("./audio").setListener;
70
- deleteListener: typeof import("./audio").deleteListener;
71
63
  };
72
64
  video: {
73
65
  setVideoLayout: typeof import("./video").setVideoLayout;
@@ -91,14 +83,17 @@ declare const _default: {
91
83
  getRealPlayerCore: typeof import("./video").getRealPlayerCore;
92
84
  setPlayerCore: typeof import("./video").setPlayerCore;
93
85
  setRenderType: typeof import("./video").setRenderType;
94
- setListener: typeof import("./video").setListener;
95
- deleteListener: typeof import("./video").deleteListener;
96
86
  };
97
- nativeView: {
98
- startNewPagAni: typeof import("./nativeView").startNewPagAni;
99
- stopPagAni: typeof import("./nativeView").stopPagAni;
100
- setPagVisibility: typeof import("./nativeView").setPagVisibility;
101
- setPagXY: typeof import("./nativeView").setPagXY;
87
+ pag: {
88
+ startNewPagAni: typeof import("./pag").startNewPagAni;
89
+ stopPagAni: typeof import("./pag").stopPagAni;
90
+ setPagVisibility: typeof import("./pag").setPagVisibility;
91
+ setPagXY: typeof import("./pag").setPagXY;
92
+ };
93
+ tts: {
94
+ stopTts: typeof import("./tts").stopTts;
95
+ sendTts: typeof import("./tts").sendTts;
96
+ sendStreamTts: typeof import("./tts").sendStreamTts;
102
97
  };
103
98
  fs: {
104
99
  readAllContent: typeof import("./file").readAllContent;
@@ -24,10 +24,6 @@ export declare function getDomainName(domain: string): Promise<any>;
24
24
  export declare function getCommonHeader(): Promise<any>;
25
25
  export declare function readSse(params: SSERequestParam): Promise<any>;
26
26
  export declare function downloadToFile(url: string, tempFlag?: boolean, method?: string, header?: string, postType?: string, body?: string): Promise<any>;
27
- export declare function setDownloadListener(callback: Function): Promise<any>;
28
- export declare function deleteDownloadListener(): Promise<any>;
29
- export declare function setStreamResponseListener(callback: Function): Promise<any>;
30
- export declare function deleteStreamResponseListener(): Promise<any>;
31
27
  declare const _default: {
32
28
  simpleHttpRequest: typeof simpleHttpRequest;
33
29
  httpGet: typeof httpGet;
@@ -37,9 +33,5 @@ declare const _default: {
37
33
  getDomainName: typeof getDomainName;
38
34
  getCommonHeader: typeof getCommonHeader;
39
35
  downloadToFile: typeof downloadToFile;
40
- setDownloadListener: typeof setDownloadListener;
41
- deleteDownloadListener: typeof deleteDownloadListener;
42
- setStreamResponseListener: typeof setStreamResponseListener;
43
- deleteStreamResponseListener: typeof deleteStreamResponseListener;
44
36
  };
45
37
  export default _default;
@@ -0,0 +1,19 @@
1
+ export interface StartPAGParam {
2
+ path: string;
3
+ repeat: number;
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export declare function startNewPagAni(params: StartPAGParam): Promise<any>;
10
+ export declare function stopPagAni(): Promise<any>;
11
+ export declare function setPagVisibility(visible?: boolean): Promise<any>;
12
+ export declare function setPagXY(x: number, y: number): Promise<any>;
13
+ declare const _default: {
14
+ startNewPagAni: typeof startNewPagAni;
15
+ stopPagAni: typeof stopPagAni;
16
+ setPagVisibility: typeof setPagVisibility;
17
+ setPagXY: typeof setPagXY;
18
+ };
19
+ export default _default;
@@ -1,7 +1,7 @@
1
- export declare function setKey(key: string, value: string): Promise<any>;
2
- export declare function getKey(key: string): Promise<any>;
3
- export declare function deleteKey(key: string): Promise<any>;
4
- export declare function clearAllKeys(): Promise<any>;
1
+ export declare function setKey(key: string, value: string, namespace?: string): Promise<any>;
2
+ export declare function getKey(key: string, namespace?: string): Promise<any>;
3
+ export declare function deleteKey(key: string, namespace?: string): Promise<any>;
4
+ export declare function clearAllKeys(namespace?: string): Promise<any>;
5
5
  declare const _default: {
6
6
  setKey: typeof setKey;
7
7
  getKey: typeof getKey;
@@ -1,24 +1,37 @@
1
1
  export interface SystemKeyParam {
2
2
  keys: number[];
3
3
  }
4
- export declare function getSdkVersion(): Promise<any>;
5
- export declare function setLifeCycleHook(callback: Function): Promise<any>;
6
- export declare function deleteLifeCycleHook(): Promise<any>;
7
- export declare function enableSystemKey(params: SystemKeyParam | null): Promise<any>;
4
+ export interface IntentParam {
5
+ action?: string;
6
+ package?: string;
7
+ class?: string;
8
+ uri?: string;
9
+ extras?: any;
10
+ }
11
+ export declare function ready(): Promise<any>;
12
+ export declare function getStartupParams(): Promise<any>;
8
13
  export declare function getDeviceInfo(): Promise<any>;
14
+ export declare function getDisplayInfo(): Promise<any>;
9
15
  export declare function getProperty(key: string): Promise<any>;
10
- export declare function getLocation(): Promise<any>;
11
16
  export declare function checkApi(apiName: string): Promise<any>;
12
- export declare function getDisplayInfo(): Promise<any>;
17
+ export declare function getFontPath(fontFileName: string): Promise<any>;
18
+ export declare function setKeepScreenOn(enable: boolean): Promise<any>;
19
+ export declare function addEventListener(eventName: string, callback: Function, options?: object): Promise<any>;
20
+ export declare function removeEventListener(eventName: string, callback: Function, options?: object): Promise<any>;
21
+ export declare function sendBroadcast(params: IntentParam): Promise<any>;
22
+ export declare function enableSystemKey(params: SystemKeyParam | null): Promise<any>;
13
23
  declare const _default: {
14
- getSdkVersion: typeof getSdkVersion;
15
- setLifeCycleHook: typeof setLifeCycleHook;
16
- deleteLifeCycleHook: typeof deleteLifeCycleHook;
17
- enableSystemKey: typeof enableSystemKey;
24
+ ready: typeof ready;
25
+ getStartupParams: typeof getStartupParams;
18
26
  getDeviceInfo: typeof getDeviceInfo;
27
+ getDisplayInfo: typeof getDisplayInfo;
19
28
  getProperty: typeof getProperty;
20
- getLocation: typeof getLocation;
21
29
  checkApi: typeof checkApi;
22
- getDisplayInfo: typeof getDisplayInfo;
30
+ getFontPath: typeof getFontPath;
31
+ setKeepScreenOn: typeof setKeepScreenOn;
32
+ addEventListener: typeof addEventListener;
33
+ removeEventListener: typeof removeEventListener;
34
+ sendBroadcast: typeof sendBroadcast;
35
+ enableSystemKey: typeof enableSystemKey;
23
36
  };
24
37
  export default _default;
@@ -0,0 +1,17 @@
1
+ export interface StartPAGParam {
2
+ path: string;
3
+ repeat: number;
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export declare function stopTts(): Promise<any>;
10
+ export declare function sendTts(text: string, ttsId: string): Promise<any>;
11
+ export declare function sendStreamTts(text: string, ttsId: string, isFirst: boolean, isEnd: boolean): Promise<any>;
12
+ declare const _default: {
13
+ stopTts: typeof stopTts;
14
+ sendTts: typeof sendTts;
15
+ sendStreamTts: typeof sendStreamTts;
16
+ };
17
+ export default _default;
@@ -19,8 +19,6 @@ export declare function getPlayerCore(): Promise<any>;
19
19
  export declare function getRealPlayerCore(): Promise<any>;
20
20
  export declare function setPlayerCore(core: 'DefaultPlayer' | 'MediaPlayer' | 'SocPlayer' | 'ExoPlayer'): Promise<any>;
21
21
  export declare function setRenderType(playerRender: 'SurfaceView' | 'TextureView'): Promise<any>;
22
- export declare function setListener(callback: Function): Promise<any>;
23
- export declare function deleteListener(): Promise<any>;
24
22
  declare const _default: {
25
23
  setVideoLayout: typeof setVideoLayout;
26
24
  setVideoVisible: typeof setVideoVisible;
@@ -43,7 +41,5 @@ declare const _default: {
43
41
  getRealPlayerCore: typeof getRealPlayerCore;
44
42
  setPlayerCore: typeof setPlayerCore;
45
43
  setRenderType: typeof setRenderType;
46
- setListener: typeof setListener;
47
- deleteListener: typeof deleteListener;
48
44
  };
49
45
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccos/ccsdk-lite",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "a jssdk for coocaa tv-system",
5
5
  "type": "module",
6
6
  "main": "lib/bundle.js",