ezuikit-js 0.5.8 → 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 (62) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/demos/base-demo/ezuikit.js +277 -86
  3. package/demos/base-demo/ezuikit_v5.0/Decoder.js +9195 -0
  4. package/demos/base-demo/ezuikit_v5.0/Decoder.wasm +0 -0
  5. package/demos/base-demo/ezuikit_v5.0/ezuikit.js +2334 -0
  6. package/demos/base-demo/ezuikit_v5.0/js/AudioRenderer.js +225 -0
  7. package/demos/base-demo/ezuikit_v5.0/js/SuperRender_10.js +395 -0
  8. package/demos/base-demo/ezuikit_v5.0/js/SystemTransform.js +22 -0
  9. package/demos/base-demo/ezuikit_v5.0/js/SystemTransform.js.mem +0 -0
  10. package/demos/base-demo/ezuikit_v5.0/js/jsPlugin-4.0.0.min.js +26 -0
  11. package/demos/base-demo/ezuikit_v5.0/js/jsPlugin-4.0.1.min.js +26 -0
  12. package/demos/base-demo/ezuikit_v5.0/js/jsPlugin-4.0.2.min.js +26 -0
  13. package/demos/base-demo/ezuikit_v5.0/js/playctrl/AudioRenderer.js +225 -0
  14. package/demos/base-demo/ezuikit_v5.0/js/playctrl/DecodeWorker.js +711 -0
  15. package/demos/base-demo/ezuikit_v5.0/js/playctrl/Decoder.js +1 -0
  16. package/demos/base-demo/ezuikit_v5.0/js/playctrl/JSPlaySDKInterface.js +2518 -0
  17. package/demos/base-demo/ezuikit_v5.0/js/playctrl/SuperRender_10.js +395 -0
  18. package/demos/base-demo/ezuikit_v5.0/js/playctrl/SuperRender_20.js +1 -0
  19. package/demos/base-demo/ezuikit_v5.0/js/transform/SystemTransform.js +22 -0
  20. package/demos/base-demo/ezuikit_v5.0/js/transform/SystemTransform.js.mem +0 -0
  21. package/demos/base-demo/ezuikit_v5.0/js/transform/systemTransform-worker.min.js +1 -0
  22. package/demos/base-demo/ezuikit_v5.0/js/tts-v4.js +343 -0
  23. package/demos/base-demo/ezuikit_v5.0/jsPlugin-2.0.1.min.js +5319 -0
  24. package/demos/base-demo/ezuikit_v5.0/rec/datepicker.js +1522 -0
  25. package/demos/base-demo/ezuikit_v5.0/rec/datepicker.min.css +27 -0
  26. package/demos/base-demo/ezuikit_v5.0/rec/datepicker.zh-CN.js +19 -0
  27. package/demos/base-demo/ezuikit_v5.0/rec/jquery.min.js +2 -0
  28. package/demos/base-demo/ezuikit_v5.0/talk/adapeter.js +5497 -0
  29. package/demos/base-demo/ezuikit_v5.0/talk/janus.js +3507 -0
  30. package/demos/base-demo/ezuikit_v5.0/talk/tts-v4.js +343 -0
  31. package/demos/base-demo/index.html +4 -1
  32. package/ezuikit.js +277 -86
  33. package/ezuikit_v5.0/Decoder.js +9195 -0
  34. package/ezuikit_v5.0/Decoder.wasm +0 -0
  35. package/ezuikit_v5.0/ezuikit.js +2334 -0
  36. package/ezuikit_v5.0/js/AudioRenderer.js +225 -0
  37. package/ezuikit_v5.0/js/SuperRender_10.js +395 -0
  38. package/ezuikit_v5.0/js/SystemTransform.js +22 -0
  39. package/ezuikit_v5.0/js/SystemTransform.js.mem +0 -0
  40. package/ezuikit_v5.0/js/jsPlugin-4.0.0.min.js +26 -0
  41. package/ezuikit_v5.0/js/jsPlugin-4.0.1.min.js +26 -0
  42. package/ezuikit_v5.0/js/jsPlugin-4.0.2.min.js +26 -0
  43. package/ezuikit_v5.0/js/playctrl/AudioRenderer.js +225 -0
  44. package/ezuikit_v5.0/js/playctrl/DecodeWorker.js +711 -0
  45. package/ezuikit_v5.0/js/playctrl/Decoder.js +1 -0
  46. package/ezuikit_v5.0/js/playctrl/JSPlaySDKInterface.js +2518 -0
  47. package/ezuikit_v5.0/js/playctrl/SuperRender_10.js +395 -0
  48. package/ezuikit_v5.0/js/playctrl/SuperRender_20.js +1 -0
  49. package/ezuikit_v5.0/js/transform/SystemTransform.js +22 -0
  50. package/ezuikit_v5.0/js/transform/SystemTransform.js.mem +0 -0
  51. package/ezuikit_v5.0/js/transform/systemTransform-worker.min.js +1 -0
  52. package/ezuikit_v5.0/js/tts-v4.js +343 -0
  53. package/ezuikit_v5.0/jsPlugin-2.0.1.min.js +5319 -0
  54. package/ezuikit_v5.0/rec/datepicker.js +1522 -0
  55. package/ezuikit_v5.0/rec/datepicker.min.css +27 -0
  56. package/ezuikit_v5.0/rec/datepicker.zh-CN.js +19 -0
  57. package/ezuikit_v5.0/rec/jquery.min.js +2 -0
  58. package/ezuikit_v5.0/talk/adapeter.js +5497 -0
  59. package/ezuikit_v5.0/talk/janus.js +3507 -0
  60. package/ezuikit_v5.0/talk/tts-v4.js +343 -0
  61. package/package.json +1 -1
  62. package/demos/react-demo/package-lock.json +0 -13893
package/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ v 0.6.0
2
+
3
+ [fix]兼容低版本火狐浏览器播放视频
4
+
5
+ [fix]修复网站全屏模式下,再次执行视频全屏冲突问题
6
+
7
+
8
+ v 0.5.9
9
+
10
+ [feta]支持用户通过开启谷歌实验室特性启动多线程解码
11
+
12
+ [feta]新增开启开启谷歌实验室特性引导说明
13
+
1
14
  v 0.5.8
2
15
  [feta-beta]支持多线程解码视频-beta
3
16
 
@@ -23755,7 +23755,7 @@ Janus$1.init = function (options) {
23755
23755
  } else if (Janus$1.webRTCAdapter.browserDetails.browser === 'chrome' && Janus$1.webRTCAdapter.browserDetails.version < 72) {
23756
23756
  // Chrome does, but it's only usable from version 72 on
23757
23757
  Janus$1.unifiedPlan = false;
23758
- } else if (!('currentDirection' in RTCRtpTransceiver.prototype)) {
23758
+ } else if (typeof RTCRtpTransceiver !== 'undefined' && !('currentDirection' in RTCRtpTransceiver.prototype)) {
23759
23759
  // Safari supports addTransceiver() but not Unified Plan when
23760
23760
  // currentDirection is not defined (see codepen above)
23761
23761
  Janus$1.unifiedPlan = false;
@@ -30795,6 +30795,27 @@ var Monitor = /*#__PURE__*/function () {
30795
30795
  params.clickEventHandle(event.data);
30796
30796
  }
30797
30797
 
30798
+ break;
30799
+
30800
+ case 'iframeFullScreen':
30801
+ if (id == event.data.id) {
30802
+ var requestFullScreen = function requestFullScreen(element) {
30803
+ var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
30804
+
30805
+ if (requestMethod) {
30806
+ requestMethod.call(element);
30807
+ } else if (typeof window.ActiveXObject !== "undefined") {
30808
+ var wscript = new ActiveXObject("WScript.Shell");
30809
+
30810
+ if (wscript !== null) {
30811
+ wscript.SendKeys("{F11}");
30812
+ }
30813
+ }
30814
+ };
30815
+
30816
+ requestFullScreen(document.getElementById("EZUIKitPlayer-" + event.data.id));
30817
+ }
30818
+
30798
30819
  break;
30799
30820
  }
30800
30821
  }
@@ -31223,6 +31244,18 @@ var Monitor = /*#__PURE__*/function () {
31223
31244
  };
31224
31245
 
31225
31246
  EZUIKitPlayer.prototype.changePlayUrl = function (data) {
31247
+ if (data.deviceSerial) {
31248
+ this.opt.deviceSerial = data.deviceSerial;
31249
+ }
31250
+
31251
+ if (data.channelNo) {
31252
+ this.opt.channelNo = data.channelNo;
31253
+ }
31254
+
31255
+ if (data.accessToken) {
31256
+ this.opt.accessToken = data.accessToken;
31257
+ }
31258
+
31226
31259
  var id = 'EZUIKitPlayer-' + this.opt.id;
31227
31260
  var player = document.getElementById(id).contentWindow;
31228
31261
  player.postMessage({
@@ -31878,6 +31911,12 @@ var matchTemplate = function matchTemplate(templateName, params) {
31878
31911
  }
31879
31912
  };
31880
31913
 
31914
+ var isVersion2Available = function isVersion2Available() {
31915
+ var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
31916
+ var isSharedArrayBuffer = window.SharedArrayBuffer;
31917
+ return isSharedArrayBuffer && !isMobile;
31918
+ };
31919
+
31881
31920
  var EZUIKitPlayer = /*#__PURE__*/function () {
31882
31921
  function EZUIKitPlayer(params) {
31883
31922
  var _this = this;
@@ -31912,14 +31951,20 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
31912
31951
  this.poster = params.poster;
31913
31952
  this.speed = 1;
31914
31953
  this.disabledTimeLine = false;
31954
+ this.disabledPTZ = false;
31955
+ this.enableSharedArrayBufferGuide = false;
31915
31956
  this.capacity = {};
31916
31957
  this.env = {
31917
31958
  domain: "https://open.ys7.com"
31918
31959
  };
31919
- this.staticPath = !!window.SharedArrayBuffer ? "https://open.ys7.com/assets/ezuikit_v5.0" : "https://open.ys7.com/assets/ezuikit_v4.0";
31960
+ this.staticPath = isVersion2Available() ? "https://open.ys7.com/assets/ezuikit_v5.0" : "https://open.ys7.com/assets/ezuikit_v4.0";
31920
31961
 
31921
31962
  if (typeof params.staticPath === 'string') {
31922
- 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
+ }
31923
31968
  }
31924
31969
 
31925
31970
  if (typeof params.audio !== 'undefined') {
@@ -31930,11 +31975,63 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
31930
31975
  this.disabledTimeLine = params.disabledTimeLine;
31931
31976
  }
31932
31977
 
31978
+ if (typeof params.disabledPTZ !== 'undefined') {
31979
+ this.disabledPTZ = params.disabledPTZ;
31980
+ }
31981
+
31982
+ if (typeof params.enableSharedArrayBufferGuide !== 'undefined') {
31983
+ this.enableSharedArrayBufferGuide = params.enableSharedArrayBufferGuide;
31984
+ }
31985
+
31933
31986
  var pluginUrl = "".concat(this.staticPath, "/js/jsPlugin-4.0.2.min.js");
31934
31987
 
31935
- if (!!window.SharedArrayBuffer) {
31988
+ if (isVersion2Available()) {
31936
31989
  console.log("启用多线程解析视频");
31937
- pluginUrl = "".concat(this.staticPath, "/jsPlugin-2.0.0.min.js");
31990
+ pluginUrl = "".concat(this.staticPath, "/jsPlugin-2.0.1.min.js");
31991
+ } else {
31992
+ // 是否引导用户开启谷歌实验室 Google Labs 特性
31993
+ //enableSharedArrayBufferGuide
31994
+ var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
31995
+
31996
+ var getChromeVersion = function getChromeVersion() {
31997
+ var arr = navigator.userAgent.split(' ');
31998
+ var chromeVersion = '';
31999
+
32000
+ for (var i = 0; i < arr.length; i++) {
32001
+ if (/chrome/i.test(arr[i])) {
32002
+ chromeVersion = arr[i];
32003
+ }
32004
+ }
32005
+
32006
+ if (chromeVersion) {
32007
+ return Number(chromeVersion.split('/')[1].split('.')[0]);
32008
+ }
32009
+
32010
+ return false;
32011
+ }; // pc端 谷歌浏览器 版本92 ~ 105
32012
+
32013
+
32014
+ if (!isMobile && 91 < getChromeVersion < 106 && this.enableSharedArrayBufferGuide) {
32015
+ console.log("提示用户开启谷歌实验室特性");
32016
+ var wapDomId = "".concat(this.id, "-wrap");
32017
+ var guideDom = document.createElement("div");
32018
+ var guideSpan = document.createElement("span");
32019
+ guideSpan.innerHTML = "您当前浏览器可以开启谷歌实验室多线程特性,获取更好播放体验,避免浏览器卡顿及崩溃,详见";
32020
+ guideDom.appendChild(guideSpan);
32021
+ var guideLink = document.createElement("a");
32022
+ guideLink.href = "https://open.ys7.com/help/384";
32023
+ guideLink.setAttribute("target", "_blank");
32024
+ guideDom.appendChild(guideLink);
32025
+ guideLink.innerHTML = "开启说明"; //guideDom.innerHTML = "您的浏览器当前使用单进程播放视频,可能因内存占用过高导致浏览器卡顿,您可参考·谷歌浏览器开启多线程(链接)·开启谷歌实验室多线程特性,获取更好播放体验";
32026
+
32027
+ guideDom.id = "".concat(this.id, "-guide");
32028
+ guideDom.style = "font-size:12px;color:red;";
32029
+ setTimeout(function () {
32030
+ if (document.getElementById(wapDomId)) {
32031
+ document.getElementById(wapDomId).insertBefore(guideDom, document.getElementById(_this.id));
32032
+ }
32033
+ }, 5000);
32034
+ }
31938
32035
  }
31939
32036
 
31940
32037
  addJs(pluginUrl, function () {
@@ -32033,6 +32130,18 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32033
32130
  _params$height = params.height,
32034
32131
  height = _params$height === void 0 ? 400 : _params$height;
32035
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
+
32036
32145
  if (!document.getElementById("".concat(id, "-wrap"))) {
32037
32146
  var wapDom = document.createElement("div");
32038
32147
  wapDom.id = "".concat(id, "-wrap");
@@ -32046,101 +32155,179 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32046
32155
  }
32047
32156
 
32048
32157
  var initDecoder = function initDecoder(resolve, reject) {
32049
- var jSPlugin = new window.JSPlugin({
32050
- szId: id,
32051
- iType: 2,
32052
- iWidth: width,
32053
- iHeight: height,
32054
- iMaxSplit: 1,
32055
- iCurrentSplit: 1,
32056
- szBasePath: "",
32057
- staticPath: params.staticPath,
32058
- oStyle: {
32059
- border: "none",
32060
- background: "#000000"
32158
+ var jSPlugin;
32159
+
32160
+ if (isVersion2Available()) {
32161
+ jSPlugin = new window.JSPlugin({
32162
+ szId: id,
32163
+ iType: 2,
32164
+ iWidth: width,
32165
+ iHeight: height,
32166
+ iMaxSplit: 1,
32167
+ iCurrentSplit: 1,
32168
+ szBasePath: "",
32169
+ staticPath: _this2.staticPath,
32170
+ oStyle: {
32171
+ border: "none",
32172
+ background: "#000000"
32173
+ }
32174
+ }); // 增加视频容器
32175
+
32176
+ var pluginStatus = new Status(_this2, id);
32177
+ pluginStatus.loadingStart(id);
32178
+ pluginStatus.loadingSetText({
32179
+ text: '初始化播放器完成'
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);
32061
32187
  }
32062
- });
32063
- jSPlugin.EventCallback = {
32064
- loadEventHandler: function loadEventHandler() {},
32065
- zoomEventResponse: function
32066
- /*iMode, aPoint*/
32067
- zoomEventResponse() {//电子放大回调
32068
- },
32069
- windowEventSelect: function windowEventSelect(iWndIndex) {//插件选中窗口回调
32070
- },
32071
- pluginErrorHandler: function pluginErrorHandler(iWndIndex, iErrorCode, oError) {
32072
- //插件错误回调
32073
- console.log(iWndIndex, iErrorCode, oError);
32074
32188
 
32075
- if (iErrorCode === 1003) {
32076
- console.log("断流");
32189
+ if (typeof params.handleTalkSuccess !== 'undefined') {
32190
+ _this2.handleTalkSuccess = params.handleTalkSuccess;
32191
+ }
32077
32192
 
32078
- _this2.pluginStatus.loadingSetText({
32079
- text: "连接断开,请重试",
32080
- color: 'red'
32081
- });
32193
+ if (typeof params.handleTalkError !== 'undefined') {
32194
+ _this2.handleTalkError = params.handleTalkError;
32195
+ }
32082
32196
 
32083
- if (typeof _this2.params.handleError === 'function') {
32084
- _this2.params.handleError({
32085
- msg: "连接断开,请重试",
32086
- retcode: 1003,
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,
32087
32213
  id: _this2.params.id,
32088
- type: "handleError"
32214
+ type: "handleInitSuccess"
32089
32215
  });
32090
32216
  }
32217
+
32218
+ resolve({
32219
+ meta: {
32220
+ retcode: 200,
32221
+ msg: "初始化成功"
32222
+ }
32223
+ });
32091
32224
  }
32092
- },
32093
- windowEventOver: function windowEventOver(iWndIndex) {},
32094
- windowEventOut: function windowEventOut(iWndIndex) {},
32095
- windowEventUp: function windowEventUp(iWndIndex) {},
32096
- windowFullCcreenChange: function windowFullCcreenChange(bFull) {},
32097
- firstFrameDisplay: function firstFrameDisplay(iWndIndex, iWidth, iHeight) {
32098
- console.log(iWidth, iHeight);
32099
- jSPlugin.JS_SetCanFullScreen(false);
32100
-
32101
- _this2.pluginStatus.loadingClear();
32102
- },
32103
- performanceLack: function performanceLack() {},
32104
- mouseEvent: function mouseEvent(iMouseEventType, iMouseX, iMouseY) {}
32105
- }; // 增加视频容器
32106
-
32107
- var pluginStatus = new Status(_this2, id);
32108
- pluginStatus.loadingStart(id);
32109
- pluginStatus.loadingSetText({
32110
- text: '初始化播放器完成'
32111
- });
32112
- _this2.env = {
32113
- domain: "https://open.ys7.com"
32114
- };
32225
+ }, 50);
32226
+ } else {
32227
+ jSPlugin = new window.JSPlugin({
32228
+ szId: id,
32229
+ iType: 2,
32230
+ iWidth: width,
32231
+ iHeight: height,
32232
+ iMaxSplit: 1,
32233
+ iCurrentSplit: 1,
32234
+ szBasePath: "",
32235
+ staticPath: _this2.staticPath,
32236
+ oStyle: {
32237
+ border: "none",
32238
+ background: "#000000"
32239
+ }
32240
+ });
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);
32115
32252
 
32116
- if (typeof params.env !== 'undefined') {
32117
- _this2.env = Object.assign(_this2.env, params.env);
32118
- }
32253
+ if (iErrorCode === 1003) {
32254
+ console.log("断流");
32119
32255
 
32120
- if (typeof params.handleTalkSuccess !== 'undefined') {
32121
- _this2.handleTalkSuccess = params.handleTalkSuccess;
32122
- }
32256
+ _this2.pluginStatus.loadingSetText({
32257
+ text: "连接断开,请重试",
32258
+ color: 'red'
32259
+ });
32123
32260
 
32124
- if (typeof params.handleTalkError !== 'undefined') {
32125
- _this2.handleTalkError = params.handleTalkError;
32126
- }
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
+ }
32269
+ }
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
+ };
32127
32293
 
32128
- _this2.errorHander = new Code();
32129
- _this2.jSPlugin = jSPlugin;
32294
+ if (typeof params.env !== 'undefined') {
32295
+ _this2.env = Object.assign(_this2.env, params.env);
32296
+ }
32130
32297
 
32131
- if (_this2.themeId && !window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit) {
32132
- _this2.Theme = new Theme(_this2, id);
32133
- window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit = true;
32134
- }
32298
+ if (typeof params.handleTalkSuccess !== 'undefined') {
32299
+ _this2.handleTalkSuccess = params.handleTalkSuccess;
32300
+ }
32135
32301
 
32136
- _this2.pluginStatus = pluginStatus; // 待需要改造plugin,异步判断;
32302
+ if (typeof params.handleTalkError !== 'undefined') {
32303
+ _this2.handleTalkError = params.handleTalkError;
32304
+ }
32137
32305
 
32138
- resolve({
32139
- meta: {
32140
- retcode: 200,
32141
- msg: "初始化成功"
32306
+ _this2.errorHander = new Code();
32307
+ _this2.jSPlugin = jSPlugin;
32308
+
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;
32142
32312
  }
32143
- });
32313
+
32314
+ _this2.pluginStatus = pluginStatus; // 待需要改造plugin,异步判断;
32315
+
32316
+ if (typeof _this2.params.handleInitSuccess === 'function') {
32317
+ _this2.params.handleInitSuccess({
32318
+ retcode: 0,
32319
+ id: _this2.params.id,
32320
+ type: "handleInitSuccess"
32321
+ });
32322
+ }
32323
+
32324
+ resolve({
32325
+ meta: {
32326
+ retcode: 200,
32327
+ msg: "初始化成功"
32328
+ }
32329
+ });
32330
+ }
32144
32331
  };
32145
32332
 
32146
32333
  var initDecoderPromise = new Promise(initDecoder);
@@ -32588,6 +32775,10 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32588
32775
  value: function play(options) {
32589
32776
  var _this5 = this;
32590
32777
 
32778
+ if (this.jSPlugin.bPlay) {
32779
+ return false;
32780
+ }
32781
+
32591
32782
  this.pluginStatus.setPlayStatus({
32592
32783
  play: false,
32593
32784
  loading: true
@@ -33172,9 +33363,9 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
33172
33363
  var end = defaultTime.length;
33173
33364
  var standardTime = time + defaultTime.substring(start, end);
33174
33365
  return standardTime.slice(0, 8) + 'T' + standardTime.slice(8) + 'Z';
33175
- } else {
33176
- throw new Error('回放时间格式有误,请确认');
33177
33366
  }
33367
+
33368
+ throw new Error('回放时间格式有误,请确认');
33178
33369
  }
33179
33370
 
33180
33371
  var seekRT = this.jSPlugin.JS_Seek(0, startTime, endTime);