yootd 0.2.28 → 0.2.29
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/aside/index.js +4 -1
- package/dist/aside/index.scss +0 -2
- package/dist/table/index.js +1 -1
- package/dist/video-player/index.js +229 -116
- package/package.json +2 -3
package/dist/aside/index.js
CHANGED
@@ -190,7 +190,10 @@ export var Aside = function Aside(_ref) {
|
|
190
190
|
}, titleShow && /*#__PURE__*/React.createElement("div", {
|
191
191
|
className: "".concat(mb.b('title'))
|
192
192
|
}, /*#__PURE__*/React.createElement("span", {
|
193
|
-
className: "".concat(mb.b('title').e('title-text'))
|
193
|
+
className: "".concat(mb.b('title').e('title-text')),
|
194
|
+
style: {
|
195
|
+
position: overflow ? 'sticky' : 'static'
|
196
|
+
}
|
194
197
|
}, title), customBtn != null ? customBtn : /*#__PURE__*/React.createElement("div", {
|
195
198
|
className: "".concat(mb.b('title').e('add-btn-icon')),
|
196
199
|
style: {
|
package/dist/aside/index.scss
CHANGED
package/dist/table/index.js
CHANGED
@@ -81,7 +81,7 @@ var InternalTable = function InternalTable(_ref, ref) {
|
|
81
81
|
// );
|
82
82
|
// }
|
83
83
|
return components;
|
84
|
-
}, [components
|
84
|
+
}, [components]);
|
85
85
|
var updateColumn = function updateColumn(key, column) {
|
86
86
|
setInnerColumns(function (prev) {
|
87
87
|
return prev.map(function (c) {
|
@@ -10,16 +10,15 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
10
10
|
// import * as tf from '@tensorflow/tfjs';
|
11
11
|
|
12
12
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
13
|
-
import { EndPoint } from 'yootd-webrtc-sdk';
|
14
13
|
import { useBem } from "../hooks/useBem";
|
15
14
|
import "./index.scss";
|
16
15
|
import { useQuery } from '@tanstack/react-query';
|
17
16
|
import { throttle } from 'lodash';
|
18
17
|
import { Spin } from "./..";
|
18
|
+
import { useBaseURL } from "../hooks/useBaseURL";
|
19
19
|
import { useOSS } from "../hooks/useOSS";
|
20
20
|
import { useRequest } from "../hooks/useRequest";
|
21
21
|
import controlBottomBg from "./assets/control-background.png";
|
22
|
-
import { useBaseURL } from "../hooks/useBaseURL";
|
23
22
|
var PROGRESS_BAR_HEIGHT = 63;
|
24
23
|
var MIN_SCORE = 0.5; // minimum score
|
25
24
|
var MAX_RESULTS = 20; // maximum number of results to return
|
@@ -62,6 +61,7 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
62
61
|
onCurrentTimeChange = _ref.onCurrentTimeChange,
|
63
62
|
onError = _ref.onError;
|
64
63
|
var containerRef = useRef(null);
|
64
|
+
var pcRef = useRef(null);
|
65
65
|
var videoRef = useRef(null);
|
66
66
|
var canvasRef = useRef(null);
|
67
67
|
var poseCanvasRef = useRef(null);
|
@@ -69,7 +69,6 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
69
69
|
var getAdjacentPairsRef = useRef();
|
70
70
|
var request = useRequest();
|
71
71
|
var baseURL = useBaseURL();
|
72
|
-
console.log("baseURL", baseURL);
|
73
72
|
var _useState = useState(null),
|
74
73
|
_useState2 = _slicedToArray(_useState, 2),
|
75
74
|
poseDetector = _useState2[0],
|
@@ -86,90 +85,94 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
86
85
|
setIsPlaying = _useState6[1];
|
87
86
|
var _useState7 = useState(0),
|
88
87
|
_useState8 = _slicedToArray(_useState7, 2),
|
89
|
-
|
90
|
-
|
91
|
-
var _useState9 = useState(
|
88
|
+
pcCount = _useState8[0],
|
89
|
+
setPcCount = _useState8[1];
|
90
|
+
var _useState9 = useState(0),
|
92
91
|
_useState10 = _slicedToArray(_useState9, 2),
|
93
|
-
|
94
|
-
|
95
|
-
var _useState11 = useState(
|
92
|
+
volume = _useState10[0],
|
93
|
+
setVolume = _useState10[1];
|
94
|
+
var _useState11 = useState(false),
|
96
95
|
_useState12 = _slicedToArray(_useState11, 2),
|
97
|
-
|
98
|
-
|
99
|
-
var _useState13 = useState(),
|
96
|
+
hasAudio = _useState12[0],
|
97
|
+
setHasAudio = _useState12[1];
|
98
|
+
var _useState13 = useState(0),
|
100
99
|
_useState14 = _slicedToArray(_useState13, 2),
|
101
|
-
|
102
|
-
|
103
|
-
var _useState15 = useState(
|
100
|
+
currentTime = _useState14[0],
|
101
|
+
setCurrentTime = _useState14[1];
|
102
|
+
var _useState15 = useState(),
|
104
103
|
_useState16 = _slicedToArray(_useState15, 2),
|
105
|
-
|
106
|
-
|
107
|
-
var _useState17 = useState(
|
104
|
+
duration = _useState16[0],
|
105
|
+
setDuration = _useState16[1];
|
106
|
+
var _useState17 = useState(false),
|
108
107
|
_useState18 = _slicedToArray(_useState17, 2),
|
109
|
-
|
110
|
-
|
111
|
-
var _useState19 = useState(
|
108
|
+
showSpeedPicker = _useState18[0],
|
109
|
+
setShowSpeedPicker = _useState18[1];
|
110
|
+
var _useState19 = useState('1.0'),
|
112
111
|
_useState20 = _slicedToArray(_useState19, 2),
|
113
|
-
|
114
|
-
|
112
|
+
speed = _useState20[0],
|
113
|
+
setSpeed = _useState20[1];
|
115
114
|
var _useState21 = useState(false),
|
116
115
|
_useState22 = _slicedToArray(_useState21, 2),
|
117
|
-
|
118
|
-
|
119
|
-
var _useState23 = useState(
|
116
|
+
showVolumeSlider = _useState22[0],
|
117
|
+
setShowVolumeSlider = _useState22[1];
|
118
|
+
var _useState23 = useState(false),
|
120
119
|
_useState24 = _slicedToArray(_useState23, 2),
|
121
|
-
|
122
|
-
|
123
|
-
var _useState25 = useState(
|
120
|
+
mouseDown = _useState24[0],
|
121
|
+
setMouseDown = _useState24[1];
|
122
|
+
var _useState25 = useState(0),
|
124
123
|
_useState26 = _slicedToArray(_useState25, 2),
|
125
|
-
|
126
|
-
|
124
|
+
buffered = _useState26[0],
|
125
|
+
setBuffered = _useState26[1];
|
127
126
|
var _useState27 = useState(false),
|
128
127
|
_useState28 = _slicedToArray(_useState27, 2),
|
129
|
-
|
130
|
-
|
131
|
-
var _useState29 = useState(
|
128
|
+
showSettingPanel = _useState28[0],
|
129
|
+
setShowSettingPanel = _useState28[1];
|
130
|
+
var _useState29 = useState(false),
|
131
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
132
|
+
tfInitialized = _useState30[0],
|
133
|
+
setTfInitialized = _useState30[1];
|
134
|
+
var _useState31 = useState({
|
132
135
|
emotion: false,
|
133
136
|
character: false,
|
134
137
|
anchor: false,
|
135
138
|
pose: false
|
136
139
|
}),
|
137
|
-
_useState30 = _slicedToArray(_useState29, 2),
|
138
|
-
aiFeature = _useState30[0],
|
139
|
-
setAIFeature = _useState30[1];
|
140
|
-
var _useState31 = useState(null),
|
141
140
|
_useState32 = _slicedToArray(_useState31, 2),
|
142
|
-
|
143
|
-
|
144
|
-
var _useState33 = useState(
|
141
|
+
aiFeature = _useState32[0],
|
142
|
+
setAIFeature = _useState32[1];
|
143
|
+
var _useState33 = useState(null),
|
145
144
|
_useState34 = _slicedToArray(_useState33, 2),
|
146
|
-
|
147
|
-
|
148
|
-
var _useState35 = useState(
|
149
|
-
width: 0,
|
150
|
-
height: 0
|
151
|
-
}),
|
145
|
+
options = _useState34[0],
|
146
|
+
setOptions = _useState34[1];
|
147
|
+
var _useState35 = useState(false),
|
152
148
|
_useState36 = _slicedToArray(_useState35, 2),
|
153
|
-
|
154
|
-
|
149
|
+
faceApiInitialized = _useState36[0],
|
150
|
+
setFaceApiInitialized = _useState36[1];
|
155
151
|
var _useState37 = useState({
|
156
152
|
width: 0,
|
157
153
|
height: 0
|
158
154
|
}),
|
159
155
|
_useState38 = _slicedToArray(_useState37, 2),
|
160
|
-
|
161
|
-
|
162
|
-
var _useState39 = useState(
|
156
|
+
canvasSize = _useState38[0],
|
157
|
+
setCanvasSize = _useState38[1];
|
158
|
+
var _useState39 = useState({
|
159
|
+
width: 0,
|
160
|
+
height: 0
|
161
|
+
}),
|
163
162
|
_useState40 = _slicedToArray(_useState39, 2),
|
164
|
-
|
165
|
-
|
163
|
+
videoEleSize = _useState40[0],
|
164
|
+
setVideoEleSize = _useState40[1];
|
166
165
|
var _useState41 = useState(false),
|
167
166
|
_useState42 = _slicedToArray(_useState41, 2),
|
168
|
-
|
169
|
-
|
167
|
+
isSeeking = _useState42[0],
|
168
|
+
setIsSeeking = _useState42[1];
|
169
|
+
var _useState43 = useState(false),
|
170
170
|
_useState44 = _slicedToArray(_useState43, 2),
|
171
|
-
|
172
|
-
|
171
|
+
setIsError = _useState44[1];
|
172
|
+
var _useState45 = useState(),
|
173
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
174
|
+
features = _useState46[0],
|
175
|
+
setFeatures = _useState46[1];
|
173
176
|
var _useQuery = useQuery({
|
174
177
|
queryKey: ['config'],
|
175
178
|
queryFn: function queryFn() {
|
@@ -692,65 +695,177 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
692
695
|
}
|
693
696
|
}
|
694
697
|
};
|
695
|
-
|
696
|
-
|
698
|
+
var forceBrowserGC = useCallback(function () {
|
699
|
+
// 强制浏览器 gc
|
700
|
+
console.log('尝试触发浏览器 gc');
|
701
|
+
queueMicrotask(function () {
|
702
|
+
var img = document.createElement('img');
|
703
|
+
img.src = window.URL.createObjectURL(new Blob([new ArrayBuffer(5e7)], {
|
704
|
+
type: 'image/png'
|
705
|
+
}));
|
706
|
+
img.onerror = function () {
|
707
|
+
if (img != null) {
|
708
|
+
window.URL.revokeObjectURL(img.src);
|
709
|
+
img = null;
|
710
|
+
}
|
711
|
+
};
|
712
|
+
});
|
713
|
+
}, []);
|
714
|
+
var createPeerConnection = useCallback(function () {
|
697
715
|
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
698
|
-
var
|
716
|
+
var pc, desc, response, data;
|
699
717
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
700
718
|
while (1) switch (_context2.prev = _context2.next) {
|
719
|
+
case 0:
|
720
|
+
_context2.prev = 0;
|
721
|
+
if (pcRef.current != null) {
|
722
|
+
pcRef.current.close();
|
723
|
+
pcRef.current = null;
|
724
|
+
}
|
725
|
+
pc = new RTCPeerConnection();
|
726
|
+
setPcCount(function (prev) {
|
727
|
+
return prev + 1;
|
728
|
+
});
|
729
|
+
pcRef.current = pc;
|
730
|
+
pc.onconnectionstatechange = function () {
|
731
|
+
if (pc.connectionState === 'failed') {
|
732
|
+
console.log("\u8FDE\u63A5\u5931\u8D25\uFF0C".concat(retryInterval, " \u6BEB\u79D2\u540E\u91CD\u8BD5"));
|
733
|
+
setTimeout(function () {
|
734
|
+
createPeerConnection();
|
735
|
+
}, retryInterval);
|
736
|
+
}
|
737
|
+
};
|
738
|
+
pc.ontrack = function (event) {
|
739
|
+
if (videoRef.current != null) {
|
740
|
+
videoRef.current.srcObject = event.streams[0];
|
741
|
+
}
|
742
|
+
};
|
743
|
+
if (videoEnable) {
|
744
|
+
pc.addTransceiver('video', {
|
745
|
+
direction: 'recvonly'
|
746
|
+
});
|
747
|
+
}
|
748
|
+
if (audioEnable) {
|
749
|
+
pc.addTransceiver('audio', {
|
750
|
+
direction: 'recvonly'
|
751
|
+
});
|
752
|
+
}
|
753
|
+
_context2.next = 11;
|
754
|
+
return pc.createOffer();
|
755
|
+
case 11:
|
756
|
+
desc = _context2.sent;
|
757
|
+
_context2.next = 14;
|
758
|
+
return pc.setLocalDescription(desc);
|
759
|
+
case 14:
|
760
|
+
_context2.next = 16;
|
761
|
+
return fetch(src, {
|
762
|
+
method: 'POST',
|
763
|
+
body: desc.sdp,
|
764
|
+
headers: {
|
765
|
+
'Content-Type': 'text/plain;charset=UTF-8'
|
766
|
+
}
|
767
|
+
});
|
768
|
+
case 16:
|
769
|
+
response = _context2.sent;
|
770
|
+
_context2.next = 19;
|
771
|
+
return response.json();
|
772
|
+
case 19:
|
773
|
+
data = _context2.sent;
|
774
|
+
if (!(data.code != 0)) {
|
775
|
+
_context2.next = 22;
|
776
|
+
break;
|
777
|
+
}
|
778
|
+
throw new Error('获取信令失败');
|
779
|
+
case 22:
|
780
|
+
_context2.next = 24;
|
781
|
+
return pc.setRemoteDescription({
|
782
|
+
type: 'answer',
|
783
|
+
sdp: data.sdp
|
784
|
+
});
|
785
|
+
case 24:
|
786
|
+
_context2.next = 30;
|
787
|
+
break;
|
788
|
+
case 26:
|
789
|
+
_context2.prev = 26;
|
790
|
+
_context2.t0 = _context2["catch"](0);
|
791
|
+
console.error("\u521B\u5EFA\u4FE1\u4EE4\u5931\u8D25 ".concat(_context2.t0, " ").concat(retryInterval, " \u6BEB\u79D2\u540E\u91CD\u8BD5"));
|
792
|
+
setTimeout(function () {
|
793
|
+
createPeerConnection();
|
794
|
+
}, retryInterval);
|
795
|
+
case 30:
|
796
|
+
case "end":
|
797
|
+
return _context2.stop();
|
798
|
+
}
|
799
|
+
}, _callee2, null, [[0, 26]]);
|
800
|
+
}))();
|
801
|
+
}, [src, videoEnable, audioEnable, retryInterval]);
|
802
|
+
useEffect(function () {
|
803
|
+
if (pcCount > 0 && pcCount % 20 === 0) {
|
804
|
+
forceBrowserGC();
|
805
|
+
setTimeout(function () {
|
806
|
+
setPcCount(1);
|
807
|
+
}, 0);
|
808
|
+
}
|
809
|
+
}, [pcCount, forceBrowserGC]);
|
810
|
+
useEffect(function () {
|
811
|
+
var loaded = true;
|
812
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
813
|
+
var tf, faceapi, posedetection, detectorConfig, _poseDetector;
|
814
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
815
|
+
while (1) switch (_context3.prev = _context3.next) {
|
701
816
|
case 0:
|
702
817
|
if (loaded) {
|
703
|
-
|
818
|
+
_context3.next = 2;
|
704
819
|
break;
|
705
820
|
}
|
706
|
-
return
|
821
|
+
return _context3.abrupt("return");
|
707
822
|
case 2:
|
708
|
-
|
823
|
+
_context3.prev = 2;
|
709
824
|
if (!((aiFeature.anchor || aiFeature.emotion || aiFeature.character || aiFeature.pose) && !tfInitialized)) {
|
710
|
-
|
825
|
+
_context3.next = 12;
|
711
826
|
break;
|
712
827
|
}
|
713
|
-
|
828
|
+
_context3.next = 6;
|
714
829
|
return import('@tensorflow/tfjs');
|
715
830
|
case 6:
|
716
|
-
tf =
|
717
|
-
|
831
|
+
tf = _context3.sent;
|
832
|
+
_context3.next = 9;
|
718
833
|
return tf.ready();
|
719
834
|
case 9:
|
720
|
-
|
835
|
+
_context3.next = 11;
|
721
836
|
return tf.setBackend('webgl');
|
722
837
|
case 11:
|
723
838
|
setTfInitialized(true);
|
724
839
|
case 12:
|
725
|
-
|
840
|
+
_context3.next = 17;
|
726
841
|
break;
|
727
842
|
case 14:
|
728
|
-
|
729
|
-
|
730
|
-
console.error('tensorflow 加载失败: ',
|
843
|
+
_context3.prev = 14;
|
844
|
+
_context3.t0 = _context3["catch"](2);
|
845
|
+
console.error('tensorflow 加载失败: ', _context3.t0);
|
731
846
|
case 17:
|
732
|
-
|
847
|
+
_context3.prev = 17;
|
733
848
|
if (!((aiFeature.anchor || aiFeature.emotion || aiFeature.character) && !faceApiInitialized)) {
|
734
|
-
|
849
|
+
_context3.next = 35;
|
735
850
|
break;
|
736
851
|
}
|
737
|
-
|
852
|
+
_context3.next = 21;
|
738
853
|
return import('@vladmandic/face-api');
|
739
854
|
case 21:
|
740
|
-
faceapi =
|
741
|
-
|
855
|
+
faceapi = _context3.sent;
|
856
|
+
_context3.next = 24;
|
742
857
|
return faceapi.nets.ssdMobilenetv1.load("".concat(OSS, "/model-zoo/face-api-models/model"));
|
743
858
|
case 24:
|
744
|
-
|
859
|
+
_context3.next = 26;
|
745
860
|
return faceapi.nets.ageGenderNet.load("".concat(OSS, "/face-api-models/model"));
|
746
861
|
case 26:
|
747
|
-
|
862
|
+
_context3.next = 28;
|
748
863
|
return faceapi.nets.faceLandmark68Net.load("".concat(OSS, "/model-zoo/face-api-models/model"));
|
749
864
|
case 28:
|
750
|
-
|
865
|
+
_context3.next = 30;
|
751
866
|
return faceapi.nets.faceRecognitionNet.load("".concat(OSS, "/model-zoo/face-api-models/model"));
|
752
867
|
case 30:
|
753
|
-
|
868
|
+
_context3.next = 32;
|
754
869
|
return faceapi.nets.faceExpressionNet.load("".concat(OSS, "/model-zoo/face-api-models/model"));
|
755
870
|
case 32:
|
756
871
|
setOptions(new faceapi.SsdMobilenetv1Options({
|
@@ -760,22 +875,22 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
760
875
|
detectAllFacesRef.current = faceapi.detectAllFaces;
|
761
876
|
setFaceApiInitialized(true);
|
762
877
|
case 35:
|
763
|
-
|
878
|
+
_context3.next = 40;
|
764
879
|
break;
|
765
880
|
case 37:
|
766
|
-
|
767
|
-
|
768
|
-
console.error('faceapi 加载失败: ',
|
881
|
+
_context3.prev = 37;
|
882
|
+
_context3.t1 = _context3["catch"](17);
|
883
|
+
console.error('faceapi 加载失败: ', _context3.t1);
|
769
884
|
case 40:
|
770
|
-
|
885
|
+
_context3.prev = 40;
|
771
886
|
if (!(aiFeature.pose && poseDetector == null)) {
|
772
|
-
|
887
|
+
_context3.next = 51;
|
773
888
|
break;
|
774
889
|
}
|
775
|
-
|
890
|
+
_context3.next = 44;
|
776
891
|
return import('@tensorflow-models/pose-detection');
|
777
892
|
case 44:
|
778
|
-
posedetection =
|
893
|
+
posedetection = _context3.sent;
|
779
894
|
detectorConfig = {
|
780
895
|
modelType: posedetection.movenet.modelType.MULTIPOSE_LIGHTNING,
|
781
896
|
enableTracking: true,
|
@@ -783,48 +898,49 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
783
898
|
scoreThreshold: 0.3,
|
784
899
|
modelUrl: "".concat(OSS, "/model-zoo/pose-detection-models/model.json")
|
785
900
|
};
|
786
|
-
|
901
|
+
_context3.next = 48;
|
787
902
|
return posedetection.createDetector(posedetection.SupportedModels.MoveNet, detectorConfig);
|
788
903
|
case 48:
|
789
|
-
_poseDetector =
|
904
|
+
_poseDetector = _context3.sent;
|
790
905
|
getAdjacentPairsRef.current = posedetection.util.getAdjacentPairs;
|
791
906
|
setPoseDetector(_poseDetector);
|
792
907
|
case 51:
|
793
|
-
|
908
|
+
_context3.next = 56;
|
794
909
|
break;
|
795
910
|
case 53:
|
796
|
-
|
797
|
-
|
798
|
-
console.error('pose detection 加载失败: ',
|
911
|
+
_context3.prev = 53;
|
912
|
+
_context3.t2 = _context3["catch"](40);
|
913
|
+
console.error('pose detection 加载失败: ', _context3.t2);
|
799
914
|
case 56:
|
800
915
|
case "end":
|
801
|
-
return
|
916
|
+
return _context3.stop();
|
802
917
|
}
|
803
|
-
},
|
918
|
+
}, _callee3, null, [[2, 14], [17, 37], [40, 53]]);
|
804
919
|
}))();
|
805
920
|
return function () {
|
806
921
|
loaded = false;
|
807
922
|
};
|
808
923
|
}, [aiFeature, faceApiInitialized, poseDetector, tfInitialized]);
|
809
924
|
useEffect(function () {
|
810
|
-
var player = null;
|
811
925
|
if (isLive && videoRef.current != null) {
|
812
|
-
|
813
|
-
element: videoRef.current,
|
814
|
-
zlmsdpUrl: src,
|
815
|
-
recvOnly: true,
|
816
|
-
audioEnable: audioEnable,
|
817
|
-
videoEnable: videoEnable,
|
818
|
-
autoReconnect: retry,
|
819
|
-
reconnectInterval: retryInterval
|
820
|
-
});
|
926
|
+
createPeerConnection();
|
821
927
|
}
|
822
928
|
return function () {
|
823
|
-
|
824
|
-
|
825
|
-
|
929
|
+
try {
|
930
|
+
if (pcRef.current != null) {
|
931
|
+
pcRef.current.close();
|
932
|
+
pcRef.current = null;
|
933
|
+
}
|
934
|
+
if (videoRef.current != null && videoRef.current.srcObject != null) {
|
935
|
+
var tracks = videoRef.current.srcObject.getTracks();
|
936
|
+
tracks.forEach(function (track) {
|
937
|
+
track.stop();
|
938
|
+
});
|
939
|
+
videoRef.current.srcObject = null;
|
940
|
+
}
|
941
|
+
} catch (e) {}
|
826
942
|
};
|
827
|
-
}, [isLive,
|
943
|
+
}, [isLive, createPeerConnection]);
|
828
944
|
useEffect(function () {
|
829
945
|
if (!isLive && videoRef.current != null) {
|
830
946
|
videoRef.current.src = src;
|
@@ -1127,7 +1243,6 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1127
1243
|
onClick: handleDownload
|
1128
1244
|
}, /*#__PURE__*/React.createElement("path", {
|
1129
1245
|
d: "M503.30070282 717.74528263c4.41869063 5.66144737 12.97990373 5.66144737 17.39859436 0l154.65417219-195.66514461c5.66144737-7.18037229 0.55233633-17.81284661-8.69929719-17.81284662h-102.32030498V36.99075687c0-6.07569962-4.97102697-11.04672658-11.0467266-11.04672659h-82.85044937c-6.07569962 0-11.04672658 4.97102697-11.04672659 11.04672659v467.13845044H357.34582782c-9.25163351 0-14.36074457 10.63247434-8.69929719 17.81284661l154.65417219 195.80322871z",
|
1130
|
-
"p-id": "937",
|
1131
1246
|
fill: "#ffffff"
|
1132
1247
|
}), /*#__PURE__*/React.createElement("path", {
|
1133
1248
|
d: "M1017.38774124 669.41585383h-82.85044939c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672659v212.64948675H100.50943473V680.46258042c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659h-82.85044939c-6.07569962 0-11.04672658 4.97102697-11.04672658 11.04672659v273.40648295c0 24.44088257 19.74602377 44.18690634 44.18690634 44.18690635h944.49512296c24.44088257 0 44.18690634-19.74602377 44.18690634-44.18690635V680.46258042c0-6.07569962-4.97102697-11.04672658-11.04672658-11.04672659z",
|
@@ -1138,14 +1253,12 @@ export var VideoPlayer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
1138
1253
|
viewBox: "0 0 1024 1024",
|
1139
1254
|
version: "1.1",
|
1140
1255
|
xmlns: "http://www.w3.org/2000/svg",
|
1141
|
-
"p-id": "1224",
|
1142
1256
|
width: "200",
|
1143
1257
|
height: "200",
|
1144
1258
|
onClick: handleShowSettingPanel
|
1145
1259
|
}, /*#__PURE__*/React.createElement("path", {
|
1146
1260
|
d: "M390.10687737 2.54788165a26.81326939 26.81326939 0 0 0-26.81326938 26.8132694v113.90276834a401.77002848 401.77002848 0 0 0-77.91936085 45.07310584l-98.72645789-56.97819742a26.81326939 26.81326939 0 0 0-36.62692596 9.81365657l-134.06634694 232.20291288a26.81326939 26.81326939 0 0 0 9.81365661 36.62692599l98.69964459 56.97819744a406.59641697 406.59641697 0 0 0 0 90.03895862l-98.67283133 56.97819744a26.81326939 26.81326939 0 0 0-11.26157315 33.8115327l1.42110328 2.81539329 134.06634694 232.20291288a26.81326939 26.81326939 0 0 0 36.62692596 9.81365657l98.72645789-56.97819742a401.77002848 401.77002848 0 0 0 77.91936085 45.04629256V994.63884895a26.81326939 26.81326939 0 0 0 26.81326938 26.8132694h268.13269386a26.81326939 26.81326939 0 0 0 26.8132694-26.8132694v-113.90276834a401.77002848 401.77002848 0 0 0 77.94617409-45.07310584l98.7264579 56.97819742a26.81326939 26.81326939 0 0 0 36.62692596-9.81365657l134.06634692-232.20291288a26.81326939 26.81326939 0 0 0-7.18595618-34.91087677l-2.62770039-1.71604922-98.69964462-56.97819744a406.59641697 406.59641697 0 0 0 0-90.03895862l98.67283135-56.97819744a26.81326939 26.81326939 0 0 0 11.26157314-33.8115327l-1.4211033-2.81539329-134.06634692-232.20291288a26.81326939 26.81326939 0 0 0-36.62692596-9.81365657l-98.7264579 56.97819742a401.77002848 401.77002848 0 0 0-77.91936083-45.04629256V29.36115105a26.81326939 26.81326939 0 0 0-26.81326938-26.8132694h-268.13269386z m53.62653877 80.43980816h160.87961632v112.91067741l48.26388489 21.07522973c22.04050743 9.65277699 42.95485757 21.74556148 62.31403805 36.06384731l42.36496565 31.31789864 97.94887306-56.52237184 80.43980815 139.32174771-97.8148067 56.44193207 5.81847944 52.2858753a326.15660881 326.15660881 0 0 1 0 72.23494772l-5.81847944 52.2858753 97.8148067 56.44193207-80.43980815 139.32174771-97.92205978-56.52237184-42.39177893 31.31789864c-19.35918049 14.31828585-40.2735306 26.41107036-62.31403805 36.06384731l-48.26388489 21.07522973V941.01231019h-160.87961632v-112.91067741l-48.23707162-21.07522973c-22.04050743-9.65277699-42.95485757-21.74556148-62.31403806-36.06384731l-42.36496563-31.31789864-97.94887308 56.52237184-80.43980813-139.32174771 97.81480672-56.44193207-5.81847947-52.2858753a326.15660881 326.15660881 0 0 1 0-72.23494772l5.81847947-52.2858753-97.81480672-56.44193207 80.43980813-139.32174771 97.92205981 56.52237184 42.3917789-31.31789864a321.33022032 321.33022032 0 0 1 62.31403806-36.06384731l48.2638849-21.07522973V82.98768981z m79.23321104 241.31942448a187.69288571 187.69288571 0 1 0 0 375.38577142 187.69288571 187.69288571 0 0 0 0-375.38577142z m0 80.43980816a107.25307755 107.25307755 0 1 1 0 214.5061551 107.25307755 107.25307755 0 0 1 0-214.5061551z",
|
1147
|
-
fill: "#ffffff"
|
1148
|
-
"p-id": "1225"
|
1261
|
+
fill: "#ffffff"
|
1149
1262
|
})), showSettingPanel ? /*#__PURE__*/React.createElement("div", {
|
1150
1263
|
className: "".concat(bem.b('container').e('controls-setting').e('panel')),
|
1151
1264
|
onClick: function onClick(e) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "yootd",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.29",
|
4
4
|
"description": "基于 Antd 二次开发的组件库",
|
5
5
|
"license": "MIT",
|
6
6
|
"module": "dist/index.js",
|
@@ -82,8 +82,7 @@
|
|
82
82
|
"dayjs": ">=1.11.13",
|
83
83
|
"lodash": ">=4.17.21",
|
84
84
|
"react": ">=18.0.0",
|
85
|
-
"react-dom": ">=18.0.0"
|
86
|
-
"yootd-webrtc-sdk": ">=1.0.1"
|
85
|
+
"react-dom": ">=18.0.0"
|
87
86
|
},
|
88
87
|
"publishConfig": {
|
89
88
|
"access": "public"
|