softbuilders-react-video-player 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +126 -0
- package/dist/components/BigPlayButton/index.d.ts +9 -0
- package/dist/components/BigPlayButton/index.js +15 -0
- package/dist/components/BigPlayButton/index.js.map +1 -0
- package/dist/components/BufferTracker/index.d.ts +3 -0
- package/dist/components/BufferTracker/index.js +16 -0
- package/dist/components/BufferTracker/index.js.map +1 -0
- package/dist/components/ChapterTooltip/index.d.ts +11 -0
- package/dist/components/ChapterTooltip/index.js +36 -0
- package/dist/components/ChapterTooltip/index.js.map +1 -0
- package/dist/components/ChaptersPanal/index.d.ts +7 -0
- package/dist/components/ChaptersPanal/index.js +19 -0
- package/dist/components/ChaptersPanal/index.js.map +1 -0
- package/dist/components/ControlBar/index.d.ts +15 -0
- package/dist/components/ControlBar/index.js +64 -0
- package/dist/components/ControlBar/index.js.map +1 -0
- package/dist/components/CreateNoteMenu/index.d.ts +6 -0
- package/dist/components/CreateNoteMenu/index.js +29 -0
- package/dist/components/CreateNoteMenu/index.js.map +1 -0
- package/dist/components/CurrentTimeLabel/index.d.ts +4 -0
- package/dist/components/CurrentTimeLabel/index.js +10 -0
- package/dist/components/CurrentTimeLabel/index.js.map +1 -0
- package/dist/components/CurrentTimeTracker/index.d.ts +3 -0
- package/dist/components/CurrentTimeTracker/index.js +15 -0
- package/dist/components/CurrentTimeTracker/index.js.map +1 -0
- package/dist/components/Menu/index.d.ts +6 -0
- package/dist/components/Menu/index.js +11 -0
- package/dist/components/Menu/index.js.map +1 -0
- package/dist/components/MenuButton/index.d.ts +8 -0
- package/dist/components/MenuButton/index.js +31 -0
- package/dist/components/MenuButton/index.js.map +1 -0
- package/dist/components/NoteTooltip/index.d.ts +10 -0
- package/dist/components/NoteTooltip/index.js +24 -0
- package/dist/components/NoteTooltip/index.js.map +1 -0
- package/dist/components/NotesPanal/index.d.ts +7 -0
- package/dist/components/NotesPanal/index.js +17 -0
- package/dist/components/NotesPanal/index.js.map +1 -0
- package/dist/components/QualityMenu/index.d.ts +4 -0
- package/dist/components/QualityMenu/index.js +53 -0
- package/dist/components/QualityMenu/index.js.map +1 -0
- package/dist/components/Slider/index.d.ts +10 -0
- package/dist/components/Slider/index.js +22 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/style.css +15 -0
- package/dist/components/SoftBuildersVideoPlayer/index.d.ts +13 -0
- package/dist/components/SoftBuildersVideoPlayer/index.js +55 -0
- package/dist/components/SoftBuildersVideoPlayer/index.js.map +1 -0
- package/dist/components/SubtitleMenu/index.d.ts +4 -0
- package/dist/components/SubtitleMenu/index.js +54 -0
- package/dist/components/SubtitleMenu/index.js.map +1 -0
- package/dist/components/TimeSlider/index.d.ts +7 -0
- package/dist/components/TimeSlider/index.js +69 -0
- package/dist/components/TimeSlider/index.js.map +1 -0
- package/dist/components/TimeSliderContainer/index.d.ts +8 -0
- package/dist/components/TimeSliderContainer/index.js +14 -0
- package/dist/components/TimeSliderContainer/index.js.map +1 -0
- package/dist/components/Tooltip/index.d.ts +7 -0
- package/dist/components/Tooltip/index.js +8 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/VideoPlayerComponent/index.d.ts +17 -0
- package/dist/components/VideoPlayerComponent/index.js +140 -0
- package/dist/components/VideoPlayerComponent/index.js.map +1 -0
- package/dist/components/VideoPlayerComponent/provider.d.ts +18 -0
- package/dist/components/VideoPlayerComponent/provider.js +36 -0
- package/dist/components/VideoPlayerComponent/provider.js.map +1 -0
- package/dist/components/VideoPlayerComponent/style/style.css +36 -0
- package/dist/components/VolumeSlider/index.d.ts +4 -0
- package/dist/components/VolumeSlider/index.js +28 -0
- package/dist/components/VolumeSlider/index.js.map +1 -0
- package/dist/icons/index.d.ts +14 -0
- package/dist/icons/index.js +15 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/tailwind.css +778 -0
- package/dist/types.d.ts +33 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +51 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +37 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../src/components/VideoPlayerComponent/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,aAAa,EACb,UAAU,EACV,QAAQ,EAER,SAAS,GACV,MAAM,OAAO,CAAC;AAuBf,MAAM,8BAA8B,GAAG,aAAa,CAElD,SAAS,CAAC,CAAC;AAEb,8BAA8B;AAC9B,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,QAAQ,GAGT,EAAE,EAAE;IACH,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACpE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IACpD,mDAAmD;IACnD,MAAM,CAAC,oBAAoB,EAAE,gCAAgC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7E,MAAM,CAAC,0BAA0B,EAAE,6BAA6B,CAAC,GAC/D,QAAQ,CAAC,CAAC,CAAC,CAAC;IAEd,SAAS,CAAC,GAAG,EAAE;QACb,6BAA6B,CAAC,CAAC,oBAAoB,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC;IACzE,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAE3B,OAAO,CACL,oBAAC,8BAA8B,CAAC,QAAQ,IACtC,KAAK,EAAE;YACL,MAAM;YACN,SAAS;YACT,QAAQ;YACR,WAAW;YACX,WAAW;YACX,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC5D,YAAY;YACZ,eAAe;YACf,oBAAoB;YACpB,gCAAgC;YAChC,0BAA0B;SAC3B,IAEA,QAAQ,CAC+B,CAC3C,CAAC;AACJ,CAAC,CAAC;AAEF,iCAAiC;AACjC,MAAM,CAAC,MAAM,iCAAiC,GAAG,GAAG,EAAE;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,8BAA8B,CAAC,CAAC;IAC3D,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
.video-js .vjs-control-bar {
|
2
|
+
background-color: transparent;
|
3
|
+
display: none;
|
4
|
+
}
|
5
|
+
|
6
|
+
.video-js .vjs-big-play-button {
|
7
|
+
background-color: transparent;
|
8
|
+
display: block;
|
9
|
+
border: none;
|
10
|
+
padding: 0px;
|
11
|
+
opacity: 0;
|
12
|
+
transition: opacity 0.5s ease-in-out;
|
13
|
+
}
|
14
|
+
|
15
|
+
.video-js:hover .vjs-big-play-button {
|
16
|
+
background-color: transparent;
|
17
|
+
border: none;
|
18
|
+
padding: 0px;
|
19
|
+
opacity: 1;
|
20
|
+
transition: opacity 0.5s ease-in-out;
|
21
|
+
}
|
22
|
+
|
23
|
+
.vjs-poster {
|
24
|
+
display: inline-block;
|
25
|
+
vertical-align: middle;
|
26
|
+
cursor: pointer;
|
27
|
+
margin: 0;
|
28
|
+
padding: 0;
|
29
|
+
position: absolute;
|
30
|
+
top: 0;
|
31
|
+
right: 0;
|
32
|
+
bottom: 0;
|
33
|
+
left: 0;
|
34
|
+
height: 100%;
|
35
|
+
background-color: black;
|
36
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
2
|
+
import Slider from "../Slider";
|
3
|
+
import { useSoftBuildersVideoPlayerContext } from "../VideoPlayerComponent/provider";
|
4
|
+
import { MuteIcon, UnmuteIcon } from "../../icons";
|
5
|
+
const MIN = 0, MAX = 100;
|
6
|
+
const VolumeSlider = ({}) => {
|
7
|
+
const { player } = useSoftBuildersVideoPlayerContext();
|
8
|
+
const [volume, setVolume] = useState(0);
|
9
|
+
useEffect(() => {
|
10
|
+
setVolume((player === null || player === void 0 ? void 0 : player.muted()) ? 0 : Number(player === null || player === void 0 ? void 0 : player.volume()) * 100 || 0);
|
11
|
+
}, [player]);
|
12
|
+
const handleValueChange = (e) => {
|
13
|
+
const newVolume = Number(e.target.value);
|
14
|
+
setVolume(newVolume);
|
15
|
+
player === null || player === void 0 ? void 0 : player.volume(newVolume / 100);
|
16
|
+
if (newVolume === 0) {
|
17
|
+
player === null || player === void 0 ? void 0 : player.muted(true);
|
18
|
+
}
|
19
|
+
else {
|
20
|
+
player === null || player === void 0 ? void 0 : player.muted(false);
|
21
|
+
}
|
22
|
+
};
|
23
|
+
return (React.createElement("div", { className: "sb-flex sb-items-center sb-gap-2" },
|
24
|
+
volume === 0 || (player === null || player === void 0 ? void 0 : player.muted()) ? (React.createElement(MuteIcon, { className: "sb-w-3 sb-h-3" })) : (React.createElement(UnmuteIcon, { className: "sb-w-3 sb-h-3" })),
|
25
|
+
React.createElement(Slider, { value: volume, handleValueChange: handleValueChange, min: MIN, max: MAX })));
|
26
|
+
};
|
27
|
+
export default VolumeSlider;
|
28
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/VolumeSlider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAErF,OAAO,EAAE,QAAQ,EAAE,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AQ,IAAC,SAAS,EAAC,eAAe,GAAG,CACvC,CAAC,CAAC,CAAC,CACF,oBAAC,UAAU,IAAC,SAAS,EAAC,eAAe,GAAG,CACzC;QAED,oBAAC,MAAM,IACL,KAAK,EAAE,MAAM,EACb,iBAAiB,EAAE,iBAAiB,EACpC,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,GACR,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export { default as BackwardIcon } from "./backward-icon.svg";
|
2
|
+
export { default as CheckedIcon } from "./checked-icon.svg";
|
3
|
+
export { default as ClosedNoteIcon } from "./closed-note-icon.svg";
|
4
|
+
export { default as ForwardIcon } from "./forward-icon.svg";
|
5
|
+
export { default as FullScreenIcon } from "./full-screen-icon.svg";
|
6
|
+
export { default as LeftArrowIcon } from "./left-arrow-icon.svg";
|
7
|
+
export { default as MuteIcon } from "./mute-icon.svg";
|
8
|
+
export { default as NoteIcon } from "./note-icon.svg";
|
9
|
+
export { default as OpenNoteIcon } from "./open-note-icon.svg";
|
10
|
+
export { default as PauseIcon } from "./pause-icon.svg";
|
11
|
+
export { default as PlayIcon } from "./play-icon.svg";
|
12
|
+
export { default as SettingsIcon } from "./settings-icon.svg";
|
13
|
+
export { default as UnmuteIcon } from "./unmute-icon.svg";
|
14
|
+
export { default as SubtitlesIcon } from "./subtitles-icon.svg";
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export { default as BackwardIcon } from "./backward-icon.svg";
|
2
|
+
export { default as CheckedIcon } from "./checked-icon.svg";
|
3
|
+
export { default as ClosedNoteIcon } from "./closed-note-icon.svg";
|
4
|
+
export { default as ForwardIcon } from "./forward-icon.svg";
|
5
|
+
export { default as FullScreenIcon } from "./full-screen-icon.svg";
|
6
|
+
export { default as LeftArrowIcon } from "./left-arrow-icon.svg";
|
7
|
+
export { default as MuteIcon } from "./mute-icon.svg";
|
8
|
+
export { default as NoteIcon } from "./note-icon.svg";
|
9
|
+
export { default as OpenNoteIcon } from "./open-note-icon.svg";
|
10
|
+
export { default as PauseIcon } from "./pause-icon.svg";
|
11
|
+
export { default as PlayIcon } from "./play-icon.svg";
|
12
|
+
export { default as SettingsIcon } from "./settings-icon.svg";
|
13
|
+
export { default as UnmuteIcon } from "./unmute-icon.svg";
|
14
|
+
export { default as SubtitlesIcon } from "./subtitles-icon.svg";
|
15
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
import SoftBuildersVideoPlayer from "./components/SoftBuildersVideoPlayer";
|
2
|
+
export { SoftBuildersVideoPlayerChapter, SoftBuildersVideoPlayerNote, SoftBuildersVideoPlayerOptions, SoftBuildersVideoPlayerSource, SoftBuildersVideoPlayerTrack, } from "./types";
|
3
|
+
export default SoftBuildersVideoPlayer;
|
package/dist/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,MAAM,sCAAsC,CAAC;AAU3E,eAAe,uBAAuB,CAAC"}
|