@lazycatcloud/sdk 0.1.144 → 0.1.146
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/common/media_meta.js +2 -2
- package/dist/common/media_meta.js.map +1 -1
- package/dist/extentions/app_common.d.ts.map +1 -1
- package/dist/extentions/app_common.js +43 -18
- package/dist/extentions/app_common.js.map +1 -1
- package/dist/extentions/base.d.ts +2 -2
- package/dist/extentions/base.d.ts.map +1 -1
- package/dist/extentions/base.js +3 -3
- package/dist/extentions/base.js.map +1 -1
- package/dist/package.json +10 -2
- package/package.json +10 -2
- package/common/box.ts +0 -545
- package/common/browseronly.ts +0 -520
- package/common/end_device.ts +0 -635
- package/common/file_handler.ts +0 -485
- package/common/filetrans.ts +0 -1936
- package/common/gateway.ts +0 -663
- package/common/media_meta.ts +0 -319
- package/common/message.ts +0 -242
- package/common/peripheral_device.ts +0 -783
- package/common/security_context.ts +0 -729
- package/common/users.ts +0 -1044
- package/dlna/dlna.ts +0 -895
- package/docs/contribute.md +0 -40
- package/docs/extentions/AppCommon.md +0 -30
- package/extentions/app_common.ts +0 -63
- package/extentions/base.ts +0 -459
- package/extentions/index.ts +0 -27
- package/extentions/safe_app.ts +0 -60
- package/extentions/unsafe_app.ts +0 -107
- package/google/protobuf/descriptor.ts +0 -3778
- package/google/protobuf/empty.ts +0 -64
- package/google/protobuf/timestamp.ts +0 -214
- package/grpcweb.ts +0 -106
- package/index.ts +0 -204
- package/lanforward/lanforward.ts +0 -301
- package/localdevice/clipboard.ts +0 -499
- package/localdevice/config.ts +0 -268
- package/localdevice/device.ts +0 -218
- package/localdevice/dialog.ts +0 -707
- package/localdevice/local-launch.ts +0 -954
- package/localdevice/network.ts +0 -273
- package/localdevice/permission.ts +0 -733
- package/localdevice/photo.ts +0 -1497
- package/ssdp/ssdp.ts +0 -332
- package/sys/OS_daemon.ts +0 -325
- package/sys/OS_snapshot.ts +0 -1714
- package/sys/OS_upgrader.ts +0 -782
- package/sys/btrfs.ts +0 -530
- package/sys/devopt.ts +0 -250
- package/sys/event.ts +0 -787
- package/sys/hc-core/hc-core.ts +0 -1582
- package/sys/ingress.ts +0 -953
- package/sys/network_manager.ts +0 -874
- package/sys/package_manager.ts +0 -1931
- package/sys/portal-server/portal-server.ts +0 -2934
- package/sys/snapd.ts +0 -861
- package/tsconfig.json +0 -15
package/extentions/unsafe_app.ts
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import App, { LzcClient } from './base';
|
|
2
|
-
import Extentions from "./index";
|
|
3
|
-
import LzcAppSdk from "./base";
|
|
4
|
-
|
|
5
|
-
declare global {
|
|
6
|
-
const android_ad_blocker: any
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const UNSAFE = {
|
|
10
|
-
// h5调用webview 打开App
|
|
11
|
-
OpenApp: function (url, isFullScreen) {
|
|
12
|
-
if (!App.isWebShell()) {
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
LzcClient.OpenApp(url, isFullScreen)
|
|
16
|
-
},
|
|
17
|
-
// contentView 打开指定url
|
|
18
|
-
SetContentURL: function (url) {
|
|
19
|
-
if (!App.isControlView()) {
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
LzcClient.SetContentURL(url)
|
|
23
|
-
},
|
|
24
|
-
// 获取contentView 的当前url地址
|
|
25
|
-
GetContentURL:
|
|
26
|
-
function (callback) {
|
|
27
|
-
if (!App.isControlView()) {
|
|
28
|
-
return
|
|
29
|
-
}
|
|
30
|
-
return LzcClient.GetContentURL(callback)
|
|
31
|
-
},
|
|
32
|
-
// contentView 回退
|
|
33
|
-
BackContentView:
|
|
34
|
-
function () {
|
|
35
|
-
if (!App.isControlView()) {
|
|
36
|
-
return
|
|
37
|
-
}
|
|
38
|
-
LzcClient.BackContentView()
|
|
39
|
-
},
|
|
40
|
-
// contentView 前进
|
|
41
|
-
ForwardContentView: function () {
|
|
42
|
-
if (!App.isControlView()) {
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
LzcClient.ForwardContentView();
|
|
46
|
-
},
|
|
47
|
-
// 在contentView 注入jsContent, 并且提供controlView 页面的js的 callbackMethod方法
|
|
48
|
-
InjectJS: function (jsContent, callbackMethod) {
|
|
49
|
-
if (!App.isControlView()) {
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
LzcClient.InjectJS(jsContent, callbackMethod);
|
|
53
|
-
},
|
|
54
|
-
// 获取contentView 下面指定domain的cookie
|
|
55
|
-
ReadCookie(domain) {
|
|
56
|
-
if (!App.isControlView()) {
|
|
57
|
-
return
|
|
58
|
-
}
|
|
59
|
-
return LzcClient.ReadCookie(domain)
|
|
60
|
-
},
|
|
61
|
-
// 在controlView 中执行jsContent(用于contentView通知 controlView)
|
|
62
|
-
NotifyControView: function (jsContent) {
|
|
63
|
-
if (!App.isContentView()) {
|
|
64
|
-
return
|
|
65
|
-
}
|
|
66
|
-
LzcClient.NotifyControView(jsContent);
|
|
67
|
-
},
|
|
68
|
-
// 修改contentView 的useragent
|
|
69
|
-
// 目前只支持android
|
|
70
|
-
UpdateContentViewUserAgent: function (ua) {
|
|
71
|
-
LzcClient.UpdateContentViewUserAgent(ua)
|
|
72
|
-
},
|
|
73
|
-
// contentView 执行
|
|
74
|
-
// 目前只支持android
|
|
75
|
-
XmlHttpRequest4ContentView: function (reqJsonStr) {
|
|
76
|
-
return LzcClient.XmlHttpRequest4ContentView(reqJsonStr)
|
|
77
|
-
},
|
|
78
|
-
//切换controlView 显示状态
|
|
79
|
-
// 目前只支持android
|
|
80
|
-
ToggleControlView: function () {
|
|
81
|
-
return LzcClient.ToggleControlView();
|
|
82
|
-
},
|
|
83
|
-
// 目前只支持android
|
|
84
|
-
// 设置指定key 对应的value
|
|
85
|
-
SetValue: function (key, value) {
|
|
86
|
-
LzcClient.SetValue(key, value)
|
|
87
|
-
},
|
|
88
|
-
// 获取指定key的value
|
|
89
|
-
// 目前只支持android
|
|
90
|
-
GetValue: function (key) {
|
|
91
|
-
return LzcClient.GetValue(key)
|
|
92
|
-
},
|
|
93
|
-
// callbackMethod: 结果回调方法
|
|
94
|
-
CanGoback: function (callbackMethod) {
|
|
95
|
-
return LzcClient.CanGoback(callbackMethod);
|
|
96
|
-
},
|
|
97
|
-
// controlViewHeight 两种使用方式,第一种是使用pixel: 100px ,另外一种使用百分比: 20%,
|
|
98
|
-
SetControlViewHeight: function (controlViewHeight) {
|
|
99
|
-
LzcClient.SetControlViewHeight(controlViewHeight);
|
|
100
|
-
},
|
|
101
|
-
ImportAdHosts: async function (hostUrl) {
|
|
102
|
-
if (LzcAppSdk.isAndroidWebShell()) {
|
|
103
|
-
const jsBridge = await LzcAppSdk.useNativeAsync(android_ad_blocker)
|
|
104
|
-
jsBridge.ImportAdHosts(hostUrl)
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|