@supermapgis/vue-iclient-leaflet 11.2.0 → 11.2.1

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.
@@ -6,7 +6,6 @@
6
6
  :options="playerOptions"
7
7
  :playsinline="true"
8
8
  :data-autoplay="autoplay"
9
- :data-isLive="isRtmp"
10
9
  :data-popupplay="`${options.popupToPlay}`"
11
10
  :events = "['fullscreenchange']"
12
11
  @play="onPlayerPlay($event)"
@@ -30,7 +29,6 @@
30
29
  :options="modalPlayerOptions"
31
30
  :playsinline="true"
32
31
  :data-autoplay="autoplay"
33
- :data-isLive="isRtmp"
34
32
  :data-popupplay="`${options.popupToPlay}`"
35
33
  @play="onModalPlayerPlay($event)"
36
34
  @loadeddata="onModalPlayerLoadeddata($event)"
@@ -49,7 +47,6 @@ import flvjs from 'flv.js';
49
47
  import 'videojs-flvjs-es6';
50
48
  import 'videojs-flash';
51
49
  import { videoPlayer } from 'vue-videojs7';
52
- import clonedeep from 'lodash.clonedeep';
53
50
  import SmModal from 'vue-iclient/src/common/modal/main';
54
51
  import Message from 'vue-iclient/src/common/message/index.js';
55
52
 
@@ -98,8 +95,6 @@ class SmVideoPlayer extends Vue {
98
95
 
99
96
  @Prop({ default: 'https://vjs.zencdn.net/swf/5.4.2/video-js.swf' }) swf: string;
100
97
 
101
- @Prop({ default: 3000 }) replayTime: number; // 黑屏重新播放rtmp
102
-
103
98
  @Prop({ default: false }) isFullscreen: Boolean;
104
99
 
105
100
  @Prop({ default: 'origin' }) ratio: String;
@@ -118,10 +113,6 @@ class SmVideoPlayer extends Vue {
118
113
  poster?:string; // 封面
119
114
  };
120
115
 
121
- get isRtmp() {
122
- return this.checkUrl(this.url) && this.url.includes('rtmp://');
123
- }
124
-
125
116
  get isFlv() {
126
117
  if (!flvjs && this.checkUrl(this.url) && this.url.includes('.flv')) {
127
118
  console.error(this.$t('warning.flvPlayer'));
@@ -158,7 +149,6 @@ class SmVideoPlayer extends Vue {
158
149
  @Watch('url')
159
150
  urlChanged() {
160
151
  this.handlePlayerOptions();
161
- this.replayRtmp();
162
152
  }
163
153
 
164
154
  @Watch('playerOptions')
@@ -197,9 +187,6 @@ class SmVideoPlayer extends Vue {
197
187
  this.smPlayer = this.$refs.videoPlayer && this.$refs.videoPlayer.player;
198
188
  // @ts-ignore
199
189
  this.modalVideoPlayer = this.$refs.modalVideoPlayer && this.$refs.modalVideoPlayer.player;
200
- setTimeout(() => {
201
- this.replayRtmp();
202
- });
203
190
  const player = this.modalVisible ? this.modalVideoPlayer : this.smPlayer;
204
191
  if (player) {
205
192
  player.muted(this.options.muted);
@@ -211,24 +198,6 @@ class SmVideoPlayer extends Vue {
211
198
  });
212
199
  }
213
200
 
214
- replayRtmp(player = this.player) {
215
- if (this.isRtmp && player && player.el_) {
216
- player.one('play', () => {
217
- // @ts-ignore
218
- this.timer = setTimeout(() => {
219
- // @ts-ignore
220
- clearTimeout(this.timer);
221
- player.reset();
222
- player.src(clonedeep(this.playerOptions.sources));
223
- }, this.replayTime);
224
- });
225
- player.one('canplay', () => {
226
- // @ts-ignore
227
- clearTimeout(this.timer);
228
- });
229
- }
230
- }
231
-
232
201
  clearSrc() {
233
202
  if (this.playerOptions.sources) {
234
203
  this.playerOptions.sources[0].src = '';
@@ -289,7 +258,7 @@ class SmVideoPlayer extends Vue {
289
258
  },
290
259
  notSupportedMessage: this.$t('warning.unavailableVideo')
291
260
  };
292
- if (!this.url.includes('rtmp') && this.url.includes('.flv')) {
261
+ if (this.url.includes('.flv')) {
293
262
  commonOptions.techOrder = ['html5', 'flvjs'];
294
263
  // @ts-ignore
295
264
  commonOptions.sources[0].type = 'video/x-flv';
@@ -298,16 +267,11 @@ class SmVideoPlayer extends Vue {
298
267
  // @ts-ignore
299
268
  commonOptions.sources[0].type = 'video/mp4';
300
269
  }
301
- if (this.url.includes('rtmp')) {
302
- // @ts-ignore
303
- commonOptions.techOrder = ['flash', 'html5'];
304
- commonOptions.sources[0].type = 'rtmp/flv';
305
- }
306
270
  if (this.url.includes('.m3u8')) {
307
271
  // @ts-ignore
308
272
  commonOptions.sources[0].type = 'application/x-mpegURL';
309
273
  }
310
- this.playerOptions = Object.assign({}, commonOptions, { autoplay: this.isRtmp || options.autoplay });
274
+ this.playerOptions = Object.assign({}, commonOptions, { autoplay: options.autoplay });
311
275
  this.modalPlayerOptions = Object.assign({}, commonOptions, { autoplay: true, preload: 'none', height: '600' });
312
276
  return commonOptions;
313
277
  }
@@ -388,8 +352,7 @@ class SmVideoPlayer extends Vue {
388
352
  url.indexOf('mp4') < 0 &&
389
353
  url.indexOf('webm') < 0 &&
390
354
  url.indexOf('m3u8') < 0 &&
391
- url.indexOf('flv') < 0 &&
392
- url.indexOf('rtmp') < 0)
355
+ url.indexOf('flv') < 0)
393
356
  ) {
394
357
  match = false;
395
358
  } else {
@@ -402,7 +365,7 @@ class SmVideoPlayer extends Vue {
402
365
  if (!str) return false;
403
366
  const isFilePath = this.isMatchFileUrl(str);
404
367
  if(isFilePath) return true;
405
- const reg = new RegExp('(https?|http|file|ftp|rtmp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
368
+ const reg = new RegExp('(https?|http|file|ftp)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]');
406
369
  return reg.test(str);
407
370
  }
408
371
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@supermapgis/vue-iclient-leaflet",
3
3
  "description": "SuperMap iClient for Vue.js",
4
- "version": "11.2.0",
4
+ "version": "11.2.1",
5
5
  "homepage": "http://iclient.supermap.io",
6
6
  "main": "lib/index",
7
7
  "dependencies": {
@@ -18,7 +18,7 @@
18
18
  "@types/leaflet": "^1.5.5",
19
19
  "@types/node": "^12.0.3",
20
20
  "ant-design-vue": "1.7.2",
21
- "axios": "^1.6.2",
21
+ "axios": "^1.7.4",
22
22
  "canvg": "~3.0.10",
23
23
  "clipboard": "^2.0.6",
24
24
  "colorcolor": "^1.1.1",