zy-react-library 1.0.131 → 1.0.132
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.
|
@@ -34,11 +34,8 @@ const MapSelector = (props) => {
|
|
|
34
34
|
|
|
35
35
|
// 初始化地图
|
|
36
36
|
const initMap = async () => {
|
|
37
|
-
await dynamicLoadJs("https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr");
|
|
38
|
-
|
|
39
37
|
if (!window.BMapGL) {
|
|
40
|
-
|
|
41
|
-
return;
|
|
38
|
+
await dynamicLoadJs("https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr");
|
|
42
39
|
}
|
|
43
40
|
|
|
44
41
|
setLoading(true);
|
|
@@ -44,8 +44,11 @@ const AliPlayer = forwardRef(({
|
|
|
44
44
|
const onCreateAliPlayer = async () => {
|
|
45
45
|
if (!containerRef.current)
|
|
46
46
|
return;
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
if (!window.Aliplayer) {
|
|
48
|
+
await dynamicLoadJs("https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/aliplayer-min.js");
|
|
49
|
+
await dynamicLoadCss("https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/skins/default/aliplayer-min.css");
|
|
50
|
+
}
|
|
51
|
+
|
|
49
52
|
onDisposeAliPlayer();
|
|
50
53
|
|
|
51
54
|
const skinLayout = [
|
|
@@ -79,51 +82,49 @@ const AliPlayer = forwardRef(({
|
|
|
79
82
|
});
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
player.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
);
|
|
126
|
-
}
|
|
85
|
+
playerRef.current = new window.Aliplayer(
|
|
86
|
+
{
|
|
87
|
+
id: className,
|
|
88
|
+
...(source
|
|
89
|
+
? { source }
|
|
90
|
+
: {
|
|
91
|
+
vid,
|
|
92
|
+
playauth: playAuth,
|
|
93
|
+
qualitySort: "asc",
|
|
94
|
+
format: "m3u8",
|
|
95
|
+
encryptType: 1,
|
|
96
|
+
mediaType: "video",
|
|
97
|
+
isLive: true,
|
|
98
|
+
rePlay: false,
|
|
99
|
+
playsinline: true,
|
|
100
|
+
controlBarVisibility: "hover",
|
|
101
|
+
}),
|
|
102
|
+
cover,
|
|
103
|
+
width,
|
|
104
|
+
height,
|
|
105
|
+
autoplay,
|
|
106
|
+
isLive,
|
|
107
|
+
useH5Prism: true,
|
|
108
|
+
skinLayout,
|
|
109
|
+
},
|
|
110
|
+
(player) => {
|
|
111
|
+
if (autoplay) {
|
|
112
|
+
player.play();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
player.on("ended", () => {
|
|
116
|
+
onEnded && onEnded();
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
player.on("timeupdate", () => {
|
|
120
|
+
onTimeupdate && onTimeupdate(player.getCurrentTime());
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
if (playTime > 0) {
|
|
124
|
+
player.seek(playTime);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
);
|
|
127
128
|
};
|
|
128
129
|
|
|
129
130
|
useEffect(() => {
|