@polyvharmony/live-scenes-foundation 1.3.2-rc.1 → 1.3.3
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/CHANGELOG.md +29 -1
- package/Index.d.ets +2 -0
- package/ets/modules.abc +0 -0
- package/libs/plvsocket.har +0 -0
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/common/IPLVBackwardInterface.d.ets +2 -0
- package/src/main/ets/common/PLVBasicDataSource.d.ets +2 -0
- package/src/main/ets/common/PLVCallback.d.ets +10 -8
- package/src/main/ets/common/PLVCommonConstants.d.ets +2 -0
- package/src/main/ets/common/PLVCommonEnums.d.ets +2 -0
- package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -2
- package/src/main/ets/common/PLVHashMap.d.ets +3 -1
- package/src/main/ets/common/PLVJSONUtils.d.ets +14 -12
- package/src/main/ets/common/PLVNetUtils.d.ets +6 -4
- package/src/main/ets/common/PLVPreferencesUtils.d.ets +10 -8
- package/src/main/ets/common/PLVScheduledTask.d.ets +3 -1
- package/src/main/ets/common/PLVSimpleBuffer.d.ets +5 -3
- package/src/main/ets/common/PLVSparseArray.d.ets +8 -6
- package/src/main/ets/common/PLVTextUtils.d.ets +10 -8
- package/src/main/ets/common/PLVTimeUtils.d.ets +3 -1
- package/src/main/ets/common/PLVToastUtils.d.ets +4 -2
- package/src/main/ets/common/PLVType.d.ets +2 -0
- package/src/main/ets/common/PLVUACreator.d.ets +3 -1
- package/src/main/ets/common/PLVUtils.d.ets +24 -22
- package/src/main/ets/common/PLVWebUtils.d.ets +6 -4
- package/src/main/ets/common/ui/PLVNodeController.d.ets +10 -8
- package/src/main/ets/modules/log/PLVLogger.d.ets +10 -8
- package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +4 -2
- package/src/main/ets/modules/log/PLVXLogWorker.d.ets +2 -0
- package/src/main/ets/modules/net/PLVApiConstants.d.ets +2 -0
- package/src/main/ets/modules/net/PLVHttpData.d.ets +3 -1
- package/src/main/ets/modules/net/PLVHttpError.d.ets +4 -2
- package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -8
- package/src/main/ets/modules/net/PLVRequestSetting.d.ets +5 -3
- package/src/main/ets/modules/socket/PLVSocketIO.d.ets +22 -20
- package/src/main/ets/modules/web/PLVFailureLayout.d.ets +2 -0
- package/src/main/ets/modules/web/PLVLoadingLayout.d.ets +2 -0
- package/src/main/ets/modules/web/PLVNewWindowLayout.d.ets +2 -0
- package/src/main/ets/modules/web/PLVSimpleWeb.d.ets +2 -0
- package/src/main/ets/modules/web/PLVWebController.d.ets +39 -37
- package/src/main/ets/modules/web/PLVWebModel.d.ets +2 -0
- package/src/main/module.json +1 -1
- package/Index.js +0 -30
- package/src/main/ets/common/IPLVBackwardInterface.js +0 -1
- package/src/main/ets/common/PLVBasicDataSource.js +0 -172
- package/src/main/ets/common/PLVCallback.js +0 -186
- package/src/main/ets/common/PLVCommonConstants.js +0 -11
- package/src/main/ets/common/PLVCommonEnums.js +0 -22
- package/src/main/ets/common/PLVDeviceUtils.js +0 -36
- package/src/main/ets/common/PLVHashMap.js +0 -7
- package/src/main/ets/common/PLVJSONUtils.js +0 -103
- package/src/main/ets/common/PLVNetUtils.js +0 -35
- package/src/main/ets/common/PLVPreferencesUtils.js +0 -30
- package/src/main/ets/common/PLVScheduledTask.js +0 -44
- package/src/main/ets/common/PLVSimpleBuffer.js +0 -30
- package/src/main/ets/common/PLVSparseArray.js +0 -44
- package/src/main/ets/common/PLVTextUtils.js +0 -79
- package/src/main/ets/common/PLVTimeUtils.js +0 -14
- package/src/main/ets/common/PLVToastUtils.js +0 -17
- package/src/main/ets/common/PLVType.js +0 -1
- package/src/main/ets/common/PLVUACreator.js +0 -11
- package/src/main/ets/common/PLVUtils.js +0 -241
- package/src/main/ets/common/PLVWebUtils.js +0 -78
- package/src/main/ets/common/ui/PLVNodeController.js +0 -104
- package/src/main/ets/modules/log/PLVLogger.js +0 -67
- package/src/main/ets/modules/log/PLVXLogFilePrinter.js +0 -39
- package/src/main/ets/modules/log/PLVXLogWorker.js +0 -4
- package/src/main/ets/modules/net/PLVApiConstants.js +0 -7
- package/src/main/ets/modules/net/PLVHttpData.js +0 -8
- package/src/main/ets/modules/net/PLVHttpError.js +0 -13
- package/src/main/ets/modules/net/PLVHttpRequest.js +0 -148
- package/src/main/ets/modules/net/PLVRequestSetting.js +0 -33
- package/src/main/ets/modules/socket/PLVSocketIO.js +0 -181
- package/src/main/ets/modules/web/PLVFailureLayout.js +0 -76
- package/src/main/ets/modules/web/PLVLoadingLayout.js +0 -45
- package/src/main/ets/modules/web/PLVNewWindowLayout.js +0 -61
- package/src/main/ets/modules/web/PLVSimpleWeb.js +0 -256
- package/src/main/ets/modules/web/PLVWebController.js +0 -283
- package/src/main/ets/modules/web/PLVWebModel.js +0 -1
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
if (!("finalizeConstruction" in ViewPU.prototype)) {
|
|
2
|
-
Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
|
|
3
|
-
}
|
|
4
|
-
import PLVCommonConstants from '../../common/PLVCommonConstants';
|
|
5
|
-
import { PLVFullScreenStatus, PLVWebpageStatus } from '../../common/PLVCommonEnums';
|
|
6
|
-
import PLVLogger from '../log/PLVLogger';
|
|
7
|
-
import { PLVFailureLayout } from './PLVFailureLayout';
|
|
8
|
-
import { PLVLoadingLayout } from './PLVLoadingLayout';
|
|
9
|
-
import { PLVNewWindowLayout } from './PLVNewWindowLayout';
|
|
10
|
-
import { PLVWebController } from './PLVWebController';
|
|
11
|
-
export const TAG = "[PLVSimpleWeb]";
|
|
12
|
-
export class PLVSimpleWeb extends ViewPU {
|
|
13
|
-
constructor(b21, c21, d21, e21 = -1, f21 = undefined, g21) {
|
|
14
|
-
super(b21, d21, e21, g21);
|
|
15
|
-
if (typeof f21 === "function") {
|
|
16
|
-
this.paramsGenerator_ = f21;
|
|
17
|
-
}
|
|
18
|
-
this.__webStatus = new ObservedPropertySimplePU(PLVWebpageStatus.INIT, this, "webStatus");
|
|
19
|
-
this.controller = new PLVWebController();
|
|
20
|
-
this.src = undefined;
|
|
21
|
-
this.incognitoMode = undefined;
|
|
22
|
-
this.showLoading = undefined;
|
|
23
|
-
this.setInitiallyProvidedValue(c21);
|
|
24
|
-
this.finalizeConstruction();
|
|
25
|
-
}
|
|
26
|
-
setInitiallyProvidedValue(a21) {
|
|
27
|
-
if (a21.webStatus !== undefined) {
|
|
28
|
-
this.webStatus = a21.webStatus;
|
|
29
|
-
}
|
|
30
|
-
if (a21.controller !== undefined) {
|
|
31
|
-
this.controller = a21.controller;
|
|
32
|
-
}
|
|
33
|
-
if (a21.src !== undefined) {
|
|
34
|
-
this.src = a21.src;
|
|
35
|
-
}
|
|
36
|
-
if (a21.incognitoMode !== undefined) {
|
|
37
|
-
this.incognitoMode = a21.incognitoMode;
|
|
38
|
-
}
|
|
39
|
-
if (a21.showLoading !== undefined) {
|
|
40
|
-
this.showLoading = a21.showLoading;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
updateStateVars(z20) {
|
|
44
|
-
}
|
|
45
|
-
purgeVariableDependenciesOnElmtId(y20) {
|
|
46
|
-
this.__webStatus.purgeDependencyOnElmtId(y20);
|
|
47
|
-
}
|
|
48
|
-
aboutToBeDeleted() {
|
|
49
|
-
this.__webStatus.aboutToBeDeleted();
|
|
50
|
-
SubscriberManager.Get().delete(this.id__());
|
|
51
|
-
this.aboutToBeDeletedInternal();
|
|
52
|
-
}
|
|
53
|
-
get webStatus() {
|
|
54
|
-
return this.__webStatus.get();
|
|
55
|
-
}
|
|
56
|
-
set webStatus(x20) {
|
|
57
|
-
this.__webStatus.set(x20);
|
|
58
|
-
}
|
|
59
|
-
aboutToAppear() {
|
|
60
|
-
PLVLogger.info(TAG, `load url: ${this.src}`);
|
|
61
|
-
}
|
|
62
|
-
initialRender() {
|
|
63
|
-
this.observeComponentCreation2((v20, w20) => {
|
|
64
|
-
Stack.create();
|
|
65
|
-
Stack.width(PLVCommonConstants.FULL_PERCENT);
|
|
66
|
-
Stack.height(PLVCommonConstants.FULL_PERCENT);
|
|
67
|
-
}, Stack);
|
|
68
|
-
this.observeComponentCreation2((h20, i20) => {
|
|
69
|
-
Web.create({
|
|
70
|
-
controller: this.controller,
|
|
71
|
-
src: this.src,
|
|
72
|
-
incognitoMode: this.incognitoMode
|
|
73
|
-
});
|
|
74
|
-
Web.darkMode(this.controller._darkMode);
|
|
75
|
-
Web.forceDarkAccess(this.controller._forceDarkAccess);
|
|
76
|
-
Web.domStorageAccess(this.controller._domStorageAccess);
|
|
77
|
-
Web.zoomAccess(this.controller._zoomAccess);
|
|
78
|
-
Web.fileAccess(this.controller._fileAccess);
|
|
79
|
-
Web.multiWindowAccess(this.controller._multiWindowAccess);
|
|
80
|
-
Web.allowWindowOpenMethod(this.controller._allowWindowOpenMethod);
|
|
81
|
-
Web.javaScriptAccess(this.controller._javaScriptAccess);
|
|
82
|
-
Web.mixedMode(this.controller._mixedMode);
|
|
83
|
-
Web.cacheMode(this.controller._cacheMode);
|
|
84
|
-
Web.backgroundColor(this.controller._backgroundColor);
|
|
85
|
-
Web.verticalScrollBarAccess(this.controller._verticalScrollBarAccess);
|
|
86
|
-
Web.nestedScroll(this.controller._nestedScrollOptions);
|
|
87
|
-
Web.overScrollMode(this.controller._overScrollMode);
|
|
88
|
-
Web.onControllerAttached(() => {
|
|
89
|
-
PLVLogger.info(TAG, "onControllerAttached: " + this.src);
|
|
90
|
-
this.controller.handleControllerAttached();
|
|
91
|
-
this.controller._onControllerAttached?.();
|
|
92
|
-
});
|
|
93
|
-
Web.onInterceptRequest((u20) => {
|
|
94
|
-
if (this.controller._onInterceptRequest) {
|
|
95
|
-
return this.controller._onInterceptRequest?.(u20.request);
|
|
96
|
-
}
|
|
97
|
-
return null;
|
|
98
|
-
});
|
|
99
|
-
Web.onLoadIntercept((s20) => {
|
|
100
|
-
let t20 = false;
|
|
101
|
-
if (this.controller._onLoadIntercept) {
|
|
102
|
-
t20 = this.controller._onLoadIntercept?.(s20.data);
|
|
103
|
-
}
|
|
104
|
-
t20 = t20 || this.controller.handleIsLoadIntercept(s20.data);
|
|
105
|
-
return t20;
|
|
106
|
-
});
|
|
107
|
-
Web.onWindowNew((o20) => {
|
|
108
|
-
if (this.controller._onWindowNew?.(o20)) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
this.controller.handleWindowNew(o20, (p20) => {
|
|
112
|
-
return new CustomDialogController({
|
|
113
|
-
builder: () => {
|
|
114
|
-
let q20 = new PLVNewWindowLayout(this, { webviewController: p20 }, undefined, -1, () => { }, { page: "foundation/src/main/ets/modules/web/PLVSimpleWeb.ets", line: 72, col: 24 });
|
|
115
|
-
q20.setController();
|
|
116
|
-
ViewPU.create(q20);
|
|
117
|
-
let r20 = () => {
|
|
118
|
-
return {
|
|
119
|
-
webviewController: p20
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
q20.paramsGenerator_ = r20;
|
|
123
|
-
},
|
|
124
|
-
cornerRadius: 0
|
|
125
|
-
}, this);
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
Web.onShowFileSelector((n20) => {
|
|
129
|
-
if (this.controller._onShowFileSelector) {
|
|
130
|
-
return this.controller._onShowFileSelector?.(n20);
|
|
131
|
-
}
|
|
132
|
-
return true;
|
|
133
|
-
});
|
|
134
|
-
Web.onFullScreenExit(() => {
|
|
135
|
-
PLVLogger.info(TAG, 'onFullScreenExit');
|
|
136
|
-
this.controller._fullScreenStatus = PLVFullScreenStatus.EXIT;
|
|
137
|
-
if (this.controller._onFullScreenExit?.()) {
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
this.controller.handleFullScreenExit();
|
|
141
|
-
});
|
|
142
|
-
Web.onFullScreenEnter(() => {
|
|
143
|
-
PLVLogger.info(TAG, 'onFullScreenEnter');
|
|
144
|
-
this.controller._fullScreenStatus = PLVFullScreenStatus.ENTER;
|
|
145
|
-
if (this.controller._onFullScreenEnter?.()) {
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
-
this.controller.handleFullScreenEnter();
|
|
149
|
-
});
|
|
150
|
-
Web.onProgressChange((m20) => {
|
|
151
|
-
PLVLogger.info(TAG, 'onProgressChange:' + m20?.newProgress);
|
|
152
|
-
this.controller._onProgressChange?.(m20);
|
|
153
|
-
});
|
|
154
|
-
Web.onPageBegin((l20) => {
|
|
155
|
-
PLVLogger.info(TAG, 'onPageBegin');
|
|
156
|
-
this.controller._onPageBegin?.(l20);
|
|
157
|
-
});
|
|
158
|
-
Web.onErrorReceive((k20) => {
|
|
159
|
-
PLVLogger.info(TAG, "onErrorReceive:" + `{info:${k20?.error.getErrorInfo()},code:${k20?.error.getErrorCode()}}`);
|
|
160
|
-
this.controller.handleErrorReceive();
|
|
161
|
-
this.webStatus = PLVWebpageStatus.FINISHED;
|
|
162
|
-
this.controller._onErrorReceive?.(k20);
|
|
163
|
-
});
|
|
164
|
-
Web.onPageEnd((j20) => {
|
|
165
|
-
PLVLogger.info(TAG, 'onPageEnd');
|
|
166
|
-
this.controller.handlePageEnd(j20);
|
|
167
|
-
if (this.webStatus != PLVWebpageStatus.ERROR) {
|
|
168
|
-
this.webStatus = PLVWebpageStatus.FINISHED;
|
|
169
|
-
this.controller._onPageEnd?.(j20);
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}, Web);
|
|
173
|
-
this.observeComponentCreation2((z19, a20) => {
|
|
174
|
-
If.create();
|
|
175
|
-
if (this.webStatus === PLVWebpageStatus.INIT && this.showLoading) {
|
|
176
|
-
this.ifElseBranchUpdateFunction(0, () => {
|
|
177
|
-
this.observeComponentCreation2((f20, g20) => {
|
|
178
|
-
Column.create();
|
|
179
|
-
Column.backgroundColor(Color.White);
|
|
180
|
-
}, Column);
|
|
181
|
-
{
|
|
182
|
-
this.observeComponentCreation2((b20, c20) => {
|
|
183
|
-
if (c20) {
|
|
184
|
-
let d20 = new PLVLoadingLayout(this, {}, undefined, b20, () => { }, { page: "foundation/src/main/ets/modules/web/PLVSimpleWeb.ets", line: 124, col: 11 });
|
|
185
|
-
ViewPU.create(d20);
|
|
186
|
-
let e20 = () => {
|
|
187
|
-
return {};
|
|
188
|
-
};
|
|
189
|
-
d20.paramsGenerator_ = e20;
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
this.updateStateVarsOfChildByElmtId(b20, {});
|
|
193
|
-
}
|
|
194
|
-
}, { name: "PLVLoadingLayout" });
|
|
195
|
-
}
|
|
196
|
-
Column.pop();
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
this.ifElseBranchUpdateFunction(1, () => {
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}, If);
|
|
204
|
-
If.pop();
|
|
205
|
-
this.observeComponentCreation2((r19, s19) => {
|
|
206
|
-
If.create();
|
|
207
|
-
if (this.webStatus === PLVWebpageStatus.ERROR && this.showLoading) {
|
|
208
|
-
this.ifElseBranchUpdateFunction(0, () => {
|
|
209
|
-
this.observeComponentCreation2((x19, y19) => {
|
|
210
|
-
Column.create();
|
|
211
|
-
Column.justifyContent(FlexAlign.Center);
|
|
212
|
-
Column.alignItems(HorizontalAlign.Center);
|
|
213
|
-
Column.backgroundColor(Color.White);
|
|
214
|
-
Column.width(PLVCommonConstants.FULL_PERCENT);
|
|
215
|
-
Column.height(PLVCommonConstants.FULL_PERCENT);
|
|
216
|
-
}, Column);
|
|
217
|
-
{
|
|
218
|
-
this.observeComponentCreation2((t19, u19) => {
|
|
219
|
-
if (u19) {
|
|
220
|
-
let v19 = new PLVFailureLayout(this, {
|
|
221
|
-
handleReload: () => {
|
|
222
|
-
this.webStatus = PLVWebpageStatus.INIT;
|
|
223
|
-
this.controller?.refresh();
|
|
224
|
-
}
|
|
225
|
-
}, undefined, t19, () => { }, { page: "foundation/src/main/ets/modules/web/PLVSimpleWeb.ets", line: 131, col: 11 });
|
|
226
|
-
ViewPU.create(v19);
|
|
227
|
-
let w19 = () => {
|
|
228
|
-
return {
|
|
229
|
-
handleReload: () => {
|
|
230
|
-
this.webStatus = PLVWebpageStatus.INIT;
|
|
231
|
-
this.controller?.refresh();
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
v19.paramsGenerator_ = w19;
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
this.updateStateVarsOfChildByElmtId(t19, {});
|
|
239
|
-
}
|
|
240
|
-
}, { name: "PLVFailureLayout" });
|
|
241
|
-
}
|
|
242
|
-
Column.pop();
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
else {
|
|
246
|
-
this.ifElseBranchUpdateFunction(1, () => {
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}, If);
|
|
250
|
-
If.pop();
|
|
251
|
-
Stack.pop();
|
|
252
|
-
}
|
|
253
|
-
rerender() {
|
|
254
|
-
this.updateDirtyElements();
|
|
255
|
-
}
|
|
256
|
-
}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import webview from "@ohos.web.webview";
|
|
2
|
-
import { PLVJsBridge } from 'jsbridge';
|
|
3
|
-
import { PLVFullScreenStatus, PLVWebpageStatus } from '../../common/PLVCommonEnums';
|
|
4
|
-
import PLVUtils from '../../common/PLVUtils';
|
|
5
|
-
import PLVLogger from '../log/PLVLogger';
|
|
6
|
-
const GET_VIDEO_WH_DELAY_TIME = 100;
|
|
7
|
-
const TAG = "[PLVWebController]";
|
|
8
|
-
export class PLVWebController extends webview.WebviewController {
|
|
9
|
-
constructor(m23) {
|
|
10
|
-
super(m23 || 'PLVWeb');
|
|
11
|
-
this._webStatus = PLVWebpageStatus.INIT;
|
|
12
|
-
this._fullScreenStatus = PLVFullScreenStatus.IDLE;
|
|
13
|
-
this._originalIsLayoutFullScreen = false;
|
|
14
|
-
this._originalIsFullScreen = false;
|
|
15
|
-
this._addOnReloaded = [];
|
|
16
|
-
this._darkMode = WebDarkMode.Auto;
|
|
17
|
-
this._forceDarkAccess = false;
|
|
18
|
-
this._domStorageAccess = true;
|
|
19
|
-
this._zoomAccess = true;
|
|
20
|
-
this._fileAccess = true;
|
|
21
|
-
this._multiWindowAccess = true;
|
|
22
|
-
this._allowWindowOpenMethod = true;
|
|
23
|
-
this._javaScriptAccess = true;
|
|
24
|
-
this._mixedMode = MixedMode.All;
|
|
25
|
-
this._cacheMode = CacheMode.Online;
|
|
26
|
-
this._addOnControllerAttached = [];
|
|
27
|
-
this._addOnPageEnd = [];
|
|
28
|
-
this._backgroundColor = Color.Transparent;
|
|
29
|
-
this._verticalScrollBarAccess = false;
|
|
30
|
-
this._nestedScrollOptions = { scrollForward: NestedScrollMode.SELF_FIRST, scrollBackward: NestedScrollMode.SELF_FIRST };
|
|
31
|
-
this._overScrollMode = OverScrollMode.NEVER;
|
|
32
|
-
this.dialogController = null;
|
|
33
|
-
this.jsBridge = new PLVJsBridge(this);
|
|
34
|
-
}
|
|
35
|
-
accessBackward() {
|
|
36
|
-
if (this._accessBackward?.()) {
|
|
37
|
-
return true;
|
|
38
|
-
}
|
|
39
|
-
else if (this._fullScreenStatus === PLVFullScreenStatus.ENTER) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
try {
|
|
43
|
-
return super.accessBackward();
|
|
44
|
-
}
|
|
45
|
-
catch (l23) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
backward() {
|
|
50
|
-
if (this._backward?.()) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (this._fullScreenStatus === PLVFullScreenStatus.ENTER) {
|
|
54
|
-
this._fullScreenStatus = PLVFullScreenStatus.EXIT;
|
|
55
|
-
this.runJavaScript(PLVUtils.getExitFullScreenJS(true));
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
super.backward();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
darkMode(k23) {
|
|
62
|
-
this._darkMode = k23;
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
forceDarkAccess(j23) {
|
|
66
|
-
this._forceDarkAccess = j23;
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
domStorageAccess(i23) {
|
|
70
|
-
this._domStorageAccess = i23;
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
zoomAccess(h23) {
|
|
74
|
-
this._zoomAccess = h23;
|
|
75
|
-
return this;
|
|
76
|
-
}
|
|
77
|
-
fileAccess(g23) {
|
|
78
|
-
this._fileAccess = g23;
|
|
79
|
-
return this;
|
|
80
|
-
}
|
|
81
|
-
multiWindowAccess(f23) {
|
|
82
|
-
this._multiWindowAccess = f23;
|
|
83
|
-
return this;
|
|
84
|
-
}
|
|
85
|
-
allowWindowOpenMethod(e23) {
|
|
86
|
-
this._allowWindowOpenMethod = e23;
|
|
87
|
-
return this;
|
|
88
|
-
}
|
|
89
|
-
javaScriptAccess(d23) {
|
|
90
|
-
this._javaScriptAccess = d23;
|
|
91
|
-
return this;
|
|
92
|
-
}
|
|
93
|
-
mixMode(c23) {
|
|
94
|
-
this._mixedMode = c23;
|
|
95
|
-
return this;
|
|
96
|
-
}
|
|
97
|
-
cacheMode(b23) {
|
|
98
|
-
this._cacheMode = b23;
|
|
99
|
-
return this;
|
|
100
|
-
}
|
|
101
|
-
onControllerAttached(a23) {
|
|
102
|
-
this._onControllerAttached = a23;
|
|
103
|
-
return this;
|
|
104
|
-
}
|
|
105
|
-
addOnControllerAttached(z22) {
|
|
106
|
-
this._addOnControllerAttached.push(z22);
|
|
107
|
-
return this;
|
|
108
|
-
}
|
|
109
|
-
onInterceptRequest(y22) {
|
|
110
|
-
this._onInterceptRequest = y22;
|
|
111
|
-
return this;
|
|
112
|
-
}
|
|
113
|
-
onLoadIntercept(x22) {
|
|
114
|
-
this._onLoadIntercept = x22;
|
|
115
|
-
return this;
|
|
116
|
-
}
|
|
117
|
-
onWindowNew(w22) {
|
|
118
|
-
this._onWindowNew = w22;
|
|
119
|
-
return this;
|
|
120
|
-
}
|
|
121
|
-
onShowFileSelector(v22) {
|
|
122
|
-
this._onShowFileSelector = v22;
|
|
123
|
-
return this;
|
|
124
|
-
}
|
|
125
|
-
onFullScreenEnter(u22) {
|
|
126
|
-
this._onFullScreenEnter = u22;
|
|
127
|
-
return this;
|
|
128
|
-
}
|
|
129
|
-
onFullScreenExit(t22) {
|
|
130
|
-
this._onFullScreenExit = t22;
|
|
131
|
-
return this;
|
|
132
|
-
}
|
|
133
|
-
onProgressChange(s22) {
|
|
134
|
-
this._onProgressChange = s22;
|
|
135
|
-
return this;
|
|
136
|
-
}
|
|
137
|
-
onPageBegin(r22) {
|
|
138
|
-
this._onPageBegin = r22;
|
|
139
|
-
return this;
|
|
140
|
-
}
|
|
141
|
-
onPageEnd(q22) {
|
|
142
|
-
this._onPageEnd = q22;
|
|
143
|
-
return this;
|
|
144
|
-
}
|
|
145
|
-
addOnPageEnd(p22) {
|
|
146
|
-
this._addOnPageEnd.push(p22);
|
|
147
|
-
return this;
|
|
148
|
-
}
|
|
149
|
-
onErrorReceive(o22) {
|
|
150
|
-
this._onErrorReceive = o22;
|
|
151
|
-
return this;
|
|
152
|
-
}
|
|
153
|
-
backgroundColor(n22) {
|
|
154
|
-
this._backgroundColor = n22;
|
|
155
|
-
return this;
|
|
156
|
-
}
|
|
157
|
-
verticalScrollBarAccess(m22) {
|
|
158
|
-
this._verticalScrollBarAccess = m22;
|
|
159
|
-
return this;
|
|
160
|
-
}
|
|
161
|
-
nestedScrollOptions(l22) {
|
|
162
|
-
this._nestedScrollOptions = l22;
|
|
163
|
-
return this;
|
|
164
|
-
}
|
|
165
|
-
overScrollMode(k22) {
|
|
166
|
-
this._overScrollMode = k22;
|
|
167
|
-
}
|
|
168
|
-
userAgent(j22) {
|
|
169
|
-
this._userAgent = j22;
|
|
170
|
-
return this;
|
|
171
|
-
}
|
|
172
|
-
addOnReloaded(i22) {
|
|
173
|
-
this._addOnReloaded.push(i22);
|
|
174
|
-
return this;
|
|
175
|
-
}
|
|
176
|
-
registerHandler(g22, h22) {
|
|
177
|
-
this.jsBridge.registerHandler(g22, h22);
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
callHandle(d22, e22, f22) {
|
|
181
|
-
this.jsBridge.callHandle(d22, e22, f22);
|
|
182
|
-
return this;
|
|
183
|
-
}
|
|
184
|
-
loadHtmlData(a22) {
|
|
185
|
-
PLVLogger.info(TAG, `loadHtmlData: ${a22}`);
|
|
186
|
-
try {
|
|
187
|
-
super.loadData(a22, "text/html", "UTF-8", ' ', ' ');
|
|
188
|
-
}
|
|
189
|
-
catch (b22) {
|
|
190
|
-
const c22 = b22;
|
|
191
|
-
PLVLogger.printError(TAG, `webController loadHtmlData err ${c22.code}`, c22);
|
|
192
|
-
}
|
|
193
|
-
return this;
|
|
194
|
-
}
|
|
195
|
-
loadUrlCatch(w21) {
|
|
196
|
-
PLVLogger.info(TAG, `loadUrlCatch: ${w21}`);
|
|
197
|
-
try {
|
|
198
|
-
super.loadUrl(w21);
|
|
199
|
-
this._addOnReloaded.forEach((z21) => {
|
|
200
|
-
z21();
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
catch (x21) {
|
|
204
|
-
const y21 = x21;
|
|
205
|
-
PLVLogger.printError(TAG, `webController loadUrlCatch err ${y21.code}`, y21);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
handleControllerAttached() {
|
|
209
|
-
this._addOnControllerAttached.forEach((v21) => {
|
|
210
|
-
v21();
|
|
211
|
-
});
|
|
212
|
-
if (this._userAgent) {
|
|
213
|
-
this.setCustomUserAgent(this._userAgent);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
handleFullScreenExit() {
|
|
217
|
-
if (PLVUtils.isLandscape()) {
|
|
218
|
-
PLVUtils.changeOrientation(false);
|
|
219
|
-
PLVUtils.setWindowFullScreen(this._originalIsLayoutFullScreen, this._originalIsFullScreen);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
handleFullScreenEnter() {
|
|
223
|
-
this.getVideoWHEnterFullScreen(GET_VIDEO_WH_DELAY_TIME, GET_VIDEO_WH_DELAY_TIME, GET_VIDEO_WH_DELAY_TIME * 10);
|
|
224
|
-
}
|
|
225
|
-
handleWindowNew(s21, t21) {
|
|
226
|
-
if (this.dialogController) {
|
|
227
|
-
this.dialogController.close();
|
|
228
|
-
}
|
|
229
|
-
let u21 = new webview.WebviewController();
|
|
230
|
-
this.dialogController = t21(u21);
|
|
231
|
-
this.dialogController.open();
|
|
232
|
-
s21.handler.setWebController(u21);
|
|
233
|
-
}
|
|
234
|
-
handleIsLoadIntercept(q21) {
|
|
235
|
-
try {
|
|
236
|
-
return this.jsBridge.isInterceptRequest(q21);
|
|
237
|
-
}
|
|
238
|
-
catch (r21) {
|
|
239
|
-
PLVLogger.info(TAG, 'IsLoadIntercept catch');
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
handlePageEnd(n21) {
|
|
244
|
-
this._addOnPageEnd.forEach((p21) => {
|
|
245
|
-
p21(n21);
|
|
246
|
-
});
|
|
247
|
-
this._webStatus = PLVWebpageStatus.FINISHED;
|
|
248
|
-
PLVUtils.retryWhen(() => {
|
|
249
|
-
this.jsBridge.loadLocalJs(PLVWebController.importSDKModuleContext);
|
|
250
|
-
}, () => {
|
|
251
|
-
this.jsBridge.loadLocalJs(getContext(this));
|
|
252
|
-
})
|
|
253
|
-
.then(() => {
|
|
254
|
-
PLVLogger.info(TAG, 'LoadLocalJs success');
|
|
255
|
-
})
|
|
256
|
-
.catch((o21) => {
|
|
257
|
-
PLVLogger.info(TAG, `LoadLocalJs catch\n${o21.stack}`);
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
handleErrorReceive() {
|
|
261
|
-
this._webStatus = PLVWebpageStatus.FINISHED;
|
|
262
|
-
}
|
|
263
|
-
getVideoWHEnterFullScreen(h21, i21, j21) {
|
|
264
|
-
if (h21 > j21) {
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
setTimeout(() => {
|
|
268
|
-
this.runJavaScript(PLVUtils.getVideoRectJS(true)).then((k21) => {
|
|
269
|
-
let l21 = JSON.parse(k21);
|
|
270
|
-
if (l21.width === 0 && l21.height === 0) {
|
|
271
|
-
this.getVideoWHEnterFullScreen(h21 + i21, i21, j21);
|
|
272
|
-
}
|
|
273
|
-
else if (l21.width > l21.height) {
|
|
274
|
-
PLVUtils.changeOrientation(true);
|
|
275
|
-
PLVUtils.setWindowFullScreen(true, true).then((m21) => {
|
|
276
|
-
this._originalIsLayoutFullScreen = m21[0];
|
|
277
|
-
this._originalIsFullScreen = m21[1];
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
}, h21);
|
|
282
|
-
}
|
|
283
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|