pixuireactcomponents 1.3.84 → 1.3.85

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixuireactcomponents",
3
- "version": "1.3.84",
3
+ "version": "1.3.85",
4
4
  "description": "pixui react components",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
18
18
  }
19
19
  return to.concat(ar || Array.prototype.slice.call(from));
20
20
  };
21
- import { createRef, h } from 'preact';
21
+ import { h } from 'preact';
22
22
  import { useEffect, useRef, useState } from 'preact/hooks';
23
23
  import { Slider } from '../slider/Slider';
24
24
  var videoWrapperStyle = {
@@ -59,13 +59,13 @@ var videoLog = function () {
59
59
  }
60
60
  };
61
61
  export var VideoPlayer = function (props) {
62
- var playUrl = props.playUrl, _a = props.autoPlay, autoPlay = _a === void 0 ? true : _a, playEvent = props.playEvent, elementClass = props.elementClass, _b = props.durations, durations = _b === void 0 ? { hideSliderDuration: 3000 } : _b, sliderBG = props.sliderBG, videoDuration = props.videoDuration, _c = props.isStreaming, isStreaming = _c === void 0 ? false : _c;
63
- var refVideo = createRef();
62
+ var playUrl = props.playUrl, _a = props.autoPlay, autoPlay = _a === void 0 ? true : _a, playEvent = props.playEvent, elementClass = props.elementClass, _b = props.durations, durations = _b === void 0 ? { hideSliderDuration: 3000 } : _b, sliderBG = props.sliderBG, videoDuration = props.videoDuration, isStreaming = props.isStreaming;
63
+ var refVideo = useRef(null);
64
64
  // const hideSliderDuration = 1000;
65
- var _d = useState(VideoStatus.Loading), videoStatus = _d[0], setVideoStatus = _d[1];
66
- var _e = useState(0), currentTime = _e[0], setCurrentTime = _e[1];
67
- var _f = useState(0), totalTime = _f[0], setTotalTime = _f[1];
68
- var _g = useState(false), showSlider = _g[0], setShowSlider = _g[1];
65
+ var _c = useState(VideoStatus.Loading), videoStatus = _c[0], setVideoStatus = _c[1];
66
+ var _d = useState(0), currentTime = _d[0], setCurrentTime = _d[1];
67
+ var _e = useState(0), totalTime = _e[0], setTotalTime = _e[1];
68
+ var _f = useState(false), showSlider = _f[0], setShowSlider = _f[1];
69
69
  var sliderTimmer = useRef(null);
70
70
  var updatePlayTime = function () {
71
71
  // videoLog('updatePlayTime----------------');
@@ -71,7 +71,7 @@ export var assetCache;
71
71
  return __generator(this, function (_a) {
72
72
  console.log('cacheAsset---', url);
73
73
  return [2 /*return*/, new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
74
- var lib, localPath, xhr;
74
+ var urlWithoutParams, lib, localPath, xhr;
75
75
  var _this = this;
76
76
  return __generator(this, function (_a) {
77
77
  switch (_a.label) {
@@ -80,8 +80,9 @@ export var assetCache;
80
80
  console.log('非jssdk环境');
81
81
  reject(url);
82
82
  }
83
+ urlWithoutParams = url.split('?')[0];
83
84
  lib = LibMgr.getInstance().getMainLib();
84
- return [4 /*yield*/, getLocalPath(url)];
85
+ return [4 /*yield*/, getLocalPath(urlWithoutParams)];
85
86
  case 1:
86
87
  localPath = _a.sent();
87
88
  if (!force) {