ezuikit-js 0.5.9 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
- v 0.5.8
1
+ v 0.6.0
2
+
3
+ [fix]兼容低版本火狐浏览器播放视频
4
+
5
+ [fix]修复网站全屏模式下,再次执行视频全屏冲突问题
6
+
7
+
8
+ v 0.5.9
2
9
 
3
10
  [feta]支持用户通过开启谷歌实验室特性启动多线程解码
4
11
 
@@ -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({
@@ -32106,20 +32139,40 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32106
32139
  }
32107
32140
 
32108
32141
  var initDecoder = function initDecoder(resolve, reject) {
32109
- var jSPlugin = new window.JSPlugin({
32110
- szId: id,
32111
- iType: 2,
32112
- iWidth: width,
32113
- iHeight: height,
32114
- iMaxSplit: 1,
32115
- iCurrentSplit: 1,
32116
- szBasePath: "",
32117
- staticPath: params.staticPath,
32118
- oStyle: {
32119
- border: "none",
32120
- background: "#000000"
32121
- }
32122
- });
32142
+ var jSPlugin;
32143
+
32144
+ if (isVersion2Available()) {
32145
+ jSPlugin = new window.JSPlugin({
32146
+ szId: id,
32147
+ iType: 2,
32148
+ iWidth: width,
32149
+ iHeight: height,
32150
+ iMaxSplit: 1,
32151
+ iCurrentSplit: 1,
32152
+ szBasePath: "",
32153
+ staticPath: params.staticPath,
32154
+ oStyle: {
32155
+ border: "none",
32156
+ background: "#000000"
32157
+ }
32158
+ });
32159
+ } else {
32160
+ jSPlugin = new window.JSPlugin({
32161
+ szId: id,
32162
+ iType: 2,
32163
+ iWidth: width,
32164
+ iHeight: height,
32165
+ iMaxSplit: 1,
32166
+ iCurrentSplit: 1,
32167
+ szBasePath: "",
32168
+ staticPath: params.staticPath,
32169
+ oStyle: {
32170
+ border: "none",
32171
+ background: "#000000"
32172
+ }
32173
+ });
32174
+ }
32175
+
32123
32176
  jSPlugin.EventCallback = {
32124
32177
  loadEventHandler: function loadEventHandler() {},
32125
32178
  zoomEventResponse: function
package/ezuikit.js CHANGED
@@ -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({
@@ -32106,20 +32139,40 @@ var EZUIKitPlayer = /*#__PURE__*/function () {
32106
32139
  }
32107
32140
 
32108
32141
  var initDecoder = function initDecoder(resolve, reject) {
32109
- var jSPlugin = new window.JSPlugin({
32110
- szId: id,
32111
- iType: 2,
32112
- iWidth: width,
32113
- iHeight: height,
32114
- iMaxSplit: 1,
32115
- iCurrentSplit: 1,
32116
- szBasePath: "",
32117
- staticPath: params.staticPath,
32118
- oStyle: {
32119
- border: "none",
32120
- background: "#000000"
32121
- }
32122
- });
32142
+ var jSPlugin;
32143
+
32144
+ if (isVersion2Available()) {
32145
+ jSPlugin = new window.JSPlugin({
32146
+ szId: id,
32147
+ iType: 2,
32148
+ iWidth: width,
32149
+ iHeight: height,
32150
+ iMaxSplit: 1,
32151
+ iCurrentSplit: 1,
32152
+ szBasePath: "",
32153
+ staticPath: params.staticPath,
32154
+ oStyle: {
32155
+ border: "none",
32156
+ background: "#000000"
32157
+ }
32158
+ });
32159
+ } else {
32160
+ jSPlugin = new window.JSPlugin({
32161
+ szId: id,
32162
+ iType: 2,
32163
+ iWidth: width,
32164
+ iHeight: height,
32165
+ iMaxSplit: 1,
32166
+ iCurrentSplit: 1,
32167
+ szBasePath: "",
32168
+ staticPath: params.staticPath,
32169
+ oStyle: {
32170
+ border: "none",
32171
+ background: "#000000"
32172
+ }
32173
+ });
32174
+ }
32175
+
32123
32176
  jSPlugin.EventCallback = {
32124
32177
  loadEventHandler: function loadEventHandler() {},
32125
32178
  zoomEventResponse: function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ezuikit-js",
3
- "version": "0.5.9",
3
+ "version": "0.6.0",
4
4
  "description": "ezuikit javascript for npm",
5
5
  "main": "ezuikit.js",
6
6
  "scripts": {