inl-ui 0.1.21 → 0.1.22

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.
@@ -4540,7 +4540,7 @@ class WebRtcMt {
4540
4540
  }
4541
4541
  }
4542
4542
  }
4543
- retryTime;
4543
+ // protected retryTime;
4544
4544
  // 拉流创建播放器
4545
4545
  createVideo(plays) {
4546
4546
  this.mediaServerAddrMap.set(plays.videoElm, plays);
@@ -4551,7 +4551,6 @@ class WebRtcMt {
4551
4551
  fetch(addRtspProxyUrl, {
4552
4552
  method: "GET"
4553
4553
  }).then(response => {
4554
- this.retryTime = 0;
4555
4554
  response.json().then(res => {
4556
4555
  if (res.code === 0) {
4557
4556
  this.startPlay(plays);
@@ -4563,12 +4562,9 @@ class WebRtcMt {
4563
4562
  }
4564
4563
  });
4565
4564
  }).catch(err => {
4566
- if (!this.retryTime) {
4567
- this.retryTime = 60;
4568
- setTimeout(() => {
4569
- this.rePlay();
4570
- }, 60 * 1e3);
4571
- }
4565
+ setTimeout(() => {
4566
+ this.rePlay();
4567
+ }, 3 * 60 * 1e3);
4572
4568
  });
4573
4569
  });
4574
4570
  }
@@ -4627,7 +4623,7 @@ class WebRtcMt {
4627
4623
  this.stopPlay();
4628
4624
  setTimeout(() => {
4629
4625
  this.init(this.opt);
4630
- }, 1e3);
4626
+ }, 5 * 1e3);
4631
4627
  }
4632
4628
  // 播放
4633
4629
  play(videoElm) {
@@ -49,7 +49,6 @@ declare class WebRtcMt {
49
49
  sdpUrl: any;
50
50
  };
51
51
  protected init(opt: WebRtc): void;
52
- protected retryTime: any;
53
52
  protected createVideo(plays: PlayVideoArgs): Promise<unknown>;
54
53
  log(type: "err" | "info" | "warn", text: string): void;
55
54
  stopPlay(id?: string): void;
@@ -4536,7 +4536,7 @@ class WebRtcMt {
4536
4536
  }
4537
4537
  }
4538
4538
  }
4539
- retryTime;
4539
+ // protected retryTime;
4540
4540
  // 拉流创建播放器
4541
4541
  createVideo(plays) {
4542
4542
  this.mediaServerAddrMap.set(plays.videoElm, plays);
@@ -4547,7 +4547,6 @@ class WebRtcMt {
4547
4547
  fetch(addRtspProxyUrl, {
4548
4548
  method: "GET"
4549
4549
  }).then(response => {
4550
- this.retryTime = 0;
4551
4550
  response.json().then(res => {
4552
4551
  if (res.code === 0) {
4553
4552
  this.startPlay(plays);
@@ -4559,12 +4558,9 @@ class WebRtcMt {
4559
4558
  }
4560
4559
  });
4561
4560
  }).catch(err => {
4562
- if (!this.retryTime) {
4563
- this.retryTime = 60;
4564
- setTimeout(() => {
4565
- this.rePlay();
4566
- }, 60 * 1e3);
4567
- }
4561
+ setTimeout(() => {
4562
+ this.rePlay();
4563
+ }, 3 * 60 * 1e3);
4568
4564
  });
4569
4565
  });
4570
4566
  }
@@ -4623,7 +4619,7 @@ class WebRtcMt {
4623
4619
  this.stopPlay();
4624
4620
  setTimeout(() => {
4625
4621
  this.init(this.opt);
4626
- }, 1e3);
4622
+ }, 5 * 1e3);
4627
4623
  }
4628
4624
  // 播放
4629
4625
  play(videoElm) {
@@ -6,10 +6,12 @@ var vue = require('vue');
6
6
  var iconsVue = require('@ant-design/icons-vue');
7
7
  var axios = require('axios');
8
8
  var vueRouter = require('vue-router');
9
+ var EZUIKit = require('ezuikit-js');
9
10
 
10
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
12
 
12
13
  var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
14
+ var EZUIKit__default = /*#__PURE__*/_interopDefaultLegacy(EZUIKit);
13
15
 
14
16
  const config = {
15
17
  prefix: "inl",
@@ -4526,7 +4528,7 @@ class WebRtcMt$1 {
4526
4528
  }
4527
4529
  }
4528
4530
  }
4529
- retryTime;
4531
+ // protected retryTime;
4530
4532
  // 拉流创建播放器
4531
4533
  createVideo(plays) {
4532
4534
  this.mediaServerAddrMap.set(plays.videoElm, plays);
@@ -4537,7 +4539,6 @@ class WebRtcMt$1 {
4537
4539
  fetch(addRtspProxyUrl, {
4538
4540
  method: "GET"
4539
4541
  }).then(response => {
4540
- this.retryTime = 0;
4541
4542
  response.json().then(res => {
4542
4543
  if (res.code === 0) {
4543
4544
  this.startPlay(plays);
@@ -4549,12 +4550,9 @@ class WebRtcMt$1 {
4549
4550
  }
4550
4551
  });
4551
4552
  }).catch(err => {
4552
- if (!this.retryTime) {
4553
- this.retryTime = 60;
4554
- setTimeout(() => {
4555
- this.rePlay();
4556
- }, 60 * 1e3);
4557
- }
4553
+ setTimeout(() => {
4554
+ this.rePlay();
4555
+ }, 3 * 60 * 1e3);
4558
4556
  });
4559
4557
  });
4560
4558
  }
@@ -4613,7 +4611,7 @@ class WebRtcMt$1 {
4613
4611
  this.stopPlay();
4614
4612
  setTimeout(() => {
4615
4613
  this.init(this.opt);
4616
- }, 1e3);
4614
+ }, 5 * 1e3);
4617
4615
  }
4618
4616
  // 播放
4619
4617
  play(videoElm) {
@@ -4790,9 +4788,9 @@ const VideoPlayerV2 = vue.defineComponent({
4790
4788
  });
4791
4789
  vue.onBeforeUnmount(() => {
4792
4790
  stopPlay();
4793
- stopV(`videoPlayer_${uuid}`);
4794
- const videoElement = document.getElementById(uuid);
4791
+ const videoElement = document.getElementById(`videoPlayer_${uuid}`);
4795
4792
  if (videoElement) {
4793
+ videoElement.pause();
4796
4794
  videoElement.src = null;
4797
4795
  videoElement.srcObject = null;
4798
4796
  videoElement.remove();
@@ -5235,23 +5233,12 @@ const VideoBoxV2 = vue.defineComponent({
5235
5233
  camera.value = res.data.data;
5236
5234
  streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
5237
5235
  };
5238
- let interval;
5239
5236
  let timeout;
5240
5237
  let show = vue.ref(true);
5241
- const timer = setInterval(() => {
5242
- show.value = false;
5243
- setTimeout(() => {
5244
- show.value = true;
5245
- }, 500);
5246
- }, _prop.intervalTime * (0.5 + Math.random()));
5247
- vue.onBeforeUnmount(() => {
5248
- clearInterval(interval);
5249
- clearInterval(timer);
5250
- });
5238
+ vue.onBeforeUnmount(() => {});
5251
5239
  const fill = vue.ref("fill");
5252
5240
  vue.watch(() => _prop.camera, val => {
5253
5241
  if (val && Object.keys(val).length != 0) {
5254
- clearInterval(interval);
5255
5242
  getVideoParams(val);
5256
5243
  getVideoDetail(val);
5257
5244
  const fillVal = localStorage.getItem(val);
@@ -6128,7 +6115,62 @@ const AlarmVideo = vue.defineComponent({
6128
6115
  });
6129
6116
  var alarmVideo = installComponent(AlarmVideo, "alarm-video");
6130
6117
 
6118
+ const CloudVideo = vue.defineComponent({
6119
+ props: {
6120
+ // 视频信息|视频源uuid
6121
+ cameraId: {
6122
+ require: true,
6123
+ type: String
6124
+ },
6125
+ channelNo: {
6126
+ type: Number,
6127
+ default: 1
6128
+ },
6129
+ // token
6130
+ token: {
6131
+ type: String,
6132
+ default: ""
6133
+ },
6134
+ // template
6135
+ template: {
6136
+ type: String,
6137
+ default: ""
6138
+ }
6139
+ },
6140
+ emits: [],
6141
+ setup(prop, _context) {
6142
+ const uuid = vue.ref(UUID());
6143
+ const initVideo = async () => {
6144
+ const res = await axios__default["default"].post("https://open.ys7.com/api/lapp/v2/live/address/get", void 0, {
6145
+ params: {
6146
+ accessToken: prop.token,
6147
+ deviceSerial: prop.cameraId,
6148
+ channelNo: prop.channelNo || 1
6149
+ }
6150
+ });
6151
+ const parent = document.getElementById(`cloudVideo_${uuid.value}`)?.parentNode;
6152
+ const opt = {
6153
+ id: `cloudVideo_${uuid.value}`,
6154
+ url: res.data.data.url,
6155
+ accessToken: prop.token,
6156
+ template: "pcLive",
6157
+ height: parent?.clientHeight
6158
+ };
6159
+ new EZUIKit__default["default"].EZUIKitPlayer(opt);
6160
+ };
6161
+ vue.onMounted(() => {
6162
+ initVideo();
6163
+ });
6164
+ return () => vue.createVNode("div", {
6165
+ "id": `cloudVideo_${uuid.value}`,
6166
+ "class": "cloudVideo"
6167
+ }, null);
6168
+ }
6169
+ });
6170
+ var cloudVideo = installComponent(CloudVideo, "cloud-video");
6171
+
6131
6172
  exports.AlarmVideo = alarmVideo;
6173
+ exports.CloudVideo = cloudVideo;
6132
6174
  exports.PollingPlay = pollingPlay;
6133
6175
  exports.VideoBox = videoBox;
6134
6176
  exports.VideoPlayerV1 = videoPlayerV1;
@@ -2,7 +2,7 @@ import * as vue from 'vue';
2
2
  import { PropType } from 'vue';
3
3
  import * as vue_jsx_runtime from 'vue/jsx-runtime';
4
4
 
5
- declare const _default$5: vue.DefineComponent<{
5
+ declare const _default$6: vue.DefineComponent<{
6
6
  teams: {
7
7
  type: {
8
8
  (arrayLength: number): any[];
@@ -73,7 +73,7 @@ interface videoInfo$1 {
73
73
  [key: string]: string | number | boolean | videoInfo$1 | Array<videoInfo$1>;
74
74
  }
75
75
 
76
- declare const _default$4: vue.DefineComponent<{
76
+ declare const _default$5: vue.DefineComponent<{
77
77
  camera: {
78
78
  require: boolean;
79
79
  type: PropType<String | videoInfo$1>;
@@ -128,7 +128,7 @@ interface videoInfo {
128
128
  [key: string]: string | number | boolean | videoInfo | Array<videoInfo>;
129
129
  }
130
130
 
131
- declare const _default$3: vue.DefineComponent<{
131
+ declare const _default$4: vue.DefineComponent<{
132
132
  camera: {
133
133
  require: boolean;
134
134
  type: PropType<String | videoInfo>;
@@ -152,7 +152,7 @@ declare const _default$3: vue.DefineComponent<{
152
152
  intervalTime: number;
153
153
  }, {}>;
154
154
 
155
- declare const _default$2: vue.DefineComponent<{
155
+ declare const _default$3: vue.DefineComponent<{
156
156
  camera: {
157
157
  require: boolean;
158
158
  type: StringConstructor;
@@ -229,7 +229,7 @@ declare const _default$2: vue.DefineComponent<{
229
229
  btns: string[];
230
230
  }, {}>;
231
231
 
232
- declare const _default$1: vue.DefineComponent<{
232
+ declare const _default$2: vue.DefineComponent<{
233
233
  theme: {
234
234
  type: StringConstructor;
235
235
  default: string;
@@ -269,7 +269,7 @@ declare const _default$1: vue.DefineComponent<{
269
269
  countDown: number;
270
270
  }, {}>;
271
271
 
272
- declare const _default: vue.DefineComponent<{
272
+ declare const _default$1: vue.DefineComponent<{
273
273
  camera: {
274
274
  require: boolean;
275
275
  type: StringConstructor;
@@ -346,4 +346,44 @@ declare const _default: vue.DefineComponent<{
346
346
  showInfo: boolean;
347
347
  }, {}>;
348
348
 
349
- export { _default$1 as AlarmVideo, _default$5 as PollingPlay, _default$2 as VideoBox, _default$3 as VideoPlayerV1, _default$4 as VideoPlayerV2, _default as videoBoxV2 };
349
+ declare const _default: vue.DefineComponent<{
350
+ cameraId: {
351
+ require: boolean;
352
+ type: StringConstructor;
353
+ };
354
+ channelNo: {
355
+ type: NumberConstructor;
356
+ default: number;
357
+ };
358
+ token: {
359
+ type: StringConstructor;
360
+ default: string;
361
+ };
362
+ template: {
363
+ type: StringConstructor;
364
+ default: string;
365
+ };
366
+ }, () => vue_jsx_runtime.JSX.Element, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, never[], never, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
367
+ cameraId: {
368
+ require: boolean;
369
+ type: StringConstructor;
370
+ };
371
+ channelNo: {
372
+ type: NumberConstructor;
373
+ default: number;
374
+ };
375
+ token: {
376
+ type: StringConstructor;
377
+ default: string;
378
+ };
379
+ template: {
380
+ type: StringConstructor;
381
+ default: string;
382
+ };
383
+ }>> & {}, {
384
+ token: string;
385
+ template: string;
386
+ channelNo: number;
387
+ }, {}>;
388
+
389
+ export { _default$2 as AlarmVideo, _default as CloudVideo, _default$6 as PollingPlay, _default$3 as VideoBox, _default$4 as VideoPlayerV1, _default$5 as VideoPlayerV2, _default$1 as videoBoxV2 };
@@ -2,6 +2,7 @@ import { defineComponent, ref, watch, onBeforeUnmount, createVNode, resolveCompo
2
2
  import { FullscreenOutlined, createFromIconfontCN } from '@ant-design/icons-vue';
3
3
  import axios from 'axios';
4
4
  import { useRouter } from 'vue-router';
5
+ import EZUIKit from 'ezuikit-js';
5
6
 
6
7
  const config = {
7
8
  prefix: "inl",
@@ -4518,7 +4519,7 @@ class WebRtcMt$1 {
4518
4519
  }
4519
4520
  }
4520
4521
  }
4521
- retryTime;
4522
+ // protected retryTime;
4522
4523
  // 拉流创建播放器
4523
4524
  createVideo(plays) {
4524
4525
  this.mediaServerAddrMap.set(plays.videoElm, plays);
@@ -4529,7 +4530,6 @@ class WebRtcMt$1 {
4529
4530
  fetch(addRtspProxyUrl, {
4530
4531
  method: "GET"
4531
4532
  }).then(response => {
4532
- this.retryTime = 0;
4533
4533
  response.json().then(res => {
4534
4534
  if (res.code === 0) {
4535
4535
  this.startPlay(plays);
@@ -4541,12 +4541,9 @@ class WebRtcMt$1 {
4541
4541
  }
4542
4542
  });
4543
4543
  }).catch(err => {
4544
- if (!this.retryTime) {
4545
- this.retryTime = 60;
4546
- setTimeout(() => {
4547
- this.rePlay();
4548
- }, 60 * 1e3);
4549
- }
4544
+ setTimeout(() => {
4545
+ this.rePlay();
4546
+ }, 3 * 60 * 1e3);
4550
4547
  });
4551
4548
  });
4552
4549
  }
@@ -4605,7 +4602,7 @@ class WebRtcMt$1 {
4605
4602
  this.stopPlay();
4606
4603
  setTimeout(() => {
4607
4604
  this.init(this.opt);
4608
- }, 1e3);
4605
+ }, 5 * 1e3);
4609
4606
  }
4610
4607
  // 播放
4611
4608
  play(videoElm) {
@@ -4782,9 +4779,9 @@ const VideoPlayerV2 = defineComponent({
4782
4779
  });
4783
4780
  onBeforeUnmount(() => {
4784
4781
  stopPlay();
4785
- stopV(`videoPlayer_${uuid}`);
4786
- const videoElement = document.getElementById(uuid);
4782
+ const videoElement = document.getElementById(`videoPlayer_${uuid}`);
4787
4783
  if (videoElement) {
4784
+ videoElement.pause();
4788
4785
  videoElement.src = null;
4789
4786
  videoElement.srcObject = null;
4790
4787
  videoElement.remove();
@@ -5227,23 +5224,12 @@ const VideoBoxV2 = defineComponent({
5227
5224
  camera.value = res.data.data;
5228
5225
  streams.value = JSON.parse(camera.value.brandTypePo?.streamTypeDict || "[]");
5229
5226
  };
5230
- let interval;
5231
5227
  let timeout;
5232
5228
  let show = ref(true);
5233
- const timer = setInterval(() => {
5234
- show.value = false;
5235
- setTimeout(() => {
5236
- show.value = true;
5237
- }, 500);
5238
- }, _prop.intervalTime * (0.5 + Math.random()));
5239
- onBeforeUnmount(() => {
5240
- clearInterval(interval);
5241
- clearInterval(timer);
5242
- });
5229
+ onBeforeUnmount(() => {});
5243
5230
  const fill = ref("fill");
5244
5231
  watch(() => _prop.camera, val => {
5245
5232
  if (val && Object.keys(val).length != 0) {
5246
- clearInterval(interval);
5247
5233
  getVideoParams(val);
5248
5234
  getVideoDetail(val);
5249
5235
  const fillVal = localStorage.getItem(val);
@@ -6120,4 +6106,58 @@ const AlarmVideo = defineComponent({
6120
6106
  });
6121
6107
  var alarmVideo = installComponent(AlarmVideo, "alarm-video");
6122
6108
 
6123
- export { alarmVideo as AlarmVideo, pollingPlay as PollingPlay, videoBox as VideoBox, videoPlayerV1 as VideoPlayerV1, videoPlayerV2 as VideoPlayerV2, VideoBoxV2$1 as videoBoxV2 };
6109
+ const CloudVideo = defineComponent({
6110
+ props: {
6111
+ // 视频信息|视频源uuid
6112
+ cameraId: {
6113
+ require: true,
6114
+ type: String
6115
+ },
6116
+ channelNo: {
6117
+ type: Number,
6118
+ default: 1
6119
+ },
6120
+ // token
6121
+ token: {
6122
+ type: String,
6123
+ default: ""
6124
+ },
6125
+ // template
6126
+ template: {
6127
+ type: String,
6128
+ default: ""
6129
+ }
6130
+ },
6131
+ emits: [],
6132
+ setup(prop, _context) {
6133
+ const uuid = ref(UUID());
6134
+ const initVideo = async () => {
6135
+ const res = await axios.post("https://open.ys7.com/api/lapp/v2/live/address/get", void 0, {
6136
+ params: {
6137
+ accessToken: prop.token,
6138
+ deviceSerial: prop.cameraId,
6139
+ channelNo: prop.channelNo || 1
6140
+ }
6141
+ });
6142
+ const parent = document.getElementById(`cloudVideo_${uuid.value}`)?.parentNode;
6143
+ const opt = {
6144
+ id: `cloudVideo_${uuid.value}`,
6145
+ url: res.data.data.url,
6146
+ accessToken: prop.token,
6147
+ template: "pcLive",
6148
+ height: parent?.clientHeight
6149
+ };
6150
+ new EZUIKit.EZUIKitPlayer(opt);
6151
+ };
6152
+ onMounted(() => {
6153
+ initVideo();
6154
+ });
6155
+ return () => createVNode("div", {
6156
+ "id": `cloudVideo_${uuid.value}`,
6157
+ "class": "cloudVideo"
6158
+ }, null);
6159
+ }
6160
+ });
6161
+ var cloudVideo = installComponent(CloudVideo, "cloud-video");
6162
+
6163
+ export { alarmVideo as AlarmVideo, cloudVideo as CloudVideo, pollingPlay as PollingPlay, videoBox as VideoBox, videoPlayerV1 as VideoPlayerV1, videoPlayerV2 as VideoPlayerV2, VideoBoxV2$1 as videoBoxV2 };
@@ -1,2 +1,3 @@
1
1
  .playVideos{display:flex;flex-direction:column;height:100%;padding-left:20px}.playVideos .operate{display:flex;justify-content:space-between;margin:5px 0}.playVideos .operate .button{cursor:pointer}.playVideos .grid{display:grid;flex:1;overflow:hidden}.playVideos .grid .video{background:#000;border:1px solid hsla(216,7%,59%,.3);height:100%;object-fit:fill;overflow:hidden;width:100%}.playVideos .grid.full{height:100%;left:0;position:fixed;top:0;width:100%;z-index:10}.playVideos .type1{grid-template-columns:1fr;grid-template-rows:1fr}.playVideos .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.playVideos .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type8 .video:first-child{grid-column:1/4;grid-row:1/4}.playVideos .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.playVideos .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.playVideos .type13 .video:first-child{grid-column:1/3;grid-row:1/3}.playVideos .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}@keyframes moveBottom{0%{bottom:0}to{bottom:-66px}}.videoComponent{background:#000;height:100%;position:relative;width:100%}.videoComponent.fill{object-fit:fill}.videoComponent.contain{object-fit:contain}.videoBox{height:100%;overflow:hidden;position:relative}.videoBox.alarm:before{border:2px solid #ea5858;box-shadow:inset 0 0 10px 8px rgba(234,88,88,.5);content:"";height:100%;pointer-events:none;position:absolute;top:0;width:100%;z-index:7}.videoBox:hover .selectFields{animation-duration:1s;animation-fill-mode:both;animation-name:moveBottom}.videoBox:hover .footer-min{display:flex}.videoBox:hover .footer-min .name-min span,.videoBox:hover .footer-min .tool{display:block}.videoBox .selectFields{background:rgba(0,0,0,.3);bottom:0;display:grid;grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr;height:66px;position:absolute;width:100%}.videoBox .selectFields .info{border:0;color:#fff;line-height:33px;overflow:hidden;padding:0 5px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.videoBox .selectFields .info .value{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.videoBox .footer-min{align-items:center;backdrop-filter:blur(10px);background:hsla(0,0%,100%,.04);border-radius:4px 4px 0 0;bottom:0;display:none;height:44px;justify-content:space-between;position:absolute;width:100%}.videoBox .footer-min .name-min{align-items:center;display:flex;padding-left:15px}.videoBox .footer-min .name-min span{color:#fff;display:none;font-size:16px;font-weight:600}.videoBox .footer-min .tool{display:none}.videoBox .footer-min .tool img{cursor:pointer;height:20px;margin-right:15px;width:20px}.videoControls{align-items:center;display:flex;flex-direction:column;width:100%}.videoControls .videoControl{height:126px;position:relative;width:126px}.videoControls .videoControl .bg{height:100%;position:relative;width:100%}.videoControls .videoControl img{cursor:pointer;position:absolute}.videoControls .videoControl .up{left:52px;top:14px}.videoControls .videoControl .lup{left:26px;top:26px;transform:rotate(-45deg)}.videoControls .videoControl .rup{left:78px;top:27px;transform:rotate(45deg)}.videoControls .videoControl .left{left:14px;top:52px;transform:rotate(-90deg)}.videoControls .videoControl .right{left:90px;top:52px;transform:rotate(90deg)}.videoControls .videoControl .ldown{left:26px;top:78px;transform:rotate(215deg)}.videoControls .videoControl .down{left:52px;top:90px;transform:rotate(180deg)}.videoControls .videoControl .rdown{left:78px;top:78px;transform:rotate(135deg)}.videoControls .btns{background:#e0e7f2;border-radius:19px;height:28px;margin:8px 8px 0;padding:3px;width:56px}.videoControls .btns img{cursor:pointer;margin-right:1px}
2
- .videoAlarmDia.dark{background:linear-gradient(90deg,#3e7eff,#1e4e75 30%,#1e4e75 70%,#3e7eff);padding:1px}.videoAlarmDia.dark .ant-modal-close{color:#fff}.videoAlarmDia.dark .ant-modal-header{background-color:#22396f;border-bottom-color:transparent;padding-left:20px}.videoAlarmDia.dark .ant-modal-header .ant-modal-title{align-items:center;background-image:linear-gradient(90deg,#2852a8 0,rgba(40,82,168,0) 50%);color:#fff;display:flex;height:42px;padding-left:10px}.videoAlarmDia.dark .ant-modal-content{background-color:#22396f}.videoAlarmDia.dark .ant-modal-content .body,.videoAlarmDia.dark .ant-modal-content .body .alarmList .alarm .name,.videoAlarmDia.dark .ant-modal-content .body .alarmList .title,.videoAlarmDia.dark .ant-modal-content .body .themeImg{color:#fff}.videoAlarmDia.dark .ant-modal-content .body .tabs .tabContainer .allTab .tab{background:#ffffff1a;color:#fff}.videoAlarmDia.dark .ant-modal-content .body .tabs .tabContainer .allTab .tab.active{background:#3e7eff;color:#fff}.videoAlarmDia .ant-modal-body{padding-top:18px}.videoAlarmDia .body{display:flex;flex-direction:column;height:660px}.videoAlarmDia .body .title{color:#000;font-size:18px}.videoAlarmDia .body .themeImg{height:18px;margin-right:5px;width:18px}.videoAlarmDia .body .current{align-self:center;display:flex;height:400px;justify-content:center;margin:10px 0 25px;width:750px}.videoAlarmDia .body .current .grid{grid-gap:3px;background-color:transparent;display:grid;height:100%;overflow:hidden;width:100%}.videoAlarmDia .body .current .grid .videoBox{background-color:#000}.videoAlarmDia .body .alarmList{display:flex;flex-wrap:wrap;justify-content:flex-start;max-height:80px;overflow:auto}.videoAlarmDia .body .alarmList .title{font-size:14px;font-weight:600;margin-bottom:10px}.videoAlarmDia .body .alarmList .alarm{align-items:center;border-radius:5px;color:#000;cursor:pointer;height:24px;margin-bottom:10px;margin-right:10px;padding:5px}.videoAlarmDia .body .alarmList .alarm img{height:16px;margin-right:5px;width:16px}.videoAlarmDia .body .alarmList .alarm .name{font-size:14px;white-space:nowrap}.videoAlarmDia .body .alarmList .alarm1{background:rgba(234,88,88,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm2{background:rgba(255,146,20,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm3{background:rgba(255,196,20,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm4{background:rgba(62,126,255,.1);color:#354052}.videoAlarmDia .body .tip{align-items:center;display:flex;margin:0}.videoAlarmDia .body .tip .sumNum{margin-right:16px}.videoAlarmDia .body .tip .timeNum{color:#3e7eff;font-weight:600;margin-right:5px}.videoAlarmDia .body .tabs{align-items:center;display:flex;margin:10px 0 5px}.videoAlarmDia .body .tabs .themeImg{cursor:pointer;overflow:visible}.videoAlarmDia .body .tabs .endIcon{margin-left:10px}.videoAlarmDia .body .tabs .tabContainer{display:flex;overflow:hidden}.videoAlarmDia .body .tabs .tabContainer .allTab{display:flex;height:40px;left:0;position:relative}.videoAlarmDia .body .tabs .tabContainer .allTab .tab{background:#f2f3f8;border-radius:4px;cursor:pointer;font-size:14px;height:32px;line-height:32px;margin-right:10px;padding:0 10px;position:relative;text-align:center;white-space:nowrap}.videoAlarmDia .body .tabs .tabContainer .allTab .tab.active{background:#1d33a2;color:#fff}.videoAlarmDia .body .tabs .tabContainer .allTab .tab.active:after{border:10px solid transparent;border-top-color:#1d33a2;content:"";height:0;left:50%;position:absolute;top:30px;width:0}.videoAlarmDia .body .numLine{align-items:center;display:flex}.videoAlarmDia .body .numLine .cameraNum{color:#3e7eff;font-weight:600}.videoAlarmDia .body .numLine .tipImg{height:18px;margin:0 5px 0 25px;width:18px}.videoAlarmDia .body .numLine .alarmNum{color:#fa4141;font-weight:600}.videoAlarmDia .body .otherAlarm{align-items:center;display:flex}.videoAlarmDia .body .otherAlarm .ant-tag{cursor:pointer;font-size:14px}.videoAlarmDia .body .otherAlarm .tipImg{height:18px;margin-right:5px;width:18px}.videoAlarmDia .body .otherAlarm .annotation{height:12px;margin:2px;width:12px}.videoAlarmDia .body .type1{grid-template-columns:1fr;grid-template-rows:1fr}.videoAlarmDia .body .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.videoAlarmDia .body .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.videoAlarmDia .body .type8 .videoBox:first-child{grid-column:1/4;grid-row:1/4}.videoAlarmDia .body .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.videoAlarmDia .body .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.videoAlarmDia .body .type13 .videoBox:first-child{grid-column:1/3;grid-row:1/3}.videoAlarmDia .body .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}
2
+ .videoAlarmDia.dark{background:linear-gradient(90deg,#3e7eff,#1e4e75 30%,#1e4e75 70%,#3e7eff);padding:1px}.videoAlarmDia.dark .ant-modal-close{color:#fff}.videoAlarmDia.dark .ant-modal-header{background-color:#22396f;border-bottom-color:transparent;padding-left:20px}.videoAlarmDia.dark .ant-modal-header .ant-modal-title{align-items:center;background-image:linear-gradient(90deg,#2852a8 0,rgba(40,82,168,0) 50%);color:#fff;display:flex;height:42px;padding-left:10px}.videoAlarmDia.dark .ant-modal-content{background-color:#22396f}.videoAlarmDia.dark .ant-modal-content .body,.videoAlarmDia.dark .ant-modal-content .body .alarmList .alarm .name,.videoAlarmDia.dark .ant-modal-content .body .alarmList .title,.videoAlarmDia.dark .ant-modal-content .body .themeImg{color:#fff}.videoAlarmDia.dark .ant-modal-content .body .tabs .tabContainer .allTab .tab{background:#ffffff1a;color:#fff}.videoAlarmDia.dark .ant-modal-content .body .tabs .tabContainer .allTab .tab.active{background:#3e7eff;color:#fff}.videoAlarmDia .ant-modal-body{padding-top:18px}.videoAlarmDia .body{display:flex;flex-direction:column;height:660px}.videoAlarmDia .body .title{color:#000;font-size:18px}.videoAlarmDia .body .themeImg{height:18px;margin-right:5px;width:18px}.videoAlarmDia .body .current{align-self:center;display:flex;height:400px;justify-content:center;margin:10px 0 25px;width:750px}.videoAlarmDia .body .current .grid{grid-gap:3px;background-color:transparent;display:grid;height:100%;overflow:hidden;width:100%}.videoAlarmDia .body .current .grid .videoBox{background-color:#000}.videoAlarmDia .body .alarmList{display:flex;flex-wrap:wrap;justify-content:flex-start;max-height:80px;overflow:auto}.videoAlarmDia .body .alarmList .title{font-size:14px;font-weight:600;margin-bottom:10px}.videoAlarmDia .body .alarmList .alarm{align-items:center;border-radius:5px;color:#000;cursor:pointer;height:24px;margin-bottom:10px;margin-right:10px;padding:5px}.videoAlarmDia .body .alarmList .alarm img{height:16px;margin-right:5px;width:16px}.videoAlarmDia .body .alarmList .alarm .name{font-size:14px;white-space:nowrap}.videoAlarmDia .body .alarmList .alarm1{background:rgba(234,88,88,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm2{background:rgba(255,146,20,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm3{background:rgba(255,196,20,.1);color:#354052}.videoAlarmDia .body .alarmList .alarm4{background:rgba(62,126,255,.1);color:#354052}.videoAlarmDia .body .tip{align-items:center;display:flex;margin:0}.videoAlarmDia .body .tip .sumNum{margin-right:16px}.videoAlarmDia .body .tip .timeNum{color:#3e7eff;font-weight:600;margin-right:5px}.videoAlarmDia .body .tabs{align-items:center;display:flex;margin:10px 0 5px}.videoAlarmDia .body .tabs .themeImg{cursor:pointer;overflow:visible}.videoAlarmDia .body .tabs .endIcon{margin-left:10px}.videoAlarmDia .body .tabs .tabContainer{display:flex;overflow:hidden}.videoAlarmDia .body .tabs .tabContainer .allTab{display:flex;height:40px;left:0;position:relative}.videoAlarmDia .body .tabs .tabContainer .allTab .tab{background:#f2f3f8;border-radius:4px;cursor:pointer;font-size:14px;height:32px;line-height:32px;margin-right:10px;padding:0 10px;position:relative;text-align:center;white-space:nowrap}.videoAlarmDia .body .tabs .tabContainer .allTab .tab.active{background:#1d33a2;color:#fff}.videoAlarmDia .body .tabs .tabContainer .allTab .tab.active:after{border:10px solid transparent;border-top-color:#1d33a2;content:"";height:0;left:50%;position:absolute;top:30px;width:0}.videoAlarmDia .body .numLine{align-items:center;display:flex}.videoAlarmDia .body .numLine .cameraNum{color:#3e7eff;font-weight:600}.videoAlarmDia .body .numLine .tipImg{height:18px;margin:0 5px 0 25px;width:18px}.videoAlarmDia .body .numLine .alarmNum{color:#fa4141;font-weight:600}.videoAlarmDia .body .otherAlarm{align-items:center;display:flex}.videoAlarmDia .body .otherAlarm .ant-tag{cursor:pointer;font-size:14px}.videoAlarmDia .body .otherAlarm .tipImg{height:18px;margin-right:5px;width:18px}.videoAlarmDia .body .otherAlarm .annotation{height:12px;margin:2px;width:12px}.videoAlarmDia .body .type1{grid-template-columns:1fr;grid-template-rows:1fr}.videoAlarmDia .body .type4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}.videoAlarmDia .body .type8{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.videoAlarmDia .body .type8 .videoBox:first-child{grid-column:1/4;grid-row:1/4}.videoAlarmDia .body .type9{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr}.videoAlarmDia .body .type13{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}.videoAlarmDia .body .type13 .videoBox:first-child{grid-column:1/3;grid-row:1/3}.videoAlarmDia .body .type16{grid-template-columns:1fr 1fr 1fr 1fr;grid-template-rows:1fr 1fr 1fr 1fr}
3
+ .cloudVideo{height:100%}
@@ -4507,7 +4507,7 @@ class WebRtcMt {
4507
4507
  }
4508
4508
  }
4509
4509
  }
4510
- retryTime;
4510
+ // protected retryTime;
4511
4511
  // 拉流创建播放器
4512
4512
  createVideo(plays) {
4513
4513
  this.mediaServerAddrMap.set(plays.videoElm, plays);
@@ -4518,7 +4518,6 @@ class WebRtcMt {
4518
4518
  fetch(addRtspProxyUrl, {
4519
4519
  method: "GET"
4520
4520
  }).then(response => {
4521
- this.retryTime = 0;
4522
4521
  response.json().then(res => {
4523
4522
  if (res.code === 0) {
4524
4523
  this.startPlay(plays);
@@ -4530,12 +4529,9 @@ class WebRtcMt {
4530
4529
  }
4531
4530
  });
4532
4531
  }).catch(err => {
4533
- if (!this.retryTime) {
4534
- this.retryTime = 60;
4535
- setTimeout(() => {
4536
- this.rePlay();
4537
- }, 60 * 1e3);
4538
- }
4532
+ setTimeout(() => {
4533
+ this.rePlay();
4534
+ }, 3 * 60 * 1e3);
4539
4535
  });
4540
4536
  });
4541
4537
  }
@@ -4594,7 +4590,7 @@ class WebRtcMt {
4594
4590
  this.stopPlay();
4595
4591
  setTimeout(() => {
4596
4592
  this.init(this.opt);
4597
- }, 1e3);
4593
+ }, 5 * 1e3);
4598
4594
  }
4599
4595
  // 播放
4600
4596
  play(videoElm) {
@@ -4788,9 +4784,9 @@ const VideoPlayerV2 = vue.defineComponent({
4788
4784
  });
4789
4785
  vue.onBeforeUnmount(() => {
4790
4786
  stopPlay();
4791
- stopV(`videoPlayer_${uuid}`);
4792
- const videoElement = document.getElementById(uuid);
4787
+ const videoElement = document.getElementById(`videoPlayer_${uuid}`);
4793
4788
  if (videoElement) {
4789
+ videoElement.pause();
4794
4790
  videoElement.src = null;
4795
4791
  videoElement.srcObject = null;
4796
4792
  videoElement.remove();
@@ -4499,7 +4499,7 @@ class WebRtcMt {
4499
4499
  }
4500
4500
  }
4501
4501
  }
4502
- retryTime;
4502
+ // protected retryTime;
4503
4503
  // 拉流创建播放器
4504
4504
  createVideo(plays) {
4505
4505
  this.mediaServerAddrMap.set(plays.videoElm, plays);
@@ -4510,7 +4510,6 @@ class WebRtcMt {
4510
4510
  fetch(addRtspProxyUrl, {
4511
4511
  method: "GET"
4512
4512
  }).then(response => {
4513
- this.retryTime = 0;
4514
4513
  response.json().then(res => {
4515
4514
  if (res.code === 0) {
4516
4515
  this.startPlay(plays);
@@ -4522,12 +4521,9 @@ class WebRtcMt {
4522
4521
  }
4523
4522
  });
4524
4523
  }).catch(err => {
4525
- if (!this.retryTime) {
4526
- this.retryTime = 60;
4527
- setTimeout(() => {
4528
- this.rePlay();
4529
- }, 60 * 1e3);
4530
- }
4524
+ setTimeout(() => {
4525
+ this.rePlay();
4526
+ }, 3 * 60 * 1e3);
4531
4527
  });
4532
4528
  });
4533
4529
  }
@@ -4586,7 +4582,7 @@ class WebRtcMt {
4586
4582
  this.stopPlay();
4587
4583
  setTimeout(() => {
4588
4584
  this.init(this.opt);
4589
- }, 1e3);
4585
+ }, 5 * 1e3);
4590
4586
  }
4591
4587
  // 播放
4592
4588
  play(videoElm) {
@@ -4780,9 +4776,9 @@ const VideoPlayerV2 = defineComponent({
4780
4776
  });
4781
4777
  onBeforeUnmount(() => {
4782
4778
  stopPlay();
4783
- stopV(`videoPlayer_${uuid}`);
4784
- const videoElement = document.getElementById(uuid);
4779
+ const videoElement = document.getElementById(`videoPlayer_${uuid}`);
4785
4780
  if (videoElement) {
4781
+ videoElement.pause();
4786
4782
  videoElement.src = null;
4787
4783
  videoElement.srcObject = null;
4788
4784
  videoElement.remove();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inl-ui",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "工业 pc ui库",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -29,6 +29,8 @@
29
29
  "dependencies": {
30
30
  "@sszj-temp/mobile": "^0.0.104",
31
31
  "@vueuse/core": "^9.6.0",
32
+ "ezuikit-flv": "^1.0.1",
33
+ "ezuikit-js": "^8.0.2",
32
34
  "marked": "^9.1.6",
33
35
  "vite-plugin-qiankun": "^1.0.15",
34
36
  "vue": "^3.2.45"