@polyvharmony/live-scenes-foundation 1.3.0 → 1.3.2-rc.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/ResourceTable.txt +17 -17
  3. package/oh-package.json5 +1 -1
  4. package/package.json +1 -1
  5. package/src/main/ets/common/PLVBasicDataSource.d.ets +19 -19
  6. package/src/main/ets/common/PLVBasicDataSource.js +75 -75
  7. package/src/main/ets/common/PLVCallback.d.ets +20 -19
  8. package/src/main/ets/common/PLVCallback.js +78 -78
  9. package/src/main/ets/common/PLVCommonEnums.js +16 -16
  10. package/src/main/ets/common/PLVDeviceUtils.d.ets +4 -4
  11. package/src/main/ets/common/PLVDeviceUtils.js +9 -9
  12. package/src/main/ets/common/PLVHashMap.d.ets +2 -2
  13. package/src/main/ets/common/PLVHashMap.js +2 -2
  14. package/src/main/ets/common/PLVJSONUtils.d.ets +13 -13
  15. package/src/main/ets/common/PLVJSONUtils.js +46 -46
  16. package/src/main/ets/common/PLVNetUtils.d.ets +4 -4
  17. package/src/main/ets/common/PLVNetUtils.js +24 -24
  18. package/src/main/ets/common/PLVPreferencesUtils.d.ets +9 -9
  19. package/src/main/ets/common/PLVPreferencesUtils.js +16 -16
  20. package/src/main/ets/common/PLVScheduledTask.d.ets +1 -1
  21. package/src/main/ets/common/PLVScheduledTask.js +9 -9
  22. package/src/main/ets/common/PLVSimpleBuffer.d.ets +3 -3
  23. package/src/main/ets/common/PLVSimpleBuffer.js +8 -8
  24. package/src/main/ets/common/PLVSparseArray.d.ets +6 -6
  25. package/src/main/ets/common/PLVSparseArray.js +21 -21
  26. package/src/main/ets/common/PLVTextUtils.d.ets +8 -8
  27. package/src/main/ets/common/PLVTextUtils.js +44 -44
  28. package/src/main/ets/common/PLVTimeUtils.d.ets +1 -1
  29. package/src/main/ets/common/PLVTimeUtils.js +8 -8
  30. package/src/main/ets/common/PLVToastUtils.d.ets +4 -4
  31. package/src/main/ets/common/PLVToastUtils.js +7 -7
  32. package/src/main/ets/common/PLVUACreator.d.ets +1 -1
  33. package/src/main/ets/common/PLVUACreator.js +6 -6
  34. package/src/main/ets/common/PLVUtils.d.ets +25 -24
  35. package/src/main/ets/common/PLVUtils.js +141 -141
  36. package/src/main/ets/common/PLVWebUtils.d.ets +4 -4
  37. package/src/main/ets/common/PLVWebUtils.js +46 -47
  38. package/src/main/ets/common/ui/PLVNodeController.d.ets +11 -9
  39. package/src/main/ets/common/ui/PLVNodeController.js +48 -47
  40. package/src/main/ets/modules/log/PLVLogger.d.ets +11 -11
  41. package/src/main/ets/modules/log/PLVLogger.js +36 -36
  42. package/src/main/ets/modules/log/PLVXLogFilePrinter.d.ets +2 -2
  43. package/src/main/ets/modules/log/PLVXLogFilePrinter.js +14 -12
  44. package/src/main/ets/modules/net/PLVHttpData.d.ets +1 -1
  45. package/src/main/ets/modules/net/PLVHttpData.js +3 -3
  46. package/src/main/ets/modules/net/PLVHttpError.d.ets +2 -2
  47. package/src/main/ets/modules/net/PLVHttpError.js +5 -5
  48. package/src/main/ets/modules/net/PLVHttpRequest.d.ets +10 -9
  49. package/src/main/ets/modules/net/PLVHttpRequest.js +89 -88
  50. package/src/main/ets/modules/net/PLVRequestSetting.d.ets +3 -3
  51. package/src/main/ets/modules/net/PLVRequestSetting.js +14 -14
  52. package/src/main/ets/modules/socket/PLVSocketIO.d.ets +20 -20
  53. package/src/main/ets/modules/socket/PLVSocketIO.js +61 -61
  54. package/src/main/ets/modules/web/PLVFailureLayout.js +17 -18
  55. package/src/main/ets/modules/web/PLVLoadingLayout.js +12 -13
  56. package/src/main/ets/modules/web/PLVNewWindowLayout.js +17 -18
  57. package/src/main/ets/modules/web/PLVSimpleWeb.js +75 -79
  58. package/src/main/ets/modules/web/PLVWebController.d.ets +39 -39
  59. package/src/main/ets/modules/web/PLVWebController.js +106 -106
  60. 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 k8 = 100;
6
+ const GET_VIDEO_WH_DELAY_TIME = 100;
7
7
  const TAG = "[PLVWebController]";
8
8
  export class PLVWebController extends webview.WebviewController {
9
- constructor(webTag) {
10
- super(webTag || 'PLVWeb');
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 (e) {
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(darkMode) {
62
- this._darkMode = darkMode;
61
+ darkMode(k23) {
62
+ this._darkMode = k23;
63
63
  return this;
64
64
  }
65
- forceDarkAccess(forceDarkAccess) {
66
- this._forceDarkAccess = forceDarkAccess;
65
+ forceDarkAccess(j23) {
66
+ this._forceDarkAccess = j23;
67
67
  return this;
68
68
  }
69
- domStorageAccess(domStorageAccess) {
70
- this._domStorageAccess = domStorageAccess;
69
+ domStorageAccess(i23) {
70
+ this._domStorageAccess = i23;
71
71
  return this;
72
72
  }
73
- zoomAccess(zoomAccess) {
74
- this._zoomAccess = zoomAccess;
73
+ zoomAccess(h23) {
74
+ this._zoomAccess = h23;
75
75
  return this;
76
76
  }
77
- fileAccess(fileAccess) {
78
- this._fileAccess = fileAccess;
77
+ fileAccess(g23) {
78
+ this._fileAccess = g23;
79
79
  return this;
80
80
  }
81
- multiWindowAccess(multiWindowAccess) {
82
- this._multiWindowAccess = multiWindowAccess;
81
+ multiWindowAccess(f23) {
82
+ this._multiWindowAccess = f23;
83
83
  return this;
84
84
  }
85
- allowWindowOpenMethod(allowWindowOpenMethod) {
86
- this._allowWindowOpenMethod = allowWindowOpenMethod;
85
+ allowWindowOpenMethod(e23) {
86
+ this._allowWindowOpenMethod = e23;
87
87
  return this;
88
88
  }
89
- javaScriptAccess(javaScriptAccess) {
90
- this._javaScriptAccess = javaScriptAccess;
89
+ javaScriptAccess(d23) {
90
+ this._javaScriptAccess = d23;
91
91
  return this;
92
92
  }
93
- mixMode(mixedMode) {
94
- this._mixedMode = mixedMode;
93
+ mixMode(c23) {
94
+ this._mixedMode = c23;
95
95
  return this;
96
96
  }
97
- cacheMode(cacheMode) {
98
- this._cacheMode = cacheMode;
97
+ cacheMode(b23) {
98
+ this._cacheMode = b23;
99
99
  return this;
100
100
  }
101
- onControllerAttached(callback) {
102
- this._onControllerAttached = callback;
101
+ onControllerAttached(a23) {
102
+ this._onControllerAttached = a23;
103
103
  return this;
104
104
  }
105
- addOnControllerAttached(callback) {
106
- this._addOnControllerAttached.push(callback);
105
+ addOnControllerAttached(z22) {
106
+ this._addOnControllerAttached.push(z22);
107
107
  return this;
108
108
  }
109
- onInterceptRequest(callback) {
110
- this._onInterceptRequest = callback;
109
+ onInterceptRequest(y22) {
110
+ this._onInterceptRequest = y22;
111
111
  return this;
112
112
  }
113
- onLoadIntercept(callback) {
114
- this._onLoadIntercept = callback;
113
+ onLoadIntercept(x22) {
114
+ this._onLoadIntercept = x22;
115
115
  return this;
116
116
  }
117
- onWindowNew(callback) {
118
- this._onWindowNew = callback;
117
+ onWindowNew(w22) {
118
+ this._onWindowNew = w22;
119
119
  return this;
120
120
  }
121
- onShowFileSelector(callback) {
122
- this._onShowFileSelector = callback;
121
+ onShowFileSelector(v22) {
122
+ this._onShowFileSelector = v22;
123
123
  return this;
124
124
  }
125
- onFullScreenEnter(callback) {
126
- this._onFullScreenEnter = callback;
125
+ onFullScreenEnter(u22) {
126
+ this._onFullScreenEnter = u22;
127
127
  return this;
128
128
  }
129
- onFullScreenExit(callback) {
130
- this._onFullScreenExit = callback;
129
+ onFullScreenExit(t22) {
130
+ this._onFullScreenExit = t22;
131
131
  return this;
132
132
  }
133
- onProgressChange(callback) {
134
- this._onProgressChange = callback;
133
+ onProgressChange(s22) {
134
+ this._onProgressChange = s22;
135
135
  return this;
136
136
  }
137
- onPageBegin(callback) {
138
- this._onPageBegin = callback;
137
+ onPageBegin(r22) {
138
+ this._onPageBegin = r22;
139
139
  return this;
140
140
  }
141
- onPageEnd(callback) {
142
- this._onPageEnd = callback;
141
+ onPageEnd(q22) {
142
+ this._onPageEnd = q22;
143
143
  return this;
144
144
  }
145
- addOnPageEnd(callback) {
146
- this._addOnPageEnd.push(callback);
145
+ addOnPageEnd(p22) {
146
+ this._addOnPageEnd.push(p22);
147
147
  return this;
148
148
  }
149
- onErrorReceive(callback) {
150
- this._onErrorReceive = callback;
149
+ onErrorReceive(o22) {
150
+ this._onErrorReceive = o22;
151
151
  return this;
152
152
  }
153
- backgroundColor(backgroundColor) {
154
- this._backgroundColor = backgroundColor;
153
+ backgroundColor(n22) {
154
+ this._backgroundColor = n22;
155
155
  return this;
156
156
  }
157
- verticalScrollBarAccess(verticalScrollBarAccess) {
158
- this._verticalScrollBarAccess = verticalScrollBarAccess;
157
+ verticalScrollBarAccess(m22) {
158
+ this._verticalScrollBarAccess = m22;
159
159
  return this;
160
160
  }
161
- nestedScrollOptions(t8) {
162
- this._nestedScrollOptions = t8;
161
+ nestedScrollOptions(l22) {
162
+ this._nestedScrollOptions = l22;
163
163
  return this;
164
164
  }
165
- overScrollMode(overScrollMode) {
166
- this._overScrollMode = overScrollMode;
165
+ overScrollMode(k22) {
166
+ this._overScrollMode = k22;
167
167
  }
168
- userAgent(userAgent) {
169
- this._userAgent = userAgent;
168
+ userAgent(j22) {
169
+ this._userAgent = j22;
170
170
  return this;
171
171
  }
172
- addOnReloaded(callback) {
173
- this._addOnReloaded.push(callback);
172
+ addOnReloaded(i22) {
173
+ this._addOnReloaded.push(i22);
174
174
  return this;
175
175
  }
176
- registerHandler(s8, handle) {
177
- this.jsBridge.registerHandler(s8, handle);
176
+ registerHandler(g22, h22) {
177
+ this.jsBridge.registerHandler(g22, h22);
178
178
  return this;
179
179
  }
180
- callHandle(q8, data, r8) {
181
- this.jsBridge.callHandle(q8, data, r8);
180
+ callHandle(d22, e22, f22) {
181
+ this.jsBridge.callHandle(d22, e22, f22);
182
182
  return this;
183
183
  }
184
- loadHtmlData(data) {
185
- PLVLogger.info(TAG, `loadHtmlData: ${data}`);
184
+ loadHtmlData(a22) {
185
+ PLVLogger.info(TAG, `loadHtmlData: ${a22}`);
186
186
  try {
187
- super.loadData(data, "text/html", "UTF-8", ' ', ' ');
187
+ super.loadData(a22, "text/html", "UTF-8", ' ', ' ');
188
188
  }
189
- catch (err) {
190
- const e = err;
191
- PLVLogger.printError(TAG, `webController loadHtmlData err ${e.code}`, e);
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(url) {
196
- PLVLogger.info(TAG, `loadUrlCatch: ${url}`);
195
+ loadUrlCatch(w21) {
196
+ PLVLogger.info(TAG, `loadUrlCatch: ${w21}`);
197
197
  try {
198
- super.loadUrl(url);
199
- this._addOnReloaded.forEach((value) => {
200
- value();
198
+ super.loadUrl(w21);
199
+ this._addOnReloaded.forEach((z21) => {
200
+ z21();
201
201
  });
202
202
  }
203
- catch (err) {
204
- const e = err;
205
- PLVLogger.printError(TAG, `webController loadUrlCatch err ${e.code}`, e);
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((value) => {
210
- value();
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(k8, k8, k8 * 10);
223
+ this.getVideoWHEnterFullScreen(GET_VIDEO_WH_DELAY_TIME, GET_VIDEO_WH_DELAY_TIME, GET_VIDEO_WH_DELAY_TIME * 10);
224
224
  }
225
- handleWindowNew(event, builder) {
225
+ handleWindowNew(s21, t21) {
226
226
  if (this.dialogController) {
227
227
  this.dialogController.close();
228
228
  }
229
- let p8 = new webview.WebviewController();
230
- this.dialogController = builder(p8);
229
+ let u21 = new webview.WebviewController();
230
+ this.dialogController = t21(u21);
231
231
  this.dialogController.open();
232
- event.handler.setWebController(p8);
232
+ s21.handler.setWebController(u21);
233
233
  }
234
- handleIsLoadIntercept(intercept) {
234
+ handleIsLoadIntercept(q21) {
235
235
  try {
236
- return this.jsBridge.isInterceptRequest(intercept);
236
+ return this.jsBridge.isInterceptRequest(q21);
237
237
  }
238
- catch (e) {
238
+ catch (r21) {
239
239
  PLVLogger.info(TAG, 'IsLoadIntercept catch');
240
240
  return false;
241
241
  }
242
242
  }
243
- handlePageEnd(event) {
244
- this._addOnPageEnd.forEach((value) => {
245
- value(event);
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((err) => {
257
- PLVLogger.info(TAG, `LoadLocalJs catch\n${err.stack}`);
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(delayTime, l8, m8) {
264
- if (delayTime > m8) {
263
+ getVideoWHEnterFullScreen(h21, i21, j21) {
264
+ if (h21 > j21) {
265
265
  return;
266
266
  }
267
267
  setTimeout(() => {
268
- this.runJavaScript(PLVUtils.getVideoRectJS(true)).then((value) => {
269
- let n8 = JSON.parse(value);
270
- if (n8.width === 0 && n8.height === 0) {
271
- this.getVideoWHEnterFullScreen(delayTime + l8, l8, m8);
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 (n8.width > n8.height) {
273
+ else if (l21.width > l21.height) {
274
274
  PLVUtils.changeOrientation(true);
275
- PLVUtils.setWindowFullScreen(true, true).then((o8) => {
276
- this._originalIsLayoutFullScreen = o8[0];
277
- this._originalIsFullScreen = o8[1];
275
+ PLVUtils.setWindowFullScreen(true, true).then((m21) => {
276
+ this._originalIsLayoutFullScreen = m21[0];
277
+ this._originalIsFullScreen = m21[1];
278
278
  });
279
279
  }
280
280
  });
281
- }, delayTime);
281
+ }, h21);
282
282
  }
283
283
  }
@@ -1 +1 @@
1
- {"app":{"bundleName":"net.plv.livescenes.demo","debug":false,"versionCode":1030000,"versionName":"1.3.0","minAPIVersion":50000012,"targetAPIVersion":50004016,"apiReleaseType":"Release","compileSdkVersion":"5.0.4.150","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":[]}}
1
+ {"app":{"bundleName":"net.plv.livescenes.demo","debug":false,"versionCode":1030200,"versionName":"1.3.2","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":[]}}