mix-public 1.0.1 → 1.0.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.
Files changed (122) hide show
  1. package/README.md +17 -3
  2. package/libpag/CHANGELOG.md +328 -0
  3. package/libpag/CHANGELOG.zh_CN.md +327 -0
  4. package/libpag/LICENSE.txt +1589 -0
  5. package/libpag/README.md +345 -0
  6. package/libpag/README.zh_CN.md +331 -0
  7. package/libpag/lib/libpag.cjs.js +8438 -0
  8. package/libpag/lib/libpag.cjs.js.map +1 -0
  9. package/libpag/lib/libpag.esm.js +8433 -0
  10. package/libpag/lib/libpag.esm.js.map +1 -0
  11. package/libpag/lib/libpag.min.js +2 -0
  12. package/libpag/lib/libpag.min.js.map +1 -0
  13. package/libpag/lib/libpag.umd.js +8444 -0
  14. package/libpag/lib/libpag.umd.js.map +1 -0
  15. package/libpag/lib/libpag.wasm +0 -0
  16. package/libpag/package.json +97 -0
  17. package/libpag/src/.pag.wasm-mt.md5 +1 -0
  18. package/libpag/src/.pag.wasm.md5 +1 -0
  19. package/libpag/src/binding.ts +47 -0
  20. package/libpag/src/constant.ts +33 -0
  21. package/libpag/src/core/backend-context.ts +107 -0
  22. package/libpag/src/core/global-canvas.ts +54 -0
  23. package/libpag/src/core/matrix.ts +319 -0
  24. package/libpag/src/core/render-canvas.ts +50 -0
  25. package/libpag/src/core/video-reader.ts +325 -0
  26. package/libpag/src/interfaces.ts +59 -0
  27. package/libpag/src/pag-composition.ts +190 -0
  28. package/libpag/src/pag-file.ts +151 -0
  29. package/libpag/src/pag-font.ts +66 -0
  30. package/libpag/src/pag-image-layer.ts +75 -0
  31. package/libpag/src/pag-image.ts +116 -0
  32. package/libpag/src/pag-layer.ts +240 -0
  33. package/libpag/src/pag-module.ts +9 -0
  34. package/libpag/src/pag-player.ts +394 -0
  35. package/libpag/src/pag-solid-layer.ts +29 -0
  36. package/libpag/src/pag-surface.ts +83 -0
  37. package/libpag/src/pag-text-layer.ts +98 -0
  38. package/libpag/src/pag-view.ts +538 -0
  39. package/libpag/src/pag.ts +31 -0
  40. package/libpag/src/types.ts +571 -0
  41. package/libpag/src/utils/canvas.ts +23 -0
  42. package/libpag/src/utils/clock.ts +57 -0
  43. package/libpag/src/utils/common.ts +38 -0
  44. package/libpag/src/utils/decorators.ts +19 -0
  45. package/libpag/src/utils/event-manager.ts +40 -0
  46. package/libpag/src/utils/mixin.ts +23 -0
  47. package/libpag/src/utils/polyfills.ts +25 -0
  48. package/libpag/src/utils/queue.ts +42 -0
  49. package/libpag/src/utils/type-utils.ts +79 -0
  50. package/libpag/src/utils/ua.ts +7 -0
  51. package/libpag/src/utils/video-listener.ts +42 -0
  52. package/libpag/src/video-reader-manager.ts +140 -0
  53. package/libpag/src/wasm/libpag.js +16 -0
  54. package/libpag/src/wasm/libpag.wasm +0 -0
  55. package/libpag/src/wasm-mt/libpag.js +2 -0
  56. package/libpag/src/wasm-mt/libpag.wasm +0 -0
  57. package/libpag/src/wechat/babel.ts +11 -0
  58. package/libpag/src/wechat/binding.ts +50 -0
  59. package/libpag/src/wechat/constant.ts +5 -0
  60. package/libpag/src/wechat/file-utils.ts +62 -0
  61. package/libpag/src/wechat/interfaces.ts +81 -0
  62. package/libpag/src/wechat/pag-file.ts +9 -0
  63. package/libpag/src/wechat/pag-font.ts +7 -0
  64. package/libpag/src/wechat/pag-image.ts +30 -0
  65. package/libpag/src/wechat/pag-view.ts +183 -0
  66. package/libpag/src/wechat/pag.ts +39 -0
  67. package/libpag/src/wechat/scaler-context.ts +55 -0
  68. package/libpag/src/wechat/video-reader.ts +215 -0
  69. package/libpag/types/third_party/tgfx/web/src/binding.d.ts +2 -0
  70. package/libpag/types/third_party/tgfx/web/src/constant.d.ts +1 -0
  71. package/libpag/types/third_party/tgfx/web/src/core/bitmap-image.d.ts +5 -0
  72. package/libpag/types/third_party/tgfx/web/src/core/matrix.d.ts +45 -0
  73. package/libpag/types/third_party/tgfx/web/src/core/path-rasterizer.d.ts +4 -0
  74. package/libpag/types/third_party/tgfx/web/src/core/scaler-context.d.ts +36 -0
  75. package/libpag/types/third_party/tgfx/web/src/tgfx-module.d.ts +4 -0
  76. package/libpag/types/third_party/tgfx/web/src/tgfx.d.ts +16 -0
  77. package/libpag/types/third_party/tgfx/web/src/types.d.ts +134 -0
  78. package/libpag/types/third_party/tgfx/web/src/utils/canvas.d.ts +8 -0
  79. package/libpag/types/third_party/tgfx/web/src/utils/decorators.d.ts +1 -0
  80. package/libpag/types/third_party/tgfx/web/src/utils/font-family.d.ts +2 -0
  81. package/libpag/types/third_party/tgfx/web/src/utils/measure-text.d.ts +10 -0
  82. package/libpag/types/third_party/tgfx/web/src/utils/type-utils.d.ts +1 -0
  83. package/libpag/types/third_party/tgfx/web/src/utils/ua.d.ts +7 -0
  84. package/libpag/types/third_party/tgfx/web/src/wechat/array-buffer-image.d.ts +13 -0
  85. package/libpag/types/third_party/tgfx/web/src/wechat/interfaces.d.ts +107 -0
  86. package/libpag/types/web/src/binding.d.ts +5 -0
  87. package/libpag/types/web/src/constant.d.ts +31 -0
  88. package/libpag/types/web/src/core/backend-context.d.ts +37 -0
  89. package/libpag/types/web/src/core/global-canvas.d.ts +13 -0
  90. package/libpag/types/web/src/core/matrix.d.ts +212 -0
  91. package/libpag/types/web/src/core/render-canvas.d.ts +12 -0
  92. package/libpag/types/web/src/core/video-reader.d.ts +38 -0
  93. package/libpag/types/web/src/interfaces.d.ts +45 -0
  94. package/libpag/types/web/src/pag-composition.d.ts +100 -0
  95. package/libpag/types/web/src/pag-file.d.ts +78 -0
  96. package/libpag/types/web/src/pag-font.d.ts +20 -0
  97. package/libpag/types/web/src/pag-image-layer.d.ts +50 -0
  98. package/libpag/types/web/src/pag-image.d.ts +61 -0
  99. package/libpag/types/web/src/pag-layer.d.ts +149 -0
  100. package/libpag/types/web/src/pag-module.d.ts +4 -0
  101. package/libpag/types/web/src/pag-player.d.ts +196 -0
  102. package/libpag/types/web/src/pag-solid-layer.d.ts +16 -0
  103. package/libpag/types/web/src/pag-surface.d.ts +45 -0
  104. package/libpag/types/web/src/pag-text-layer.d.ts +51 -0
  105. package/libpag/types/web/src/pag-view.d.ts +212 -0
  106. package/libpag/types/web/src/pag.d.ts +13 -0
  107. package/libpag/types/web/src/types.d.ts +486 -0
  108. package/libpag/types/web/src/utils/clock.d.ts +8 -0
  109. package/libpag/types/web/src/utils/common.d.ts +3 -0
  110. package/libpag/types/web/src/utils/decorators.d.ts +1 -0
  111. package/libpag/types/web/src/utils/event-manager.d.ts +8 -0
  112. package/libpag/types/web/src/utils/mixin.d.ts +2 -0
  113. package/libpag/types/web/src/utils/polyfills.d.ts +2 -0
  114. package/libpag/types/web/src/utils/queue.d.ts +9 -0
  115. package/libpag/types/web/src/utils/type-utils.d.ts +10 -0
  116. package/libpag/types/web/src/utils/ua.d.ts +6 -0
  117. package/libpag/types/web/src/utils/video-listener.d.ts +5 -0
  118. package/libpag/types/web/src/video-reader-manager.d.ts +60 -0
  119. package/libpag/types/web/tsconfig.json +19 -0
  120. package/mixRender.js +12 -9
  121. package/package.json +1 -1
  122. package/pageRender/tabbar.js +3 -24
package/README.md CHANGED
@@ -18,8 +18,8 @@
18
18
  ### 调用方式
19
19
 
20
20
  ```javascript
21
-
22
- // 使用 在入口文件
21
+
22
+ // 布局使用(入口文件)
23
23
  import mixRender from "mix-public"
24
24
 
25
25
  const mixPublicLib = mixRender({
@@ -31,4 +31,18 @@
31
31
  });
32
32
  import 'mix-public/mixRender.css'; // 引入web端app基础样式
33
33
  mixPublicLib // 为原生基础调用方法,可在页面使用
34
- ```
34
+
35
+ // 方法使用
36
+ import mixRender from "mix-public"
37
+ const PublicLib = mixRender({
38
+ mixJustMethod: true,
39
+ mixApptype: apptype, // app类型: web android ios
40
+ });
41
+ ```
42
+
43
+
44
+ ### 更新记录
45
+ - v1.0.0 项目初始化
46
+ - v1.0.1 调整文档调用方式
47
+ - v1.0.2 调整publicLib调用方式(区分类app样式及单公共调用方法)
48
+ - v1.0.3 添加pag依赖(调整单独调用方法参数)
@@ -0,0 +1,328 @@
1
+ # CHANGELOG
2
+
3
+ ## 4.2.77 (May 4, 2023)
4
+
5
+ ### BugFixes
6
+
7
+ - Fix user agent detection for Safari and iOS WeChat browsers (#905)
8
+ - Fix globalThis compatibility issue for older browsers, e.g. iOS 12.1 Safari (#898)
9
+ - Fix: update ImageBitmap compatibility check for Safari 15 (#884)
10
+ - Fixing the WebMask texture type upload error that causes WeChat crash. (#877)
11
+ - Fix: Add fallback for OffscreenCanvas in built-in iOS 16.4 AppleWebKit browsers (#875)
12
+
13
+ ### Refactor
14
+
15
+ - Refactor PAGView on WeChat miniprogram (#871)
16
+
17
+ ## 4.2.56 (April 13, 2023)
18
+
19
+ ### Features
20
+
21
+ - Add the isInstanceOf method to replace instanceOf, preventing issues with undefined global classes on Web. (#861)
22
+ - VideoReader supports creating from an HTMLVideoElement on Web. (#850)
23
+ - Organize the code related to uploading textures on the Web. (#826)
24
+ - Publish Web lite SDK 0.0.7 version. (#809)
25
+ - Add interfaces for Web Workers to the API documentation. (#806)
26
+ - Enable antialias and use linear filtering on Web Lite SDK. (#803)
27
+ - Remove the perspective values from the Matrix class on Web. (#794)
28
+ - Use tgfx::ImageBuffer replace WebVideoBuffer. (#750)
29
+ - Add support for making the ImageCodec from a HTTP URL on the Web platform. (#745)
30
+ - Implements the NativeCodec::readPixels() method on the web platform. (#742)
31
+ - Use emsdk to install emscripten. (#733)
32
+ - Implements ByteBuffer. (#727)
33
+ - Add static function to create image on Web platform。 (#728)
34
+ - Pin emscripten version to 3.1.20 (#725)
35
+ - Implement decoder image async on Web. (#720)
36
+
37
+ ### BugFixes
38
+
39
+ - Fix type-check error caused by missing global variable OffscreenCanvas in Safari versions below 16.4 (#860)
40
+ - Fix the conflict between OffscreenCanvas and WebGL interfaces in iOS version 16.4 on the Web. (#831)
41
+ - Fix the prepare frame error on the Web. (#823)
42
+ - Fix ptr loss after memory expansion on Web. (#799)
43
+ - Fix covert MP4 crush on iOS safari. (#786)
44
+ - Fix desp.sh (#731)
45
+ - Fix get user agent fail on WeChat. (#718)
46
+
47
+ ## 4.1.43 (February 2, 2023)
48
+
49
+ ### Features
50
+
51
+ - Implements decodeFrame in VideoSequenceReader. (#705)
52
+ - Add Web Worker version. (#675)
53
+ - Update README and CHANGLOG. (#673)
54
+ - Replace `wx.getPerformance().now()` with `Date.now()` on Wechat. (#669)
55
+ - Unlink VideoReader from PAGPlayer. (#667)
56
+ - Return JS Array at PAGImageLayer.getVideoRanges on Web. (#661)
57
+ - Released libpag-lite version 0.0.6. (#658)
58
+
59
+ ### BugFixes
60
+
61
+ - Fix onAnimationStart event on Web (#688)
62
+ - Fix empty video frame when playable state on Safari. (#655)
63
+
64
+ ## 4.1.35
65
+
66
+ ### BugFixes
67
+
68
+ - Fix SoftwareDecoder type checking error. (#643)
69
+ - Fix font family declarations is invalid on Wechat. (#649)
70
+ - Fix empty video frame when playable state on Safari. (#655)
71
+
72
+ ## 4.1.33
73
+
74
+ ### Feature
75
+
76
+ - Refactor video reader on Web. (#640)
77
+
78
+ ### BugFixes
79
+
80
+ - Use texSubImage2D instead of texImage2D on Web. (#619)
81
+ - Refactor PAGView listener type checker. (#624)
82
+ - Fix replace image failed on WeChat- mini program. (#630)
83
+
84
+ ## 4.1.29
85
+
86
+ ### BugFixes
87
+
88
+ - Fix video play error when called load before on Chrome. (#613)
89
+ - Fix PAGView duration get error. (#614)
90
+ - Restore to default value of `UNPACK_PREMULTIPLY_ALPHA_WEBGL`. (#616)
91
+
92
+ ## 4.1.20
93
+
94
+ ### Feature
95
+
96
+ - Multiple readback operations using getImageData are faster. (#580)
97
+
98
+ ### BugFixes
99
+
100
+ - Fix static time ranges pause error in video reader. (#573)
101
+ - Fix play video error when document hidden.
102
+
103
+ ## 4.1.15
104
+
105
+ ### Feature
106
+
107
+ - Add support for running on WeChat miniprogram. (#533)
108
+
109
+ ### BugFixes
110
+
111
+ - Fix getLayerType crash when there has another async task. (#465)
112
+ - Fix destroy view clash when multiple views use the same canvas. (#478)
113
+ - Disable video playback rate when video sequence resolution is larger than 4k. (#548)
114
+ - Fix video decoder output frame error on the Android WeChat mini-program. (#559)
115
+
116
+ ## 4.0.5.26
117
+
118
+ ### Feature
119
+
120
+ - Add BMP sequence prepare.
121
+ - Add playbackRate support in decoder.
122
+
123
+ ### BugFixes
124
+
125
+ - Fix video decoding failure when src is blobUrl on iOS Safari.
126
+ - Fix displacementMapLayer not decode.
127
+
128
+ ## 4.0.5.17
129
+
130
+ ### Breaking Changes
131
+
132
+ - Replace `FromCanvas` to `fromCanvas` , `FromTexture` to `fromTexture` , `FromRenderTarget` to `fromRenderTarget` on `PAGSurface`.
133
+ - Replace `Make` to `make` on `PAGComposition`.
134
+ - Replace `Make` to `make` on `PAGSolidLayer`.
135
+ - Replace `Make` to `make` on `PAGImageLayer`.
136
+
137
+ ### Feature
138
+
139
+ - Add `backendContext`.
140
+ - Add onAnimationUpdate event.
141
+ - Add `version` on `libpag`.
142
+ - Add `setComposition` , `matrix` , `setMatrix` , `getLayersUnderPoint` on `PAGView`.
143
+ - Support unregister software decoder.
144
+ - Return TypeLayer when get PAGLayer.
145
+
146
+ ## 4.0.5.11
147
+
148
+ ### BugFixes
149
+
150
+ - Fix text rendering error when font-family has punctuation.
151
+
152
+ ## 4.0.5.7
153
+
154
+ ### Feature
155
+
156
+ - Add font style render in WebMask.
157
+ - Add fallback fontFamily.
158
+
159
+ ### BugFixes
160
+
161
+ - Fix OffscreenCanvas assert error on Safari.
162
+ - Disable antialiasing when creating WebGL context from canvas.
163
+
164
+ ## 4.0.5.5
165
+
166
+ ### Feature
167
+
168
+ - Publish PAG Web SDK release version🎉
169
+ - Jump 4.0.5.5 to sync with libpag version
170
+
171
+ ### Bug Fixes
172
+
173
+ - Fix video ready state assess error.
174
+
175
+ ## 0.1.8
176
+
177
+ ### Feature
178
+
179
+ - Support init `PAGView` from `offscreenCanvas`.
180
+ - Add `readPixels` function on `PAGSurface`.
181
+
182
+ ### BugFixes
183
+
184
+ - Fix render cache validate fail.
185
+
186
+ ## 0.1.7
187
+
188
+ ### Feature
189
+
190
+ - Add software decoder registration function.
191
+ - Create MP4 container on wasm side.
192
+ - Add decorator to verify wasm status.
193
+ - PAGImage can be made from TexImageSource.
194
+
195
+ ### BugFixes
196
+
197
+ - Fix the repeat event dispatch error.
198
+ - Optimize wasm queue.
199
+ - Fix some enum binding error.
200
+
201
+ ## 0.1.6
202
+
203
+ ### Breaking Changes
204
+
205
+ - Remove `fullBox` parameter in `PAGViewOptions`, add `useScale` and `firstFrame`.
206
+ - Remove flush action in `PAGView.setProgress`.
207
+
208
+ ### Feature
209
+
210
+ - Add `imageBytes` on `PAGTextLayer`
211
+
212
+ ### BugFixes
213
+
214
+ - Fix scale error when canvas hasn't mounted on DOM tree or `display:none`.
215
+
216
+ ## 0.1.5
217
+
218
+ ### Feature
219
+
220
+ - Add `initOptions` parameter what include `fullBox` and `useCanvas2D` on `PAGView.init()`.
221
+ - Add `setRenderCanvasSize` on `PAGView`.
222
+
223
+ ### Bug Fixes
224
+
225
+ - Fix `PAGView.updateSize()` update canvas size error。
226
+ - Fix replace text when including space error.
227
+
228
+ ## 0.1.4
229
+
230
+ ### Bug Fixes
231
+
232
+ - Fix decoding the next frame error in Web env.
233
+ - Fix the frame align error when is in the static time range.
234
+
235
+ ## 0.1.3
236
+
237
+ ### Bug Fixes
238
+
239
+ - Fix WebGL context release error by destroy.
240
+
241
+ ## 0.1.2
242
+
243
+ ### Bug Fixes
244
+
245
+ - Fix video sequence reader decode frame error.
246
+ - Fix vector function async error.
247
+ - Fix font family format error.
248
+ - Fix the performance issue of a PAGSurface made from texture.
249
+
250
+ ## 0.1.1
251
+
252
+ ### Bug Fixes
253
+
254
+ - Fix canvas rescaling error when repeated call init function.
255
+ - Fix render end frame error when repeat count is 1.
256
+
257
+ ## 0.1.0
258
+
259
+ ### Breaking Changes
260
+
261
+ - Edit returns from `PAGFile.getLayersByEditableIndex` be `Vector<PAGLayer>`.
262
+ - Replace C++ enum `LayerType` to Js enum `LayerType`, replace `PAG.LayerType` to `libpag.types.LayerType`.
263
+
264
+ ### Features
265
+
266
+ - Add warn message when canvas size is more than 2560 on Web env.
267
+ - Make `PAGFile.load` support data what's type is `Blob` or `ArrayBuffer` ,and add `maxSupportedTagLevel`, `tagLevel`, `copyOriginal` on `PAGFile`.
268
+ - Add `freeCache` on `PAGView`.
269
+ - ADD `clearAll` on `PAGSurface.`
270
+ - Add `getSurface` , `matrix`, `setMatrix` , `nextFrame` , `preFrame` , `autoClear` , `setAutoClear`, `getBounds,` `getLayersUnderPoint`, `hitTestPoint`, `renderingTime` , `imageDecodingTime`, `presentingTime` , `graphicsMemory` on `PAGPlayer`.
271
+ - Add `scaleMode` , `setScaleMode` , `matrix` , `setMatrix` on `PAGImage`.
272
+ - Add `matrix`, `setMatrix`, `resetMatrix`, `getTotalMatrix`, `parent`, `markers`, `setStartTime`, `currentTime`, `setCurrentTime`, `getProgress`, `setProgress`, `preFrame` , `nextFrame`, `getBounds`, `trackMatteLayer`, `excludedFromTimeline`, `setExcludedFromTimeline`, `isPAGFile`, `isDelete` on `PAGLayer`.
273
+ - Add `Make`, `removeLayer`, `getLayersUnderPoint` on `PAGComposition`.
274
+ - Add `create`, `fontFamily`, `fontStyle` on `PAGFont`.
275
+ - Add `PAGTextLayer`, `PAGImageLayer` Class.
276
+
277
+ ## 0.0.5
278
+
279
+ ### Bug Fixes
280
+
281
+ - Fix `PAGImage.fromSource` miss rewind `Asyncify` currData.
282
+
283
+ ## 0.0.4
284
+
285
+ ### Bug Fixes
286
+
287
+ - Fix some static functions that eliminate the side effects caused by the `Asyncify` module in emscripten miss in the Typescript decorator.
288
+
289
+ ## 0.0.3
290
+
291
+ ### Breaking Changes
292
+
293
+ - Eliminate the side effects caused by the `Asyncify` module in emscripten, change most of the methods that interact with wasm to `await` methods, and only keep `PAGPlayer.flush()` as an `async` method.
294
+ - Replace _`module_.\_PAGSurface` to *`module\*.PAGSurface`.
295
+
296
+ ### Features
297
+
298
+ - Add `numChildren`,`setContentSize`,`getLayerAt`,`getLayersByName`,`getLayerIndex`,`swapLayer`,`swapLayerAt`,`contains`,`addLayer`,`addLayerAt`,`audioStartTime`,`audioMarkers`,`audioBytes`,`removeLayerAt`,`removeAllLayers` on `PAGComposition`.
299
+ - Add `onAnimationPla`,`onAnimationPause` ,`onAnimationFlushed` on `PAGViewListenerEvent`.
300
+
301
+ ### Bug Fixes
302
+
303
+ - Fix font family rending error.
304
+ - Fix video sequence can not play on Wechat.
305
+
306
+ ## 0.0.2
307
+
308
+ ### Breaking Changes
309
+
310
+ - Change property `duration` to be function `duration()` on PAGView. Like: `PAGView.duration` ⇒ `PAGView.duration()`
311
+
312
+ ### Features
313
+
314
+ - Support create pag view from the canvas element.
315
+ - Support measure text in low version browser, support Chrome 69+.
316
+ - Add `setDuration` , `timeStretchMode` ,and `setTimeStretchMode` on `PAGFile`.
317
+ - Add `uniqueID` , `layerType` , `layerName` , `opacity` , `setOpacity` , `visible` , `setVisible` , `editableIndex` , `frameRate` , `localTimeToGlobal` ,and `globalToLocalTime` on `PAGLayer`.
318
+
319
+ ### Bug Fixes
320
+
321
+ - Fix `duration` on `PAGView` calculate error.
322
+
323
+ ## 0.0.1
324
+
325
+ ### Features
326
+
327
+ - Publish PAG Web SDK
328
+ - Support Chrome 87+ and Safari 11.1+ Browser
@@ -0,0 +1,327 @@
1
+ # CHANGELOG
2
+
3
+ ## 4.2.77 (2023年5月4日)
4
+
5
+ ### BugFixes
6
+
7
+ - 修复 Safari 和 iOS 微信浏览器的用户代理检测问题 (#905)
8
+ - 修复兼容老浏览器 globalThis 的问题,例如 iOS 12.1 Safari (#898)
9
+ - 更新 ImageBitmap 兼容性检查,以适应 Safari 15 (#884)
10
+ - 修复 WebMask 纹理类型上传错误导致的微信崩溃问题 (#877)
11
+ - 为内置 iOS 16.4 的 AppleWebKit 浏览器添加 OffscreenCanvas 回退 (#875)
12
+
13
+ ### Refactor
14
+
15
+ - 重构微信小程序的 PAGView (#871)
16
+
17
+ ## 4.2.56 (2023年4月13日)
18
+
19
+ ### Feature
20
+
21
+ - 添加 isInstanceOf 方法来替代 instanceOf,在 Web 上防止未定义的全局类问题 (#861)
22
+ - VideoReader 支持从 HTMLVideoElement 上创建 (#850)
23
+ - 整理与 Web 上上传纹理相关的代码 (#826)
24
+ - 发布 Web Lite SDK 0.0.7 版本 (#809)
25
+ - 在 API 文档中添加了 Web Workers 的接口 (#806)
26
+ - 在 Web Lite SDK 上启用抗锯齿并使用线性过滤 (#803)
27
+ - 从 Matrix 类上移除了透视值 (#794)
28
+ - 使用 tgfx::ImageBuffer 替代 WebVideoBuffer (#750)
29
+ - 在 Web 平台上支持从 HTTP URL 制作 ImageCodec (#745)
30
+ - 在 Web 平台上实现了 NativeCodec::readPixels() 方法 (#742)
31
+ - 使用 emsdk 安装 emscripten (#733)
32
+ - 实现了 ByteBuffer (#727)
33
+ - 在 Web 平台上添加了创建图像的静态函数 (#728)
34
+ - 锁定了 emscripten 版本到 3.1.20 (#725)
35
+ - 在 Web 上异步实现图像解码器 (#720)
36
+
37
+ ### BugFixes
38
+
39
+ - 修复 Safari 版本低于 16.4 时由于缺少全局变量 OffscreenCanvas 而导致的类型检查错误 (#860)
40
+ - 修复在 Web 上 iOS 16.4 的 OffscreenCanvas 和 WebGL 接口之间的冲突 (#831)
41
+ - 修复了 Web 上的帧准备错误 (#823)
42
+ - 修复了 Web 上内存扩展后的指针丢失问题 (#799)
43
+ - 修复了在 iOS Safari 上的 MP4 崩溃问题 (#786)
44
+ - 修复了 desp.sh (#731)
45
+ - 修复了 WeChat 上的用户代理获取失败问题 (#718)
46
+
47
+ ## 4.1.43 (2023年2月2日)
48
+
49
+ ### Feature
50
+
51
+ - 在 VideoSequenceReader 中实现了 decodeFrame 方法 (#705)
52
+ - 添加了 Web Worker 版本 (#675)
53
+ - 更新了 README 和 CHANGLOG (#673)
54
+ - 在 Wechat 上使用 Date.now() 替代 wx.getPerformance().now() (#669)
55
+ - 解除了 VideoReader 和 PAGPlayer 之间的关联 (#667)
56
+ - 在 Web 上通过 JS 数组返回 PAGImageLayer.getVideoRanges (#661)
57
+ - 发布了 libpag-lite 0.0
58
+
59
+ ### BugFixes
60
+
61
+ - 修复 Web 上的 onAnimationStart 事件(#688)
62
+ - 在 Safari 浏览器上修复可播放状态时的空视频帧。(#655)
63
+
64
+ ## 4.1.35
65
+
66
+ ### BugFixes
67
+
68
+ - 修复软解码器类型检查错误。(#643)
69
+ - 修复微信小程序上字体声明验证错误。(#649)
70
+ - 修复 Safari 上视频可播放状态时出现空帧的问题。(#655)
71
+
72
+ ## 4.1.33
73
+
74
+ ### Feature
75
+
76
+ - 重构 Web 上视频解码器。(#640)
77
+
78
+ ### BugFixes
79
+
80
+ - Web 上使用 texSubImage2D 替代 texImage2D。(#619)
81
+ - 重构 PAGView 监听器类型检查。(#624)
82
+ - 修复微信小程序上替换图片失败的问题。(#630)
83
+
84
+ ## 4.1.29
85
+
86
+ ### BugFixes
87
+
88
+ - 修复 Chrome 上视频播放前调用 load() 产生错误的问题。(#613)
89
+ - 修复 PAGView duration 获取错误的问题。(#614)
90
+ - 重置 `UNPACK_PREMULTIPLY_ALPHA_WEBGL` 的默认值。(#616)
91
+
92
+ ## 4.1.20
93
+
94
+ ### Feature
95
+
96
+ - 优化多次读取 Canvas2D 的性能。(#580)
97
+
98
+ ### BugFixes
99
+
100
+ - 修复视频解码器在 Web 平台静态区间暂停错误的问题。(#573)
101
+ - 修复页面不可见时视频解码器播放错误。
102
+
103
+ ## 4.1.15
104
+
105
+ ### Feature
106
+
107
+ - 发布支持微信小程序的版本。(#533)
108
+
109
+ ### BugFixes
110
+
111
+ - 修复在有其他异步任务时 getLayerType 崩溃的问题。(#465)
112
+ - 修复多个视图使用同一个 Canvas 时销毁视图崩溃的问题。(#478)
113
+ - 当 BMP 预合成大于 4K 分辨率时,禁止视频解码器变速。(#548)
114
+ - 修复在 Android 微信小程序上视频解码器输出帧数据错误的问题。(#559)
115
+
116
+ ## 4.0.5.26
117
+
118
+ ### Feature
119
+
120
+ - 增加 BMP 序列帧预加载解码
121
+ - 增加解码倍速支持
122
+
123
+ ### BugFixes
124
+
125
+ - 修复 iOS Safari 上 src 使用 blobUrl 时解码错误的问题
126
+ - 修复 displacementMapLayer 没有解码的问题
127
+
128
+ ## 4.0.5.17
129
+
130
+ ### Breaking Changes
131
+
132
+ - PAGSurface 上 `fromCanvas` 替代 `FromCanvas` , `fromTexture` 替代 `FromTexture` , `fromRenderTarget` 替代 `FromRenderTarget`
133
+ - PAGComposition 上 `make` 替代 `Make`.
134
+ - PAGSolidLayer 上 `make` 替代 `Make`.
135
+ - PAGImageLayer 上 `make` 替代 `Make`.
136
+
137
+ ### Feature
138
+
139
+ - 增加 `backendContext` 类
140
+ - libpag 上增加 `version`
141
+ - PAGView 上增加 `onAnimationUpdate` 事件,增加 `setComposition` , `matrix` , `setMatrix` , `getLayersUnderPoint` 函数接口
142
+ - 支持注销软件解码器
143
+ - 当获取 PAGLayer 会返回对应类型的 TypeLayer
144
+
145
+ ## 4.0.5.11
146
+
147
+ ### BugFixes
148
+
149
+ - 修复字体名称存在标点符号时渲染错误
150
+
151
+ ## 4.0.5.7
152
+
153
+ ### Feature
154
+
155
+ - 增加字体字形渲染
156
+ - 增加兜底字体
157
+
158
+ ### BugFixes
159
+
160
+ - 修复 OffscreenCanvas 在 Safari 上不存在导致断言失败
161
+ - 关闭在 iOS Safari 15.4+ WebGL 上默认开启的矢量设置
162
+
163
+ ## 4.0.5.5
164
+
165
+ ### Feature
166
+
167
+ - 发布 PAG Web SDK 正式版 🎉
168
+ - 更新到 4.0.5.5 与 libpag 的版本号同步
169
+
170
+ ### Bug Fixes
171
+
172
+ - 修复视频序列帧状态检查错误,上屏失败
173
+
174
+ ## 0.1.8
175
+
176
+ ### Feature
177
+
178
+ - 支持从 `offscreenCanvas` 创建 `PAGView`
179
+ - `PAGSurface` 上增加 `readPixels` 接口
180
+
181
+ ### BugFixes
182
+
183
+ - 修复缓存没有生效的问题
184
+
185
+ ## 0.1.7
186
+
187
+ ### Feature
188
+
189
+ - 增加软件解码器注册接口
190
+ - 将 MP4 合成逻辑放到 wasm 中执行
191
+ - 增加装饰器检查 wasm 实例状态
192
+ - 能从 `TexImageSource` 创建 PAGImage
193
+
194
+ ### BugFixes
195
+
196
+ - 修复循环播放事件错误
197
+ - 优化 wasm 队列
198
+ - 修复一些 enum 类型绑定错误
199
+
200
+ ## 0.1.6
201
+
202
+ ### Breaking Changes
203
+
204
+ - `PAGViewOptions` 接口中移除 `fullBox` 字段,增加 `useScale` 和 `firstFrame` 字段
205
+ - 移除 `PAGView.setProgress` 中的 flush 动作
206
+
207
+ ### Feature
208
+
209
+ - `PAGTextLayer` 上增加 `imageBytes` 方法
210
+
211
+ ### BugFixes
212
+
213
+ - 修复 `canvas` 未挂载到 DOM 树上时和 `display:none` 时缩放错误的问题
214
+
215
+ ## 0.1.5
216
+
217
+ ### Feature
218
+
219
+ - `PAGView.init()` 上增加 `initOptions` 参数,包含 `fullBox` 和 `useCanvas2D` 方法
220
+ - `PAGView` 上增加 `setRenderCanvasSize` 方法
221
+
222
+ ### Bug Fixes
223
+
224
+ - 修复 `PAGView.updateSize()` 更新 Canvas 尺寸逻辑
225
+ - 修复替换带空格文字的文本时渲染错误
226
+
227
+ ## 0.1.4
228
+
229
+ ### Bug Fixes
230
+
231
+ - 修复预测下一帧导致闪屏的问题
232
+ - 修复静态帧区间 Video 对齐问题
233
+
234
+ ## 0.1.3
235
+
236
+ ### Bug Fixes
237
+
238
+ - 修复 `destroy` 没有正常释放 `WebGL context` 的问题
239
+
240
+ ## 0.1.2
241
+
242
+ ### Bug Fixes
243
+
244
+ - 修复视频序列帧解码过程渲染错误
245
+ - 修复 `vector` 结构上的方法同步错误
246
+ - 修复 `fontFamily` 格式化错误
247
+ - 修复一个从 `texture` 创建 `PAGSurface` 的性能问题
248
+
249
+ ## 0.1.1
250
+
251
+ ### Bug Fixes
252
+
253
+ - 修复 `PAGView` 重复调用 `init` 会多次缩放 `Canvas` 的问题
254
+ - 修复 `PAGView` 的 `repeatCount` 为 1 时结束帧不是最后一帧的问题
255
+
256
+ ## 0.1.0
257
+
258
+ ### Breaking Changes
259
+
260
+ - `PAGFile.getLayersByEditableIndex` 返回值改为 `Vector<PAGLayer>`
261
+ - 消除 C++ enum `LayerType` 替换为 Js enum `LayerType`, `PAG.LayerType` 替换为 `PAG.types.LayerType`
262
+
263
+ ### Features
264
+
265
+ - Add warn message when canvas size is more than 2560 on Web env. 当 canvas 渲染尺寸大于 2560px 的时候,提示警告
266
+ - `PAGFile` 的 `load` 方法支持 `Blob` 和 `ArrayBuffer` 类型的数据,并且 `PAGFile` 上增加 `maxSupportedTagLevel`,`tagLevel`,`copyOriginal` 方法。
267
+ - `PAGView` 上增加 `freeCache` 方法
268
+ - `PAGSurface` 上增加 `clearAll`
269
+ - `PAGPlayer` 上增加 `getSurface` ,`matrix` ,`setMatrix` ,`nextFrame` , `preFrame` , `autoClear` , `setAutoClear` , `getBounds` , `getLayersUnderPoint` , `hitTestPoint` , `renderingTime` ,`imageDecodingTime` , `presentingTime` , `graphicsMemory` 方法
270
+ - `PAGImage` 上增加 `scaleMode` , `setScaleMode` , `matrix` , `setMatrix` 方法
271
+ - `PAGLayer` 上增加 `matrix` , `setMatrix` , `resetMatrix` , `getTotalMatrix` , `parent` , `markers` , `setStartTime` , `currentTime` , `setCurrentTime` , `getProgress` , `setProgress` , `preFrame` , `nextFrame` , `getBounds` , `trackMatteLayer` , `excludedFromTimeline` , `setExcludedFromTimeline` , `isPAGFile` , `isDelete` 方法
272
+ - `PAGComposition` 上增加 `Make` , `removeLayer` , `getLayersUnderPoint` 方法
273
+ - `PAGFont` 上增加 `create` 方法和 `fontFamily` , `fontStyle` 属性
274
+ - 增加 `PAGTextLayer` , `PAGImageLayer` 类
275
+
276
+ ## 0.0.5
277
+
278
+ ### Bug Fixes
279
+
280
+ - 修复 `PAGImage` 的 `fromSource` 方法没有回溯 `Asyncify` 的状态
281
+
282
+ ## 0.0.4
283
+
284
+ ### Bug Fixes
285
+
286
+ - 修复消除 emscripten 中 `Asyncify` 模块带来副作用的 Typescript 装饰器遗漏了静态方法
287
+
288
+ ## 0.0.3
289
+
290
+ ### Breaking Changes
291
+
292
+ - 消除 emscripten 中 `Asyncify` 模块带来的副作用,将大部分与 wasm 交互的接口改为同步接口,仅保留 `PAGPlayer.flush()` 为 `async` 方法
293
+ - 替换 `module._PAGSurface` 为 `module.PAGSurface`
294
+
295
+ ### Features
296
+
297
+ - `PAGComposition` 上增加 `numChildren`,`setContentSize`,`getLayerAt`,`getLayersByName`,`getLayerIndex`,`swapLayer`,`swapLayerAt`,`contains`,`addLayer`,`addLayerAt`,`audioStartTime`,`audioMarkers`,`audioBytes`,`removeLayerAt`,`removeAllLayers` 方法
298
+ - `PAGViewListenerEvent` 上增加 `onAnimationPla`,`onAnimationPause` ,`onAnimationFlushed`
299
+
300
+ ### Bug Fixes
301
+
302
+ - 修复 `FontFamily` 渲染错误
303
+ - 修复微信平台下视频序列帧无法播放
304
+
305
+ ## 0.0.2
306
+
307
+ ### Breaking Changes
308
+
309
+ - 修改 `PAGView` 上的属性 `duration` 为方法 `duration()` 。使用:`PAGView.duration` ⇒ `PAGView.duration()`
310
+
311
+ ### Features
312
+
313
+ - 支持从 `CanvasElement` 对象创建 `PAGView` 实例
314
+ - 兼容低版本浏览器文字测量,支持 `Chrome 69+` 浏览器
315
+ - `PAGFile` 上增加 `setDuration` , `timeStretchMode` , `setTimeStretchMode` 方法
316
+ - `PAGLayer` 上增加 `uniqueID` , `layerType` , `layerName` , `opacity` , `setOpacity` , `visible` , `setVisible` , `editableIndex` , `frameRate` , `localTimeToGlobal` , `globalToLocalTime` 方法
317
+
318
+ ### Bug Fixes
319
+
320
+ - 修复 `PAGView` 的 `duration` 计算错误
321
+
322
+ ## 0.0.1
323
+
324
+ ### Features
325
+
326
+ - 发布 `Web` 平台 `libpag` 的 `wasm` 版本,支持全特性 `PAG`
327
+ - 支持 `Chrome 87+` ,`Safar 11.1+` 浏览器