ezuikit-js 0.6.0 → 0.6.1-beta.0

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 (61) hide show
  1. package/demos/base-demo/ezuikit.js +153 -75
  2. package/demos/base-demo/ezuikit_v5.0/Decoder.js +9195 -0
  3. package/demos/base-demo/ezuikit_v5.0/Decoder.wasm +0 -0
  4. package/demos/base-demo/ezuikit_v5.0/ezuikit.js +2334 -0
  5. package/demos/base-demo/ezuikit_v5.0/js/AudioRenderer.js +225 -0
  6. package/demos/base-demo/ezuikit_v5.0/js/SuperRender_10.js +395 -0
  7. package/demos/base-demo/ezuikit_v5.0/js/SystemTransform.js +22 -0
  8. package/demos/base-demo/ezuikit_v5.0/js/SystemTransform.js.mem +0 -0
  9. package/demos/base-demo/ezuikit_v5.0/js/jsPlugin-4.0.0.min.js +26 -0
  10. package/demos/base-demo/ezuikit_v5.0/js/jsPlugin-4.0.1.min.js +26 -0
  11. package/demos/base-demo/ezuikit_v5.0/js/jsPlugin-4.0.2.min.js +26 -0
  12. package/demos/base-demo/ezuikit_v5.0/js/playctrl/AudioRenderer.js +225 -0
  13. package/demos/base-demo/ezuikit_v5.0/js/playctrl/DecodeWorker.js +711 -0
  14. package/demos/base-demo/ezuikit_v5.0/js/playctrl/Decoder.js +1 -0
  15. package/demos/base-demo/ezuikit_v5.0/js/playctrl/JSPlaySDKInterface.js +2518 -0
  16. package/demos/base-demo/ezuikit_v5.0/js/playctrl/SuperRender_10.js +395 -0
  17. package/demos/base-demo/ezuikit_v5.0/js/playctrl/SuperRender_20.js +1 -0
  18. package/demos/base-demo/ezuikit_v5.0/js/transform/SystemTransform.js +22 -0
  19. package/demos/base-demo/ezuikit_v5.0/js/transform/SystemTransform.js.mem +0 -0
  20. package/demos/base-demo/ezuikit_v5.0/js/transform/systemTransform-worker.min.js +1 -0
  21. package/demos/base-demo/ezuikit_v5.0/js/tts-v4.js +343 -0
  22. package/demos/base-demo/ezuikit_v5.0/jsPlugin-2.0.1.min.js +5319 -0
  23. package/demos/base-demo/ezuikit_v5.0/rec/datepicker.js +1522 -0
  24. package/demos/base-demo/ezuikit_v5.0/rec/datepicker.min.css +27 -0
  25. package/demos/base-demo/ezuikit_v5.0/rec/datepicker.zh-CN.js +19 -0
  26. package/demos/base-demo/ezuikit_v5.0/rec/jquery.min.js +2 -0
  27. package/demos/base-demo/ezuikit_v5.0/talk/adapeter.js +5497 -0
  28. package/demos/base-demo/ezuikit_v5.0/talk/janus.js +3507 -0
  29. package/demos/base-demo/ezuikit_v5.0/talk/tts-v4.js +343 -0
  30. package/demos/base-demo/index.html +4 -1
  31. package/ezuikit.js +153 -75
  32. package/ezuikit_v5.0/Decoder.js +9195 -0
  33. package/ezuikit_v5.0/Decoder.wasm +0 -0
  34. package/ezuikit_v5.0/ezuikit.js +2334 -0
  35. package/ezuikit_v5.0/js/AudioRenderer.js +225 -0
  36. package/ezuikit_v5.0/js/SuperRender_10.js +395 -0
  37. package/ezuikit_v5.0/js/SystemTransform.js +22 -0
  38. package/ezuikit_v5.0/js/SystemTransform.js.mem +0 -0
  39. package/ezuikit_v5.0/js/jsPlugin-4.0.0.min.js +26 -0
  40. package/ezuikit_v5.0/js/jsPlugin-4.0.1.min.js +26 -0
  41. package/ezuikit_v5.0/js/jsPlugin-4.0.2.min.js +26 -0
  42. package/ezuikit_v5.0/js/playctrl/AudioRenderer.js +225 -0
  43. package/ezuikit_v5.0/js/playctrl/DecodeWorker.js +711 -0
  44. package/ezuikit_v5.0/js/playctrl/Decoder.js +1 -0
  45. package/ezuikit_v5.0/js/playctrl/JSPlaySDKInterface.js +2518 -0
  46. package/ezuikit_v5.0/js/playctrl/SuperRender_10.js +395 -0
  47. package/ezuikit_v5.0/js/playctrl/SuperRender_20.js +1 -0
  48. package/ezuikit_v5.0/js/transform/SystemTransform.js +22 -0
  49. package/ezuikit_v5.0/js/transform/SystemTransform.js.mem +0 -0
  50. package/ezuikit_v5.0/js/transform/systemTransform-worker.min.js +1 -0
  51. package/ezuikit_v5.0/js/tts-v4.js +343 -0
  52. package/ezuikit_v5.0/jsPlugin-2.0.1.min.js +5319 -0
  53. package/ezuikit_v5.0/rec/datepicker.js +1522 -0
  54. package/ezuikit_v5.0/rec/datepicker.min.css +27 -0
  55. package/ezuikit_v5.0/rec/datepicker.zh-CN.js +19 -0
  56. package/ezuikit_v5.0/rec/jquery.min.js +2 -0
  57. package/ezuikit_v5.0/talk/adapeter.js +5497 -0
  58. package/ezuikit_v5.0/talk/janus.js +3507 -0
  59. package/ezuikit_v5.0/talk/tts-v4.js +343 -0
  60. package/package.json +1 -1
  61. package/demos/react-demo/package-lock.json +0 -13893
@@ -31960,7 +31960,11 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
31960
31960
  this.staticPath = isVersion2Available() ? "https://open.ys7.com/assets/ezuikit_v5.0" : "https://open.ys7.com/assets/ezuikit_v4.0";
31961
31961
 
31962
31962
  if (typeof params.staticPath === 'string') {
31963
- this.staticPath = params.staticPath;
31963
+ if (params.staticPath.startsWith("http")) {
31964
+ this.staticPath = params.staticPath;
31965
+ } else {
31966
+ this.staticPath = window.location.protocol + '//' + window.location.host + params.staticPath;
31967
+ }
31964
31968
  }
31965
31969
 
31966
31970
  if (typeof params.audio !== 'undefined') {
@@ -31983,7 +31987,7 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
31983
31987
 
31984
31988
  if (isVersion2Available()) {
31985
31989
  console.log("启用多线程解析视频");
31986
- pluginUrl = "".concat(this.staticPath, "/jsPlugin-2.0.0.min.js");
31990
+ pluginUrl = "".concat(this.staticPath, "/jsPlugin-2.0.1.min.js");
31987
31991
  } else {
31988
31992
  // 是否引导用户开启谷歌实验室 Google Labs 特性
31989
31993
  //enableSharedArrayBufferGuide
@@ -32126,6 +32130,18 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32126
32130
  _params$height = params.height,
32127
32131
  height = _params$height === void 0 ? 400 : _params$height;
32128
32132
 
32133
+ if (!params.width || !params.height) {
32134
+ var videoDOMBounding = document.getElementById(id).getBoundingClientRect();
32135
+
32136
+ if (!params.width && videoDOMBounding.width > 0) {
32137
+ width = videoDOMBounding.width;
32138
+ }
32139
+
32140
+ if (!params.height && videoDOMBounding.height > 0) {
32141
+ height = videoDOMBounding.height;
32142
+ }
32143
+ }
32144
+
32129
32145
  if (!document.getElementById("".concat(id, "-wrap"))) {
32130
32146
  var wapDom = document.createElement("div");
32131
32147
  wapDom.id = "".concat(id, "-wrap");
@@ -32150,12 +32166,63 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32150
32166
  iMaxSplit: 1,
32151
32167
  iCurrentSplit: 1,
32152
32168
  szBasePath: "",
32153
- staticPath: params.staticPath,
32169
+ staticPath: _this2.staticPath,
32154
32170
  oStyle: {
32155
32171
  border: "none",
32156
32172
  background: "#000000"
32157
32173
  }
32174
+ }); // 增加视频容器
32175
+
32176
+ var pluginStatus = new Status(_this2, id);
32177
+ pluginStatus.loadingStart(id);
32178
+ pluginStatus.loadingSetText({
32179
+ text: '初始化播放器完成'
32158
32180
  });
32181
+ _this2.env = {
32182
+ domain: "https://open.ys7.com"
32183
+ };
32184
+
32185
+ if (typeof params.env !== 'undefined') {
32186
+ _this2.env = Object.assign(_this2.env, params.env);
32187
+ }
32188
+
32189
+ if (typeof params.handleTalkSuccess !== 'undefined') {
32190
+ _this2.handleTalkSuccess = params.handleTalkSuccess;
32191
+ }
32192
+
32193
+ if (typeof params.handleTalkError !== 'undefined') {
32194
+ _this2.handleTalkError = params.handleTalkError;
32195
+ }
32196
+
32197
+ _this2.errorHander = new Code();
32198
+ _this2.jSPlugin = jSPlugin;
32199
+
32200
+ if (_this2.themeId && !window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit) {
32201
+ _this2.Theme = new Theme(_this2, id);
32202
+ window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit = true;
32203
+ }
32204
+
32205
+ _this2.pluginStatus = pluginStatus;
32206
+ var checkTimer = setInterval(function () {
32207
+ if (_this2.jSPlugin.Module && _this2.jSPlugin.Module._JSPlayM4_GetSDKVersion && _this2.jSPlugin.Module._JSPlayM4_GetSDKVersion()) {
32208
+ clearInterval(checkTimer);
32209
+
32210
+ if (typeof _this2.params.handleInitSuccess === 'function') {
32211
+ _this2.params.handleInitSuccess({
32212
+ retcode: 0,
32213
+ id: _this2.params.id,
32214
+ type: "handleInitSuccess"
32215
+ });
32216
+ }
32217
+
32218
+ resolve({
32219
+ meta: {
32220
+ retcode: 200,
32221
+ msg: "初始化成功"
32222
+ }
32223
+ });
32224
+ }
32225
+ }, 50);
32159
32226
  } else {
32160
32227
  jSPlugin = new window.JSPlugin({
32161
32228
  szId: id,
@@ -32165,95 +32232,102 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32165
32232
  iMaxSplit: 1,
32166
32233
  iCurrentSplit: 1,
32167
32234
  szBasePath: "",
32168
- staticPath: params.staticPath,
32235
+ staticPath: _this2.staticPath,
32169
32236
  oStyle: {
32170
32237
  border: "none",
32171
32238
  background: "#000000"
32172
32239
  }
32173
32240
  });
32174
- }
32175
-
32176
- jSPlugin.EventCallback = {
32177
- loadEventHandler: function loadEventHandler() {},
32178
- zoomEventResponse: function
32179
- /*iMode, aPoint*/
32180
- zoomEventResponse() {//电子放大回调
32181
- },
32182
- windowEventSelect: function windowEventSelect(iWndIndex) {//插件选中窗口回调
32183
- },
32184
- pluginErrorHandler: function pluginErrorHandler(iWndIndex, iErrorCode, oError) {
32185
- //插件错误回调
32186
- console.log(iWndIndex, iErrorCode, oError);
32187
-
32188
- if (iErrorCode === 1003) {
32189
- console.log("断流");
32241
+ jSPlugin.EventCallback = {
32242
+ loadEventHandler: function loadEventHandler() {},
32243
+ zoomEventResponse: function
32244
+ /*iMode, aPoint*/
32245
+ zoomEventResponse() {//电子放大回调
32246
+ },
32247
+ windowEventSelect: function windowEventSelect(iWndIndex) {//插件选中窗口回调
32248
+ },
32249
+ pluginErrorHandler: function pluginErrorHandler(iWndIndex, iErrorCode, oError) {
32250
+ //插件错误回调
32251
+ console.log(iWndIndex, iErrorCode, oError);
32190
32252
 
32191
- _this2.pluginStatus.loadingSetText({
32192
- text: "连接断开,请重试",
32193
- color: 'red'
32194
- });
32253
+ if (iErrorCode === 1003) {
32254
+ console.log("断流");
32195
32255
 
32196
- if (typeof _this2.params.handleError === 'function') {
32197
- _this2.params.handleError({
32198
- msg: "连接断开,请重试",
32199
- retcode: 1003,
32200
- id: _this2.params.id,
32201
- type: "handleError"
32256
+ _this2.pluginStatus.loadingSetText({
32257
+ text: "连接断开,请重试",
32258
+ color: 'red'
32202
32259
  });
32260
+
32261
+ if (typeof _this2.params.handleError === 'function') {
32262
+ _this2.params.handleError({
32263
+ msg: "连接断开,请重试",
32264
+ retcode: 1003,
32265
+ id: _this2.params.id,
32266
+ type: "handleError"
32267
+ });
32268
+ }
32203
32269
  }
32204
- }
32205
- },
32206
- windowEventOver: function windowEventOver(iWndIndex) {},
32207
- windowEventOut: function windowEventOut(iWndIndex) {},
32208
- windowEventUp: function windowEventUp(iWndIndex) {},
32209
- windowFullCcreenChange: function windowFullCcreenChange(bFull) {},
32210
- firstFrameDisplay: function firstFrameDisplay(iWndIndex, iWidth, iHeight) {
32211
- console.log(iWidth, iHeight);
32212
- jSPlugin.JS_SetCanFullScreen(false);
32213
-
32214
- _this2.pluginStatus.loadingClear();
32215
- },
32216
- performanceLack: function performanceLack() {},
32217
- mouseEvent: function mouseEvent(iMouseEventType, iMouseX, iMouseY) {}
32218
- }; // 增加视频容器
32219
-
32220
- var pluginStatus = new Status(_this2, id);
32221
- pluginStatus.loadingStart(id);
32222
- pluginStatus.loadingSetText({
32223
- text: '初始化播放器完成'
32224
- });
32225
- _this2.env = {
32226
- domain: "https://open.ys7.com"
32227
- };
32270
+ },
32271
+ windowEventOver: function windowEventOver(iWndIndex) {},
32272
+ windowEventOut: function windowEventOut(iWndIndex) {},
32273
+ windowEventUp: function windowEventUp(iWndIndex) {},
32274
+ windowFullCcreenChange: function windowFullCcreenChange(bFull) {},
32275
+ firstFrameDisplay: function firstFrameDisplay(iWndIndex, iWidth, iHeight) {
32276
+ console.log(iWidth, iHeight);
32277
+ jSPlugin.JS_SetCanFullScreen(false);
32278
+
32279
+ _this2.pluginStatus.loadingClear();
32280
+ },
32281
+ performanceLack: function performanceLack() {},
32282
+ mouseEvent: function mouseEvent(iMouseEventType, iMouseX, iMouseY) {}
32283
+ }; // 增加视频容器
32284
+
32285
+ var pluginStatus = new Status(_this2, id);
32286
+ pluginStatus.loadingStart(id);
32287
+ pluginStatus.loadingSetText({
32288
+ text: '初始化播放器完成'
32289
+ });
32290
+ _this2.env = {
32291
+ domain: "https://open.ys7.com"
32292
+ };
32228
32293
 
32229
- if (typeof params.env !== 'undefined') {
32230
- _this2.env = Object.assign(_this2.env, params.env);
32231
- }
32294
+ if (typeof params.env !== 'undefined') {
32295
+ _this2.env = Object.assign(_this2.env, params.env);
32296
+ }
32232
32297
 
32233
- if (typeof params.handleTalkSuccess !== 'undefined') {
32234
- _this2.handleTalkSuccess = params.handleTalkSuccess;
32235
- }
32298
+ if (typeof params.handleTalkSuccess !== 'undefined') {
32299
+ _this2.handleTalkSuccess = params.handleTalkSuccess;
32300
+ }
32236
32301
 
32237
- if (typeof params.handleTalkError !== 'undefined') {
32238
- _this2.handleTalkError = params.handleTalkError;
32239
- }
32302
+ if (typeof params.handleTalkError !== 'undefined') {
32303
+ _this2.handleTalkError = params.handleTalkError;
32304
+ }
32240
32305
 
32241
- _this2.errorHander = new Code();
32242
- _this2.jSPlugin = jSPlugin;
32306
+ _this2.errorHander = new Code();
32307
+ _this2.jSPlugin = jSPlugin;
32243
32308
 
32244
- if (_this2.themeId && !window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit) {
32245
- _this2.Theme = new Theme(_this2, id);
32246
- window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit = true;
32247
- }
32309
+ if (_this2.themeId && !window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit) {
32310
+ _this2.Theme = new Theme(_this2, id);
32311
+ window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit = true;
32312
+ }
32248
32313
 
32249
- _this2.pluginStatus = pluginStatus; // 待需要改造plugin,异步判断;
32314
+ _this2.pluginStatus = pluginStatus; // 待需要改造plugin,异步判断;
32250
32315
 
32251
- resolve({
32252
- meta: {
32253
- retcode: 200,
32254
- msg: "初始化成功"
32316
+ if (typeof _this2.params.handleInitSuccess === 'function') {
32317
+ _this2.params.handleInitSuccess({
32318
+ retcode: 0,
32319
+ id: _this2.params.id,
32320
+ type: "handleInitSuccess"
32321
+ });
32255
32322
  }
32256
- });
32323
+
32324
+ resolve({
32325
+ meta: {
32326
+ retcode: 200,
32327
+ msg: "初始化成功"
32328
+ }
32329
+ });
32330
+ }
32257
32331
  };
32258
32332
 
32259
32333
  var initDecoderPromise = new Promise(initDecoder);
@@ -32701,6 +32775,10 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32701
32775
  value: function play(options) {
32702
32776
  var _this5 = this;
32703
32777
 
32778
+ if (this.jSPlugin.bPlay) {
32779
+ return false;
32780
+ }
32781
+
32704
32782
  this.pluginStatus.setPlayStatus({
32705
32783
  play: false,
32706
32784
  loading: true