ezuikit-js 0.5.7 → 0.5.8-beta

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 (44) hide show
  1. package/demos/base-demo/ezuikit.js +51 -31
  2. package/demos/base-demo/index.html +2 -9
  3. package/demos/base-demo/jsPlugin-2.0.0.min.js +5210 -0
  4. package/demos/base-demo/server.js +67 -0
  5. package/demos/nginx-demo/conf/fastcgi.conf +26 -0
  6. package/demos/nginx-demo/conf/fastcgi_params +25 -0
  7. package/demos/nginx-demo/conf/koi-utf +109 -0
  8. package/demos/nginx-demo/conf/koi-win +103 -0
  9. package/demos/nginx-demo/conf/mime.types +95 -0
  10. package/demos/nginx-demo/conf/nginx.conf +123 -0
  11. package/demos/nginx-demo/conf/scgi_params +17 -0
  12. package/demos/nginx-demo/conf/uwsgi_params +17 -0
  13. package/demos/nginx-demo/conf/win-utf +126 -0
  14. package/demos/nginx-demo/contrib/README +21 -0
  15. package/demos/nginx-demo/contrib/geo2nginx.pl +58 -0
  16. package/demos/nginx-demo/contrib/unicode2nginx/koi-utf +131 -0
  17. package/demos/nginx-demo/contrib/unicode2nginx/unicode-to-nginx.pl +48 -0
  18. package/demos/nginx-demo/contrib/unicode2nginx/win-utf +130 -0
  19. package/demos/nginx-demo/contrib/vim/ftdetect/nginx.vim +4 -0
  20. package/demos/nginx-demo/contrib/vim/ftplugin/nginx.vim +1 -0
  21. package/demos/nginx-demo/contrib/vim/indent/nginx.vim +11 -0
  22. package/demos/nginx-demo/contrib/vim/syntax/nginx.vim +2268 -0
  23. package/demos/nginx-demo/docs/CHANGES +8115 -0
  24. package/demos/nginx-demo/docs/CHANGES.ru +8252 -0
  25. package/demos/nginx-demo/docs/LICENSE +26 -0
  26. package/demos/nginx-demo/docs/OpenSSL.LICENSE +127 -0
  27. package/demos/nginx-demo/docs/PCRE.LICENCE +93 -0
  28. package/demos/nginx-demo/docs/README +3 -0
  29. package/demos/nginx-demo/docs/zlib.LICENSE +20 -0
  30. package/demos/nginx-demo/html/50x.html +21 -0
  31. package/demos/nginx-demo/html/ezuikit5/ezuikit.js +33328 -0
  32. package/demos/nginx-demo/html/ezuikit5/index.html +110 -0
  33. package/demos/nginx-demo/html/ezuikit5/server.js +67 -0
  34. package/demos/nginx-demo/html/index.html +16 -0
  35. package/demos/nginx-demo/html/js/adapeter.js +5497 -0
  36. package/demos/nginx-demo/html/js/janus.js +3507 -0
  37. package/demos/nginx-demo/html/js/jquery.min.js +2 -0
  38. package/demos/nginx-demo/html/js/sts.js +340 -0
  39. package/demos/nginx-demo/logs/access.log +73 -0
  40. package/demos/nginx-demo/logs/error.log +12 -0
  41. package/demos/nginx-demo/logs/nginx.pid +1 -0
  42. package/demos/nginx-demo/nginx.exe +0 -0
  43. package/ezuikit.js +22349 -16025
  44. package/package.json +1 -1
@@ -110,6 +110,7 @@ var addJs = function addJs(filepath, callback, isReadyFun) {
110
110
  if (!isReady) {
111
111
  var oJs = document.createElement("script");
112
112
  oJs.setAttribute("src", filepath);
113
+ oJs.setAttribute("crossorigin", true);
113
114
  oJs.onload = callback;
114
115
  document.getElementsByTagName("head")[0].appendChild(oJs);
115
116
  } else {
@@ -15833,8 +15834,8 @@ var TimeLine$1 = function TimeLine(jsPlugin) {
15833
15834
  // 只画一次线
15834
15835
  that.drawSolidLine(i * that.canvasWidth / dotNum, 8, i * that.canvasWidth / dotNum, that.canvasHeight / 5 * 0.5 + 8, 1, lineColor);
15835
15836
  }
15836
- /**
15837
- * 偏移距离超过60,setSeconds会每次累加1到分钟,因此绘图完成后需要复原到当前分钟,再次计算偏移
15837
+ /**
15838
+ * 偏移距离超过60,setSeconds会每次累加1到分钟,因此绘图完成后需要复原到当前分钟,再次计算偏移
15838
15839
  */
15839
15840
 
15840
15841
 
@@ -31530,8 +31531,8 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31530
31531
  this.initTextures();
31531
31532
  }
31532
31533
  }
31533
- /**
31534
- * 初始化WebGL上下文
31534
+ /**
31535
+ * 初始化WebGL上下文
31535
31536
  */
31536
31537
 
31537
31538
  RenderManager.prototype.initContextGL = function () {
@@ -31551,10 +31552,10 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31551
31552
  this.contextGL = gl;
31552
31553
  console.log("WebGL1.0");
31553
31554
  };
31554
- /**
31555
- * 初始化着色器程序
31556
- * @param vertexShaderScript 顶点着色器脚本
31557
- * @param fragmentShaderScript 片段着色器脚本
31555
+ /**
31556
+ * 初始化着色器程序
31557
+ * @param vertexShaderScript 顶点着色器脚本
31558
+ * @param fragmentShaderScript 片段着色器脚本
31558
31559
  */
31559
31560
 
31560
31561
 
@@ -31590,8 +31591,8 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31590
31591
  gl.deleteShader(fragmentShader);
31591
31592
  return program;
31592
31593
  };
31593
- /**
31594
- * 初始化数据缓存
31594
+ /**
31595
+ * 初始化数据缓存
31595
31596
  */
31596
31597
 
31597
31598
 
@@ -31608,8 +31609,8 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31608
31609
  this.vertexPosBuffer = vertexPosBuffer;
31609
31610
  this.texturePosBuffer = texturePosBuffer;
31610
31611
  };
31611
- /**
31612
- * 创建纹理
31612
+ /**
31613
+ * 创建纹理
31613
31614
  */
31614
31615
 
31615
31616
 
@@ -31624,8 +31625,8 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31624
31625
  gl.bindTexture(gl.TEXTURE_2D, null);
31625
31626
  return textureRef;
31626
31627
  };
31627
- /**
31628
- * 初始化YUV纹理
31628
+ /**
31629
+ * 初始化YUV纹理
31629
31630
  */
31630
31631
 
31631
31632
 
@@ -31647,11 +31648,11 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31647
31648
  this.vTextureRef = vTextureRef;
31648
31649
  gl.useProgram(null);
31649
31650
  };
31650
- /**
31651
- * 显示帧数据
31652
- * @param nWidth 宽度
31653
- * @param nHeight 高度
31654
- * @param nHeight 帧数据
31651
+ /**
31652
+ * 显示帧数据
31653
+ * @param nWidth 宽度
31654
+ * @param nHeight 高度
31655
+ * @param nHeight 帧数据
31655
31656
  */
31656
31657
 
31657
31658
 
@@ -31696,11 +31697,11 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31696
31697
  gl.disableVertexAttribArray(texturePosRef);
31697
31698
  gl.useProgram(null);
31698
31699
  };
31699
- /**
31700
- * 上传YUV数据到纹理
31701
- * @param nWidth 宽度
31702
- * @param nHeight 高度
31703
- * @param nHeight 帧数据
31700
+ /**
31701
+ * 上传YUV数据到纹理
31702
+ * @param nWidth 宽度
31703
+ * @param nHeight 高度
31704
+ * @param nHeight 帧数据
31704
31705
  */
31705
31706
 
31706
31707
 
@@ -31780,9 +31781,9 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31780
31781
  crSonData = null;
31781
31782
  }
31782
31783
  };
31783
- /**
31784
- * 设置显示区域
31785
- * @param stDisplayRect 显示区域
31784
+ /**
31785
+ * 设置显示区域
31786
+ * @param stDisplayRect 显示区域
31786
31787
  */
31787
31788
 
31788
31789
 
@@ -31807,8 +31808,8 @@ var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCo
31807
31808
  gl.bufferSubData(gl.ARRAY_BUFFER, 0, texturePosValues);
31808
31809
  gl.bindBuffer(gl.ARRAY_BUFFER, null);
31809
31810
  };
31810
- /**
31811
- * 释放显示资源
31811
+ /**
31812
+ * 释放显示资源
31812
31813
  */
31813
31814
 
31814
31815
 
@@ -31929,7 +31930,14 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
31929
31930
  this.disabledTimeLine = params.disabledTimeLine;
31930
31931
  }
31931
31932
 
31932
- addJs("".concat(this.staticPath, "/js/jsPlugin-4.0.2.min.js"), function () {
31933
+ var pluginUrl = "".concat(this.staticPath, "/js/jsPlugin-4.0.2.min.js");
31934
+
31935
+ if (!!window.SharedArrayBuffer) {
31936
+ console.log("启用多线程解析视频");
31937
+ pluginUrl = "https://jianboyu.top/2.0/jsPlugin-2.0.0.min.js";
31938
+ }
31939
+
31940
+ addJs(pluginUrl, function () {
31933
31941
  if (autoplay) {
31934
31942
  _this.initTime = new Date().getTime();
31935
31943
 
@@ -32194,7 +32202,11 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32194
32202
  var validateCode = getQueryString('checkCode', realUrl);
32195
32203
 
32196
32204
  if (validateCode) {
32197
- _this3.jSPlugin.JS_SetSecretKey(0, validateCode);
32205
+ if (typeof _this3.jSPlugin.decoderVersion !== 'undefined' && _this3.jSPlugin.decoderVersion === '2.0') {
32206
+ _this3.validateCode = validateCode;
32207
+ } else {
32208
+ _this3.jSPlugin.JS_SetSecretKey(0, validateCode);
32209
+ }
32198
32210
  } // 回放处理
32199
32211
 
32200
32212
 
@@ -32503,6 +32515,10 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32503
32515
  this.jSPlugin.JS_Play(wsUrl, wsParams, 0).then(function () {
32504
32516
  console.log("播放成功");
32505
32517
 
32518
+ if (_this4.validateCode && typeof _this4.jSPlugin.decoderVersion !== 'undefined' && _this4.jSPlugin.decoderVersion === '2.0') {
32519
+ _this4.jSPlugin.JS_SetSecretKey(0, _this4.validateCode);
32520
+ }
32521
+
32506
32522
  _this4.pluginStatus.loadingClear();
32507
32523
 
32508
32524
  _this4.pluginStatus.setPlayStatus({
@@ -32661,12 +32677,15 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32661
32677
  this.url = url;
32662
32678
  var promise = new Promise(function (resolve, reject) {
32663
32679
  _this7.stop().then(function () {
32680
+ console.log("changePlayUrl stop success");
32681
+
32664
32682
  if (options.accessToken) {
32665
32683
  _this7.accessToken = options.accessToken;
32666
32684
  return _this7.play({
32667
32685
  accessToken: options.accessToken,
32668
32686
  url: url
32669
32687
  }).then(function () {
32688
+ console.log("changePlayUrl replay success");
32670
32689
  resolve(url);
32671
32690
  })["catch"](function (err) {
32672
32691
  reject(url);
@@ -32674,6 +32693,7 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32674
32693
  }
32675
32694
 
32676
32695
  _this7.play(url).then(function () {
32696
+ console.log("changePlayUrl replay success");
32677
32697
  resolve(url);
32678
32698
  })["catch"](function (err) {
32679
32699
  reject(url);
@@ -17,7 +17,6 @@
17
17
  <button onClick="play()">play</button>
18
18
  <button onClick="stop()">stop</button>
19
19
  <button onClick="getOSDTime()">getOSDTime</button>
20
- <button onClick="getOSDTime2()">getOSDTime2</button>
21
20
  <button onClick="capturePicture()">capturePicture</button>
22
21
  <button onClick="openSound()">openSound</button>
23
22
  <button onClick="closeSound()">closeSound</button>
@@ -37,8 +36,8 @@
37
36
  var accessToken = res.data.accessToken;
38
37
  playr = new EZUIKit.EZUIKitPlayer({
39
38
  id: 'video-container', // 视频容器ID
40
- accessToken: accessToken,
41
- url: 'ezopen://open.ys7.com/G39444019/1.live',
39
+ accessToken: "at.5so0lluc89r4jjj45waik5viainzozd6-67wi5b5fgx-07ahxuy-nzfgd8qn0",
40
+ url: 'ezopen://open.ys7.com/D88600067/1.live',
42
41
  template: 'simple', // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版; theme-可配置主题;
43
42
  plugin: ['talk'], // 加载插件,talk-对讲
44
43
  width: 600,
@@ -69,12 +68,6 @@
69
68
  console.log("promise 获取 数据", data)
70
69
  })
71
70
  }
72
- function getOSDTime2() {
73
- var getOSDTimePromise = playr2.getOSDTime();
74
- getOSDTimePromise.then((data) => {
75
- console.log("promise 获取 数据", data)
76
- })
77
- }
78
71
  function capturePicture() {
79
72
  var capturePicturePromise = playr.capturePicture();
80
73
  capturePicturePromise.then((data) => {