@polyvharmony/live-scenes-foundation 1.3.0-rc.3 → 1.3.1
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 +18 -1
- package/oh-package.json5 +1 -1
- package/package.json +1 -1
- package/src/main/ets/common/PLVBasicDataSource.d.ets +19 -19
- package/src/main/ets/common/PLVBasicDataSource.js +75 -75
- package/src/main/ets/common/PLVCallback.d.ets +20 -19
- package/src/main/ets/common/PLVCallback.js +78 -78
- package/src/main/ets/common/PLVCommonEnums.js +16 -16
- package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -4
- package/src/main/ets/common/PLVDeviceUtils.js +9 -9
- package/src/main/ets/common/PLVHashMap.d.ets +2 -2
- package/src/main/ets/common/PLVHashMap.js +2 -2
- package/src/main/ets/common/PLVJSONUtils.d.ets +13 -13
- package/src/main/ets/common/PLVJSONUtils.js +46 -46
- package/src/main/ets/common/PLVNetUtils.d.ets +4 -4
- package/src/main/ets/common/PLVNetUtils.js +24 -24
- package/src/main/ets/common/PLVPreferencesUtils.d.ets +9 -9
- package/src/main/ets/common/PLVPreferencesUtils.js +16 -16
- package/src/main/ets/common/PLVScheduledTask.d.ets +1 -1
- package/src/main/ets/common/PLVScheduledTask.js +9 -9
- package/src/main/ets/common/PLVSimpleBuffer.d.ets +3 -3
- package/src/main/ets/common/PLVSimpleBuffer.js +8 -8
- package/src/main/ets/common/PLVSparseArray.d.ets +6 -6
- package/src/main/ets/common/PLVSparseArray.js +21 -21
- package/src/main/ets/common/PLVTextUtils.d.ets +8 -8
- package/src/main/ets/common/PLVTextUtils.js +44 -44
- package/src/main/ets/common/PLVTimeUtils.d.ets +1 -1
- package/src/main/ets/common/PLVTimeUtils.js +8 -8
- package/src/main/ets/common/PLVToastUtils.d.ets +4 -4
- package/src/main/ets/common/PLVToastUtils.js +7 -7
- package/src/main/ets/common/PLVUACreator.d.ets +1 -1
- package/src/main/ets/common/PLVUACreator.js +6 -6
- package/src/main/ets/common/PLVUtils.d.ets +25 -24
- package/src/main/ets/common/PLVUtils.js +141 -141
- package/src/main/ets/common/PLVWebUtils.d.ets +4 -4
- package/src/main/ets/common/PLVWebUtils.js +46 -47
- package/src/main/ets/common/ui/PLVNodeController.d.ets +11 -9
- package/src/main/ets/common/ui/PLVNodeController.js +48 -47
- package/src/main/ets/modules/log/PLVLogger.d.ets +11 -11
- package/src/main/ets/modules/log/PLVLogger.js +36 -36
- package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +2 -2
- package/src/main/ets/modules/log/PLVXLogFilePrinter.js +14 -12
- package/src/main/ets/modules/net/PLVHttpData.d.ets +1 -1
- package/src/main/ets/modules/net/PLVHttpData.js +3 -3
- package/src/main/ets/modules/net/PLVHttpError.d.ets +2 -2
- package/src/main/ets/modules/net/PLVHttpError.js +5 -5
- package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -9
- package/src/main/ets/modules/net/PLVHttpRequest.js +89 -88
- package/src/main/ets/modules/net/PLVRequestSetting.d.ets +3 -3
- package/src/main/ets/modules/net/PLVRequestSetting.js +14 -14
- package/src/main/ets/modules/socket/PLVSocketIO.d.ets +20 -20
- package/src/main/ets/modules/socket/PLVSocketIO.js +61 -61
- package/src/main/ets/modules/web/PLVFailureLayout.js +17 -18
- package/src/main/ets/modules/web/PLVLoadingLayout.js +12 -13
- package/src/main/ets/modules/web/PLVNewWindowLayout.js +17 -18
- package/src/main/ets/modules/web/PLVSimpleWeb.js +75 -79
- package/src/main/ets/modules/web/PLVWebController.d.ets +39 -39
- package/src/main/ets/modules/web/PLVWebController.js +106 -106
- package/src/main/module.json +1 -1
|
@@ -3,11 +3,11 @@ import { PLVJsBridge } from 'jsbridge';
|
|
|
3
3
|
import { PLVFullScreenStatus, PLVWebpageStatus } from '../../common/PLVCommonEnums';
|
|
4
4
|
import PLVUtils from '../../common/PLVUtils';
|
|
5
5
|
import PLVLogger from '../log/PLVLogger';
|
|
6
|
-
const
|
|
6
|
+
const GET_VIDEO_WH_DELAY_TIME = 100;
|
|
7
7
|
const TAG = "[PLVWebController]";
|
|
8
8
|
export class PLVWebController extends webview.WebviewController {
|
|
9
|
-
constructor(
|
|
10
|
-
super(
|
|
9
|
+
constructor(m23) {
|
|
10
|
+
super(m23 || 'PLVWeb');
|
|
11
11
|
this._webStatus = PLVWebpageStatus.INIT;
|
|
12
12
|
this._fullScreenStatus = PLVFullScreenStatus.IDLE;
|
|
13
13
|
this._originalIsLayoutFullScreen = false;
|
|
@@ -42,7 +42,7 @@ export class PLVWebController extends webview.WebviewController {
|
|
|
42
42
|
try {
|
|
43
43
|
return super.accessBackward();
|
|
44
44
|
}
|
|
45
|
-
catch (
|
|
45
|
+
catch (l23) {
|
|
46
46
|
return false;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -58,156 +58,156 @@ export class PLVWebController extends webview.WebviewController {
|
|
|
58
58
|
super.backward();
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
darkMode(
|
|
62
|
-
this._darkMode =
|
|
61
|
+
darkMode(k23) {
|
|
62
|
+
this._darkMode = k23;
|
|
63
63
|
return this;
|
|
64
64
|
}
|
|
65
|
-
forceDarkAccess(
|
|
66
|
-
this._forceDarkAccess =
|
|
65
|
+
forceDarkAccess(j23) {
|
|
66
|
+
this._forceDarkAccess = j23;
|
|
67
67
|
return this;
|
|
68
68
|
}
|
|
69
|
-
domStorageAccess(
|
|
70
|
-
this._domStorageAccess =
|
|
69
|
+
domStorageAccess(i23) {
|
|
70
|
+
this._domStorageAccess = i23;
|
|
71
71
|
return this;
|
|
72
72
|
}
|
|
73
|
-
zoomAccess(
|
|
74
|
-
this._zoomAccess =
|
|
73
|
+
zoomAccess(h23) {
|
|
74
|
+
this._zoomAccess = h23;
|
|
75
75
|
return this;
|
|
76
76
|
}
|
|
77
|
-
fileAccess(
|
|
78
|
-
this._fileAccess =
|
|
77
|
+
fileAccess(g23) {
|
|
78
|
+
this._fileAccess = g23;
|
|
79
79
|
return this;
|
|
80
80
|
}
|
|
81
|
-
multiWindowAccess(
|
|
82
|
-
this._multiWindowAccess =
|
|
81
|
+
multiWindowAccess(f23) {
|
|
82
|
+
this._multiWindowAccess = f23;
|
|
83
83
|
return this;
|
|
84
84
|
}
|
|
85
|
-
allowWindowOpenMethod(
|
|
86
|
-
this._allowWindowOpenMethod =
|
|
85
|
+
allowWindowOpenMethod(e23) {
|
|
86
|
+
this._allowWindowOpenMethod = e23;
|
|
87
87
|
return this;
|
|
88
88
|
}
|
|
89
|
-
javaScriptAccess(
|
|
90
|
-
this._javaScriptAccess =
|
|
89
|
+
javaScriptAccess(d23) {
|
|
90
|
+
this._javaScriptAccess = d23;
|
|
91
91
|
return this;
|
|
92
92
|
}
|
|
93
|
-
mixMode(
|
|
94
|
-
this._mixedMode =
|
|
93
|
+
mixMode(c23) {
|
|
94
|
+
this._mixedMode = c23;
|
|
95
95
|
return this;
|
|
96
96
|
}
|
|
97
|
-
cacheMode(
|
|
98
|
-
this._cacheMode =
|
|
97
|
+
cacheMode(b23) {
|
|
98
|
+
this._cacheMode = b23;
|
|
99
99
|
return this;
|
|
100
100
|
}
|
|
101
|
-
onControllerAttached(
|
|
102
|
-
this._onControllerAttached =
|
|
101
|
+
onControllerAttached(a23) {
|
|
102
|
+
this._onControllerAttached = a23;
|
|
103
103
|
return this;
|
|
104
104
|
}
|
|
105
|
-
addOnControllerAttached(
|
|
106
|
-
this._addOnControllerAttached.push(
|
|
105
|
+
addOnControllerAttached(z22) {
|
|
106
|
+
this._addOnControllerAttached.push(z22);
|
|
107
107
|
return this;
|
|
108
108
|
}
|
|
109
|
-
onInterceptRequest(
|
|
110
|
-
this._onInterceptRequest =
|
|
109
|
+
onInterceptRequest(y22) {
|
|
110
|
+
this._onInterceptRequest = y22;
|
|
111
111
|
return this;
|
|
112
112
|
}
|
|
113
|
-
onLoadIntercept(
|
|
114
|
-
this._onLoadIntercept =
|
|
113
|
+
onLoadIntercept(x22) {
|
|
114
|
+
this._onLoadIntercept = x22;
|
|
115
115
|
return this;
|
|
116
116
|
}
|
|
117
|
-
onWindowNew(
|
|
118
|
-
this._onWindowNew =
|
|
117
|
+
onWindowNew(w22) {
|
|
118
|
+
this._onWindowNew = w22;
|
|
119
119
|
return this;
|
|
120
120
|
}
|
|
121
|
-
onShowFileSelector(
|
|
122
|
-
this._onShowFileSelector =
|
|
121
|
+
onShowFileSelector(v22) {
|
|
122
|
+
this._onShowFileSelector = v22;
|
|
123
123
|
return this;
|
|
124
124
|
}
|
|
125
|
-
onFullScreenEnter(
|
|
126
|
-
this._onFullScreenEnter =
|
|
125
|
+
onFullScreenEnter(u22) {
|
|
126
|
+
this._onFullScreenEnter = u22;
|
|
127
127
|
return this;
|
|
128
128
|
}
|
|
129
|
-
onFullScreenExit(
|
|
130
|
-
this._onFullScreenExit =
|
|
129
|
+
onFullScreenExit(t22) {
|
|
130
|
+
this._onFullScreenExit = t22;
|
|
131
131
|
return this;
|
|
132
132
|
}
|
|
133
|
-
onProgressChange(
|
|
134
|
-
this._onProgressChange =
|
|
133
|
+
onProgressChange(s22) {
|
|
134
|
+
this._onProgressChange = s22;
|
|
135
135
|
return this;
|
|
136
136
|
}
|
|
137
|
-
onPageBegin(
|
|
138
|
-
this._onPageBegin =
|
|
137
|
+
onPageBegin(r22) {
|
|
138
|
+
this._onPageBegin = r22;
|
|
139
139
|
return this;
|
|
140
140
|
}
|
|
141
|
-
onPageEnd(
|
|
142
|
-
this._onPageEnd =
|
|
141
|
+
onPageEnd(q22) {
|
|
142
|
+
this._onPageEnd = q22;
|
|
143
143
|
return this;
|
|
144
144
|
}
|
|
145
|
-
addOnPageEnd(
|
|
146
|
-
this._addOnPageEnd.push(
|
|
145
|
+
addOnPageEnd(p22) {
|
|
146
|
+
this._addOnPageEnd.push(p22);
|
|
147
147
|
return this;
|
|
148
148
|
}
|
|
149
|
-
onErrorReceive(
|
|
150
|
-
this._onErrorReceive =
|
|
149
|
+
onErrorReceive(o22) {
|
|
150
|
+
this._onErrorReceive = o22;
|
|
151
151
|
return this;
|
|
152
152
|
}
|
|
153
|
-
backgroundColor(
|
|
154
|
-
this._backgroundColor =
|
|
153
|
+
backgroundColor(n22) {
|
|
154
|
+
this._backgroundColor = n22;
|
|
155
155
|
return this;
|
|
156
156
|
}
|
|
157
|
-
verticalScrollBarAccess(
|
|
158
|
-
this._verticalScrollBarAccess =
|
|
157
|
+
verticalScrollBarAccess(m22) {
|
|
158
|
+
this._verticalScrollBarAccess = m22;
|
|
159
159
|
return this;
|
|
160
160
|
}
|
|
161
|
-
nestedScrollOptions(
|
|
162
|
-
this._nestedScrollOptions =
|
|
161
|
+
nestedScrollOptions(l22) {
|
|
162
|
+
this._nestedScrollOptions = l22;
|
|
163
163
|
return this;
|
|
164
164
|
}
|
|
165
|
-
overScrollMode(
|
|
166
|
-
this._overScrollMode =
|
|
165
|
+
overScrollMode(k22) {
|
|
166
|
+
this._overScrollMode = k22;
|
|
167
167
|
}
|
|
168
|
-
userAgent(
|
|
169
|
-
this._userAgent =
|
|
168
|
+
userAgent(j22) {
|
|
169
|
+
this._userAgent = j22;
|
|
170
170
|
return this;
|
|
171
171
|
}
|
|
172
|
-
addOnReloaded(
|
|
173
|
-
this._addOnReloaded.push(
|
|
172
|
+
addOnReloaded(i22) {
|
|
173
|
+
this._addOnReloaded.push(i22);
|
|
174
174
|
return this;
|
|
175
175
|
}
|
|
176
|
-
registerHandler(
|
|
177
|
-
this.jsBridge.registerHandler(
|
|
176
|
+
registerHandler(g22, h22) {
|
|
177
|
+
this.jsBridge.registerHandler(g22, h22);
|
|
178
178
|
return this;
|
|
179
179
|
}
|
|
180
|
-
callHandle(
|
|
181
|
-
this.jsBridge.callHandle(
|
|
180
|
+
callHandle(d22, e22, f22) {
|
|
181
|
+
this.jsBridge.callHandle(d22, e22, f22);
|
|
182
182
|
return this;
|
|
183
183
|
}
|
|
184
|
-
loadHtmlData(
|
|
185
|
-
PLVLogger.info(TAG, `loadHtmlData: ${
|
|
184
|
+
loadHtmlData(a22) {
|
|
185
|
+
PLVLogger.info(TAG, `loadHtmlData: ${a22}`);
|
|
186
186
|
try {
|
|
187
|
-
super.loadData(
|
|
187
|
+
super.loadData(a22, "text/html", "UTF-8", ' ', ' ');
|
|
188
188
|
}
|
|
189
|
-
catch (
|
|
190
|
-
const
|
|
191
|
-
PLVLogger.printError(TAG, `webController loadHtmlData err ${
|
|
189
|
+
catch (b22) {
|
|
190
|
+
const c22 = b22;
|
|
191
|
+
PLVLogger.printError(TAG, `webController loadHtmlData err ${c22.code}`, c22);
|
|
192
192
|
}
|
|
193
193
|
return this;
|
|
194
194
|
}
|
|
195
|
-
loadUrlCatch(
|
|
196
|
-
PLVLogger.info(TAG, `loadUrlCatch: ${
|
|
195
|
+
loadUrlCatch(w21) {
|
|
196
|
+
PLVLogger.info(TAG, `loadUrlCatch: ${w21}`);
|
|
197
197
|
try {
|
|
198
|
-
super.loadUrl(
|
|
199
|
-
this._addOnReloaded.forEach((
|
|
200
|
-
|
|
198
|
+
super.loadUrl(w21);
|
|
199
|
+
this._addOnReloaded.forEach((z21) => {
|
|
200
|
+
z21();
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
catch (
|
|
204
|
-
const
|
|
205
|
-
PLVLogger.printError(TAG, `webController loadUrlCatch err ${
|
|
203
|
+
catch (x21) {
|
|
204
|
+
const y21 = x21;
|
|
205
|
+
PLVLogger.printError(TAG, `webController loadUrlCatch err ${y21.code}`, y21);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
handleControllerAttached() {
|
|
209
|
-
this._addOnControllerAttached.forEach((
|
|
210
|
-
|
|
209
|
+
this._addOnControllerAttached.forEach((v21) => {
|
|
210
|
+
v21();
|
|
211
211
|
});
|
|
212
212
|
if (this._userAgent) {
|
|
213
213
|
this.setCustomUserAgent(this._userAgent);
|
|
@@ -220,29 +220,29 @@ export class PLVWebController extends webview.WebviewController {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
handleFullScreenEnter() {
|
|
223
|
-
this.getVideoWHEnterFullScreen(
|
|
223
|
+
this.getVideoWHEnterFullScreen(GET_VIDEO_WH_DELAY_TIME, GET_VIDEO_WH_DELAY_TIME, GET_VIDEO_WH_DELAY_TIME * 10);
|
|
224
224
|
}
|
|
225
|
-
handleWindowNew(
|
|
225
|
+
handleWindowNew(s21, t21) {
|
|
226
226
|
if (this.dialogController) {
|
|
227
227
|
this.dialogController.close();
|
|
228
228
|
}
|
|
229
|
-
let
|
|
230
|
-
this.dialogController =
|
|
229
|
+
let u21 = new webview.WebviewController();
|
|
230
|
+
this.dialogController = t21(u21);
|
|
231
231
|
this.dialogController.open();
|
|
232
|
-
|
|
232
|
+
s21.handler.setWebController(u21);
|
|
233
233
|
}
|
|
234
|
-
handleIsLoadIntercept(
|
|
234
|
+
handleIsLoadIntercept(q21) {
|
|
235
235
|
try {
|
|
236
|
-
return this.jsBridge.isInterceptRequest(
|
|
236
|
+
return this.jsBridge.isInterceptRequest(q21);
|
|
237
237
|
}
|
|
238
|
-
catch (
|
|
238
|
+
catch (r21) {
|
|
239
239
|
PLVLogger.info(TAG, 'IsLoadIntercept catch');
|
|
240
240
|
return false;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
handlePageEnd(
|
|
244
|
-
this._addOnPageEnd.forEach((
|
|
245
|
-
|
|
243
|
+
handlePageEnd(n21) {
|
|
244
|
+
this._addOnPageEnd.forEach((p21) => {
|
|
245
|
+
p21(n21);
|
|
246
246
|
});
|
|
247
247
|
this._webStatus = PLVWebpageStatus.FINISHED;
|
|
248
248
|
PLVUtils.retryWhen(() => {
|
|
@@ -253,31 +253,31 @@ export class PLVWebController extends webview.WebviewController {
|
|
|
253
253
|
.then(() => {
|
|
254
254
|
PLVLogger.info(TAG, 'LoadLocalJs success');
|
|
255
255
|
})
|
|
256
|
-
.catch((
|
|
257
|
-
PLVLogger.info(TAG, `LoadLocalJs catch\n${
|
|
256
|
+
.catch((o21) => {
|
|
257
|
+
PLVLogger.info(TAG, `LoadLocalJs catch\n${o21.stack}`);
|
|
258
258
|
});
|
|
259
259
|
}
|
|
260
260
|
handleErrorReceive() {
|
|
261
261
|
this._webStatus = PLVWebpageStatus.FINISHED;
|
|
262
262
|
}
|
|
263
|
-
getVideoWHEnterFullScreen(
|
|
264
|
-
if (
|
|
263
|
+
getVideoWHEnterFullScreen(h21, i21, j21) {
|
|
264
|
+
if (h21 > j21) {
|
|
265
265
|
return;
|
|
266
266
|
}
|
|
267
267
|
setTimeout(() => {
|
|
268
|
-
this.runJavaScript(PLVUtils.getVideoRectJS(true)).then((
|
|
269
|
-
let
|
|
270
|
-
if (
|
|
271
|
-
this.getVideoWHEnterFullScreen(
|
|
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
272
|
}
|
|
273
|
-
else if (
|
|
273
|
+
else if (l21.width > l21.height) {
|
|
274
274
|
PLVUtils.changeOrientation(true);
|
|
275
|
-
PLVUtils.setWindowFullScreen(true, true).then((
|
|
276
|
-
this._originalIsLayoutFullScreen =
|
|
277
|
-
this._originalIsFullScreen =
|
|
275
|
+
PLVUtils.setWindowFullScreen(true, true).then((m21) => {
|
|
276
|
+
this._originalIsLayoutFullScreen = m21[0];
|
|
277
|
+
this._originalIsFullScreen = m21[1];
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
|
-
},
|
|
281
|
+
}, h21);
|
|
282
282
|
}
|
|
283
283
|
}
|
package/src/main/module.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"app":{"bundleName":"net.plv.livescenes.demo","debug":false,"versionCode":
|
|
1
|
+
{"app":{"bundleName":"net.plv.livescenes.demo","debug":false,"versionCode":1030100,"versionName":"1.3.1","minAPIVersion":50000012,"targetAPIVersion":60000020,"apiReleaseType":"Release","targetMinorAPIVersion":0,"targetPatchAPIVersion":0,"compileSdkVersion":"6.0.0.47","compileSdkType":"HarmonyOS","appEnvironments":[],"bundleType":"app","buildMode":"release"},"module":{"name":"foundation","type":"har","deviceTypes":["default","tablet","2in1"],"packageName":"@polyvharmony/live-scenes-foundation","installationFree":false,"virtualMachine":"ark12.0.2.0","compileMode":"esmodule","dependencies":[]}}
|