l-min-components 1.0.431 → 1.0.437
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 +2 -2
- package/src/components/AppMainLayout/index.jsx +9 -7
- package/src/components/index.js +1 -0
- package/src/components/streamVideoPlayer/icons/pause.jsx +24 -0
- package/src/components/streamVideoPlayer/icons/playVideoIcon.jsx +19 -0
- package/src/components/streamVideoPlayer/icons/videoScreenIcon.jsx +48 -0
- package/src/components/streamVideoPlayer/index.jsx +212 -0
- package/src/components/streamVideoPlayer/index.styled.jsx +161 -0
- package/src/components/streamVideoPlayer/loader/index.jsx +34 -0
- package/src/components/videoPlayer/index.styled.jsx +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "l-min-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.437",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/assets",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"classnames": "^2.3.2",
|
|
20
20
|
"emoji-picker-react": "^4.4.10",
|
|
21
21
|
"js-cookie": "^3.0.5",
|
|
22
|
-
"l-min-components": "
|
|
22
|
+
"l-min-components": "1.0.435",
|
|
23
23
|
"moment": "^2.29.4",
|
|
24
24
|
"prop-types": "^15.8.1",
|
|
25
25
|
"rc-progress": "^3.5.1",
|
|
@@ -169,15 +169,17 @@ const AppMainLayout = () => {
|
|
|
169
169
|
) : window.location.pathname.includes("personal/dashboard") ? (
|
|
170
170
|
<PersonalRightBar />
|
|
171
171
|
) : window.location.pathname.includes("personal/addons") ? (
|
|
172
|
-
<InstructorRightBar personal />
|
|
173
|
-
)
|
|
174
|
-
<InstructorRightBar personal />
|
|
175
|
-
)
|
|
176
|
-
|
|
172
|
+
<InstructorRightBar personal />
|
|
173
|
+
) : window.location.pathname.includes("personal/courses") ? (
|
|
174
|
+
<InstructorRightBar personal />
|
|
175
|
+
) : window.location.pathname.includes(
|
|
176
|
+
"personal/library/selectlanguage",
|
|
177
|
+
) ? (
|
|
178
|
+
<InstructorRightBar personal />
|
|
177
179
|
) : window.location.pathname.includes("personal/library") ? (
|
|
178
|
-
<PersonalRightBar personalLibrary
|
|
180
|
+
<PersonalRightBar personalLibrary />
|
|
179
181
|
) : window.location.pathname.includes("personal/reports") ? (
|
|
180
|
-
<PersonalRightBar personalReport />
|
|
182
|
+
<PersonalRightBar personalReport />
|
|
181
183
|
) : window.location.pathname.includes("instructor") &&
|
|
182
184
|
!window.location.pathname.includes("manage-teams") &&
|
|
183
185
|
!window.location.pathname.includes("file-manager") ? (
|
package/src/components/index.js
CHANGED
|
@@ -35,3 +35,4 @@ export { default as InstructorAccountSwitcher } from "./instructorAccountSwitche
|
|
|
35
35
|
export { default as InstructorRightBar } from "./fileRightBar/instructorRightBar";
|
|
36
36
|
export { default as VideoPlayer } from "./videoPlayer";
|
|
37
37
|
export { default as EnterpriseRightBar } from "./fileRightBar/enterpriseRightBar";
|
|
38
|
+
export { StreamVideoPlayer } from "./streamVideoPlayer";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const PauseIcon = ({ fill, onClick }) => {
|
|
3
|
+
return (
|
|
4
|
+
<svg
|
|
5
|
+
onClick={onClick}
|
|
6
|
+
width="800px"
|
|
7
|
+
height="800px"
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
d="M2 6C2 4.11438 2 3.17157 2.58579 2.58579C3.17157 2 4.11438 2 6 2C7.88562 2 8.82843 2 9.41421 2.58579C10 3.17157 10 4.11438 10 6V18C10 19.8856 10 20.8284 9.41421 21.4142C8.82843 22 7.88562 22 6 22C4.11438 22 3.17157 22 2.58579 21.4142C2 20.8284 2 19.8856 2 18V6Z"
|
|
14
|
+
fill={fill || "#1C274C"}
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
d="M14 6C14 4.11438 14 3.17157 14.5858 2.58579C15.1716 2 16.1144 2 18 2C19.8856 2 20.8284 2 21.4142 2.58579C22 3.17157 22 4.11438 22 6V18C22 19.8856 22 20.8284 21.4142 21.4142C20.8284 22 19.8856 22 18 22C16.1144 22 15.1716 22 14.5858 21.4142C14 20.8284 14 19.8856 14 18V6Z"
|
|
18
|
+
fill={fill || "#1C274C"}
|
|
19
|
+
/>
|
|
20
|
+
</svg>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default PauseIcon;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const PlayVideoIcon = () => {
|
|
3
|
+
return (
|
|
4
|
+
<svg
|
|
5
|
+
width="23"
|
|
6
|
+
height="23"
|
|
7
|
+
viewBox="0 0 23 23"
|
|
8
|
+
fill="none"
|
|
9
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
+
>
|
|
11
|
+
<path
|
|
12
|
+
d="M0.632812 11.2832V6.72359C0.632812 1.06246 4.86949 -1.25578 10.0537 1.57478L14.2362 3.8546L18.4187 6.13442C23.6029 8.96499 23.6029 13.6015 18.4187 16.432L14.2362 18.7119L10.0537 20.9917C4.86949 23.8223 0.632812 21.504 0.632812 15.8429V11.2832Z"
|
|
13
|
+
fill="white"
|
|
14
|
+
/>
|
|
15
|
+
</svg>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default PlayVideoIcon;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
const VideoScreenIcon = ({ onClick }) => {
|
|
3
|
+
return (
|
|
4
|
+
<svg
|
|
5
|
+
onClick={onClick}
|
|
6
|
+
width="17"
|
|
7
|
+
height="16"
|
|
8
|
+
viewBox="0 0 17 16"
|
|
9
|
+
fill="none"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
d="M10.4297 1.82031H11.7593C13.7538 1.82031 15.0834 3.07845 15.0834 4.96567V6.22381"
|
|
14
|
+
stroke="#7C8080"
|
|
15
|
+
strokeWidth="1.5"
|
|
16
|
+
strokeMiterlimit="10"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M1.78711 6.22381V4.96567C1.78711 3.07845 3.11674 1.82031 5.11117 1.82031H6.4408"
|
|
22
|
+
stroke="#7C8080"
|
|
23
|
+
strokeWidth="1.5"
|
|
24
|
+
strokeMiterlimit="10"
|
|
25
|
+
strokeLinecap="round"
|
|
26
|
+
strokeLinejoin="round"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
d="M10.4297 14.4035H11.7593C13.7538 14.4035 15.0834 13.1454 15.0834 11.2581V10"
|
|
30
|
+
stroke="#7C8080"
|
|
31
|
+
strokeWidth="1.5"
|
|
32
|
+
strokeMiterlimit="10"
|
|
33
|
+
strokeLinecap="round"
|
|
34
|
+
strokeLinejoin="round"
|
|
35
|
+
/>
|
|
36
|
+
<path
|
|
37
|
+
d="M1.78711 10V11.2581C1.78711 13.1454 3.11674 14.4035 5.11117 14.4035H6.4408"
|
|
38
|
+
stroke="#7C8080"
|
|
39
|
+
strokeWidth="1.5"
|
|
40
|
+
strokeMiterlimit="10"
|
|
41
|
+
strokeLinecap="round"
|
|
42
|
+
strokeLinejoin="round"
|
|
43
|
+
/>
|
|
44
|
+
</svg>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default VideoScreenIcon;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { useState, useRef, useEffect, useContext } from "react";
|
|
2
|
+
// import { OutletContext } from "l-min-components/src/components";
|
|
3
|
+
import { OutletContext } from "../AppMainLayout";
|
|
4
|
+
import screenfull from "screenfull";
|
|
5
|
+
import {
|
|
6
|
+
LoadingScreen,
|
|
7
|
+
RangeContainer,
|
|
8
|
+
VideoController,
|
|
9
|
+
VideoPlayerContainer,
|
|
10
|
+
VideoPrompts,
|
|
11
|
+
} from "./index.styled";
|
|
12
|
+
import ReactPlayer from "react-player";
|
|
13
|
+
import VideoScreenIcon from "./icons/videoScreenIcon";
|
|
14
|
+
import PlayIcon from "./icons/playVideoIcon";
|
|
15
|
+
import PauseIcon from "./icons/pause";
|
|
16
|
+
import LoaderCustom from "./loader";
|
|
17
|
+
|
|
18
|
+
const StreamVideoPlayer = ({
|
|
19
|
+
width,
|
|
20
|
+
height = "360px",
|
|
21
|
+
style,
|
|
22
|
+
hideRange,
|
|
23
|
+
showPrompts,
|
|
24
|
+
controlSize,
|
|
25
|
+
videoId,
|
|
26
|
+
accountId = "7d5529dcf5",
|
|
27
|
+
}) => {
|
|
28
|
+
const [isPlaying, setIsPlayering] = useState(false);
|
|
29
|
+
const [isSeeking, setIsSeeking] = useState(false);
|
|
30
|
+
const [progress, setProgress] = useState();
|
|
31
|
+
const [hideController, setHideController] = useState(false);
|
|
32
|
+
const [count, setCount] = useState(0);
|
|
33
|
+
const playContainerRef = useRef();
|
|
34
|
+
const [url, setUrl] = useState(null);
|
|
35
|
+
const playerRef = useRef();
|
|
36
|
+
const { accessToken } = useContext(OutletContext);
|
|
37
|
+
const [isReady, setIsReady] = useState(false);
|
|
38
|
+
console.log(accessToken, "//////////////////////////");
|
|
39
|
+
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
setUrl(
|
|
42
|
+
`https://dev-117782726-api.learngual.com/media/v1/streams/files/${
|
|
43
|
+
videoId || "9145e2471cc84f3bac25f4ed8a5f583f"
|
|
44
|
+
}/stream/`,
|
|
45
|
+
);
|
|
46
|
+
}, [videoId]);
|
|
47
|
+
|
|
48
|
+
const format = (secs) => {
|
|
49
|
+
const sec_num = parseInt(secs, 10);
|
|
50
|
+
const hours = Math.floor(sec_num / 3600);
|
|
51
|
+
const minutes = Math.floor(sec_num / 60) % 60;
|
|
52
|
+
const seconds = sec_num % 60;
|
|
53
|
+
|
|
54
|
+
return [hours, minutes, seconds]
|
|
55
|
+
.map((v) => (v < 10 ? "0" + v : v))
|
|
56
|
+
.join(":");
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const handlePlayPause = () => {
|
|
60
|
+
setIsPlayering(!isPlaying);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const handleFullScreen = () => {
|
|
64
|
+
screenfull.toggle(playContainerRef.current);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const handleProgess = (changeState) => {
|
|
68
|
+
if (count > 3) {
|
|
69
|
+
setHideController(true);
|
|
70
|
+
setCount(0);
|
|
71
|
+
}
|
|
72
|
+
if (!hideController) {
|
|
73
|
+
setCount(count + 1);
|
|
74
|
+
}
|
|
75
|
+
if (isSeeking === false) {
|
|
76
|
+
setProgress(changeState);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const handleSeek = (e) => {
|
|
81
|
+
setProgress({ ...progress, played: parseFloat(e.target?.value / 100) });
|
|
82
|
+
};
|
|
83
|
+
const handleSeekMouseDown = () => {
|
|
84
|
+
setIsSeeking(true);
|
|
85
|
+
};
|
|
86
|
+
const handleSeekMouseUp = (e) => {
|
|
87
|
+
setIsSeeking(true);
|
|
88
|
+
playerRef.current?.seekTo(e.target?.value / 100);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const handleMouseMove = () => {
|
|
92
|
+
setHideController(false);
|
|
93
|
+
setCount(0);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const calcShowPrompts = () => {
|
|
97
|
+
if (progress?.playedSeconds) {
|
|
98
|
+
return Math.floor(
|
|
99
|
+
(progress.playedSeconds * 100) / progress.loadedSeconds,
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const currentTime = playerRef.current?.getCurrentTime()
|
|
105
|
+
? format(playerRef.current?.getCurrentTime())
|
|
106
|
+
: "00:00:00";
|
|
107
|
+
|
|
108
|
+
const duration = playerRef.current?.getDuration()
|
|
109
|
+
? format(playerRef.current?.getDuration())
|
|
110
|
+
: "00:00:00";
|
|
111
|
+
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
if (progress?.loaded) {
|
|
114
|
+
setIsReady(true);
|
|
115
|
+
} else {
|
|
116
|
+
setIsReady(false);
|
|
117
|
+
}
|
|
118
|
+
}, [progress?.loaded]);
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<VideoPlayerContainer
|
|
122
|
+
ref={playContainerRef}
|
|
123
|
+
style={style}
|
|
124
|
+
width={width}
|
|
125
|
+
height={height}
|
|
126
|
+
onMouseMove={handleMouseMove}
|
|
127
|
+
>
|
|
128
|
+
{showPrompts && calcShowPrompts() > 80 && (
|
|
129
|
+
<VideoPrompts>
|
|
130
|
+
<div>
|
|
131
|
+
<p>Continue watching</p>
|
|
132
|
+
<p>Previuos Part (Lesson 1)</p>
|
|
133
|
+
</div>
|
|
134
|
+
<div>
|
|
135
|
+
<p>Continue watching</p>
|
|
136
|
+
<p>Next Part (Lesson 6)</p>
|
|
137
|
+
</div>
|
|
138
|
+
</VideoPrompts>
|
|
139
|
+
)}
|
|
140
|
+
{!isReady && (
|
|
141
|
+
<LoadingScreen>
|
|
142
|
+
<LoaderCustom zoom={0.5} />
|
|
143
|
+
</LoadingScreen>
|
|
144
|
+
)}
|
|
145
|
+
|
|
146
|
+
<ReactPlayer
|
|
147
|
+
width="100%"
|
|
148
|
+
ref={playerRef}
|
|
149
|
+
height="100%"
|
|
150
|
+
url={url}
|
|
151
|
+
// muted={true}
|
|
152
|
+
playing={isPlaying}
|
|
153
|
+
onProgress={handleProgess}
|
|
154
|
+
onEnded={() => {
|
|
155
|
+
setIsPlayering(false);
|
|
156
|
+
setHideController(false);
|
|
157
|
+
setCount(0);
|
|
158
|
+
setProgress({ ...progress, played: 1 });
|
|
159
|
+
}}
|
|
160
|
+
config={{
|
|
161
|
+
file: {
|
|
162
|
+
forceHLS: true,
|
|
163
|
+
hlsOptions: {
|
|
164
|
+
xhrSetup: function (xhr, url) {
|
|
165
|
+
const modifiedURL = `${url}?_account=${accountId}`;
|
|
166
|
+
xhr.open("GET", modifiedURL, true);
|
|
167
|
+
xhr.setRequestHeader("Authorization", `Bearer ${accessToken}`);
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
hls: {
|
|
172
|
+
enableLowInitialLatency: true,
|
|
173
|
+
smoothQualityChange: true,
|
|
174
|
+
startLevel: 0,
|
|
175
|
+
},
|
|
176
|
+
}}
|
|
177
|
+
/>
|
|
178
|
+
|
|
179
|
+
<VideoController hide={hideController} size={controlSize}>
|
|
180
|
+
{(!hideRange || !isReady) && (
|
|
181
|
+
<RangeContainer>
|
|
182
|
+
<p>
|
|
183
|
+
{currentTime} / {duration}
|
|
184
|
+
</p>
|
|
185
|
+
<input
|
|
186
|
+
type="range"
|
|
187
|
+
name=""
|
|
188
|
+
id=""
|
|
189
|
+
className="range"
|
|
190
|
+
min={0}
|
|
191
|
+
max={100}
|
|
192
|
+
onChange={handleSeek}
|
|
193
|
+
onMouseDown={handleSeekMouseDown}
|
|
194
|
+
onMouseUp={handleSeekMouseUp}
|
|
195
|
+
value={
|
|
196
|
+
progress?.played >= 0 ? Math.round(progress?.played * 100) : 100
|
|
197
|
+
}
|
|
198
|
+
/>
|
|
199
|
+
<VideoScreenIcon onClick={handleFullScreen} />
|
|
200
|
+
</RangeContainer>
|
|
201
|
+
)}
|
|
202
|
+
{isReady && (
|
|
203
|
+
<div className="play_pause_wrap" onClick={handlePlayPause}>
|
|
204
|
+
{isPlaying ? <PauseIcon fill="#fff" /> : <PlayIcon fill="#fff" />}
|
|
205
|
+
</div>
|
|
206
|
+
)}
|
|
207
|
+
</VideoController>
|
|
208
|
+
</VideoPlayerContainer>
|
|
209
|
+
);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export default StreamVideoPlayer;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
export const VideoPlayerContainer = styled.div`
|
|
4
|
+
position: relative;
|
|
5
|
+
border-radius: 24px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
/* background: #f5f7f7; */
|
|
8
|
+
width: ${({ width }) => (width ? width : "auto")};
|
|
9
|
+
height: ${({ height }) => (height ? height : "auto")};
|
|
10
|
+
video {
|
|
11
|
+
object-fit: contain;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
14
|
+
|
|
15
|
+
export const VideoController = styled.div`
|
|
16
|
+
position: absolute;
|
|
17
|
+
padding: 22px 26px;
|
|
18
|
+
z-index: 2;
|
|
19
|
+
inset: 0;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: flex-end;
|
|
22
|
+
visibility: ${({ hide }) => (hide ? "hidden" : "visible")};
|
|
23
|
+
.play_pause_wrap {
|
|
24
|
+
position: absolute;
|
|
25
|
+
left: 50%;
|
|
26
|
+
top: 50%;
|
|
27
|
+
transform: translate(-50%, -50%);
|
|
28
|
+
width: 64px;
|
|
29
|
+
height: 64px;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
background: rgba(0, 0, 0, 0.2);
|
|
34
|
+
border-radius: 50%;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
|
|
37
|
+
svg {
|
|
38
|
+
width: 30px;
|
|
39
|
+
height: 30px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
export const RangeContainer = styled.div`
|
|
45
|
+
border-radius: 16.5px;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 29.307px;
|
|
48
|
+
background: #fff;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
padding: 6.5px 12.5px;
|
|
52
|
+
gap: 15px;
|
|
53
|
+
position: relative;
|
|
54
|
+
p {
|
|
55
|
+
position: absolute;
|
|
56
|
+
color: #b0dcdc;
|
|
57
|
+
font-size: 10px;
|
|
58
|
+
left: 40px;
|
|
59
|
+
}
|
|
60
|
+
svg {
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
.range {
|
|
64
|
+
border-radius: 9px;
|
|
65
|
+
flex: 1;
|
|
66
|
+
-webkit-appearance: none;
|
|
67
|
+
appearance: none;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
&::-webkit-slider-runnable-track {
|
|
70
|
+
height: 15px;
|
|
71
|
+
background: rgba(198, 204, 204, 0.4);
|
|
72
|
+
border-radius: 16px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&::-moz-range-track {
|
|
76
|
+
height: 15px;
|
|
77
|
+
background: rgba(198, 204, 204, 0.4);
|
|
78
|
+
border-radius: 16px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&::-webkit-slider-thumb {
|
|
82
|
+
-webkit-appearance: none;
|
|
83
|
+
appearance: none;
|
|
84
|
+
height: 15px;
|
|
85
|
+
width: 15px;
|
|
86
|
+
background-color: #099;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
border: 2px solid #099;
|
|
89
|
+
box-shadow: -9999px 0 0 9993px #099;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&::-moz-range-thumb {
|
|
93
|
+
height: 15px;
|
|
94
|
+
width: 15px;
|
|
95
|
+
background-color: #099;
|
|
96
|
+
border-radius: 50%;
|
|
97
|
+
border: 1px solid #099;
|
|
98
|
+
box-shadow: -9999px 0 0 9993px #099;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/* .range::-webkit-slider-thumb {
|
|
102
|
+
box-shadow: 0 0 9999px ;
|
|
103
|
+
border-radius: 9999px;
|
|
104
|
+
} */
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
export const VideoPrompts = styled.div`
|
|
108
|
+
position: absolute;
|
|
109
|
+
left: 0;
|
|
110
|
+
right: 0;
|
|
111
|
+
top: 20px;
|
|
112
|
+
z-index: 30;
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: space-between;
|
|
115
|
+
align-items: center;
|
|
116
|
+
div {
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
border-radius: 0px 8px 8px 0px;
|
|
119
|
+
background: #fff;
|
|
120
|
+
height: 48px;
|
|
121
|
+
min-width: 220px;
|
|
122
|
+
padding: 2px 18px;
|
|
123
|
+
border-radius: 0px 8px 8px 0px;
|
|
124
|
+
width: fit-content;
|
|
125
|
+
&:nth-child(2) {
|
|
126
|
+
border-radius: 8px 0px 0px 8px;
|
|
127
|
+
}
|
|
128
|
+
p {
|
|
129
|
+
font-size: 16px;
|
|
130
|
+
font-weight: 700;
|
|
131
|
+
line-height: 22px;
|
|
132
|
+
&:nth-child(1) {
|
|
133
|
+
color: #00c2c2;
|
|
134
|
+
&::before {
|
|
135
|
+
content: "";
|
|
136
|
+
display: inline-block;
|
|
137
|
+
border-radius: 50%;
|
|
138
|
+
width: 12px;
|
|
139
|
+
height: 12px;
|
|
140
|
+
background-color: #00c2c2;
|
|
141
|
+
margin-right: 7px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
&:nth-child(2) {
|
|
145
|
+
color: #febf10;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
`;
|
|
150
|
+
|
|
151
|
+
export const LoadingScreen = styled.div`
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 0;
|
|
154
|
+
left: 0;
|
|
155
|
+
right: 0;
|
|
156
|
+
bottom: 0;
|
|
157
|
+
z-index: 40;
|
|
158
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
159
|
+
display: grid;
|
|
160
|
+
place-items: center;
|
|
161
|
+
`;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Loader from "../../loader";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
|
|
4
|
+
const LoaderCustom = ({ zoom = 0.3, color = "#00c2c2", position }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Container
|
|
7
|
+
positionValue={
|
|
8
|
+
position === "left"
|
|
9
|
+
? "flex-start"
|
|
10
|
+
: position === "right"
|
|
11
|
+
? "flex-end"
|
|
12
|
+
: "center"
|
|
13
|
+
}
|
|
14
|
+
>
|
|
15
|
+
<Loader
|
|
16
|
+
color={color}
|
|
17
|
+
zoom={zoom}
|
|
18
|
+
style={{
|
|
19
|
+
textAlign: "center",
|
|
20
|
+
}}
|
|
21
|
+
/>
|
|
22
|
+
</Container>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default LoaderCustom;
|
|
27
|
+
|
|
28
|
+
const Container = styled.div`
|
|
29
|
+
width: 100%;
|
|
30
|
+
height: 100%;
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: ${({ positionValue }) => positionValue};
|
|
33
|
+
align-items: center;
|
|
34
|
+
`;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
export const VideoPlayerContainer = styled.div`
|
|
4
4
|
position: relative;
|
|
5
5
|
border-radius: 24px;
|
|
6
6
|
overflow: hidden;
|
|
7
|
-
/* background: #f5f7f7; */
|
|
8
7
|
width: ${({ width }) => (width ? width : "auto")};
|
|
9
8
|
height: ${({ height }) => (height ? height : "auto")};
|
|
10
9
|
video {
|