rtsp2web 2.1.0 → 2.2.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/dist/rtsp2web.js CHANGED
@@ -146,6 +146,10 @@ function _createSuper(Derived) {
146
146
  };
147
147
  }
148
148
 
149
+ function _readOnlyError(name) {
150
+ throw new TypeError("\"" + name + "\" is read-only");
151
+ }
152
+
149
153
  function _toConsumableArray(arr) {
150
154
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
151
155
  }
@@ -4762,7 +4766,7 @@ WebSocket.WebSocketServer = WebSocket.Server;
4762
4766
 
4763
4767
  var ws = WebSocket;
4764
4768
 
4765
- var version = "2.1.0";
4769
+ var version = "2.2.0";
4766
4770
 
4767
4771
  /*!
4768
4772
  * name: main.js
@@ -5028,7 +5032,14 @@ var RTSP2web = /*#__PURE__*/function () {
5028
5032
 
5029
5033
  _defineProperty(this, "channels", []);
5030
5034
 
5031
- // RTSP2web是入口类,在入口类中对视频通道进行空闲检测
5035
+ // 用户可以自定义分辨率
5036
+ if (config && config.videoSize) {
5037
+ if (config.videoSize.includes('x')) {
5038
+ config.videoSize, _readOnlyError("videoSize");
5039
+ }
5040
+ } // RTSP2web是入口类,在入口类中对视频通道进行空闲检测
5041
+
5042
+
5032
5043
  setInterval(function () {
5033
5044
  return _this5.checkFree();
5034
5045
  }, 10000); // 创建websocket服务器,监听在${port}端口