mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
Format VideoEditor component code and fix upload headers
This commit is contained in:
parent
69c4497671
commit
480efdef63
@ -20,21 +20,22 @@ const VideoEditor = (props) => {
|
|||||||
props.onChange(key, value)
|
props.onChange(key, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
return <div className="video-editor">
|
return (
|
||||||
|
<div className="video-editor">
|
||||||
<h1>
|
<h1>
|
||||||
<Icons.MdVideocam />
|
<Icons.MdVideocam />
|
||||||
Video
|
Video
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{
|
{!props.videoSourceURL && (
|
||||||
(!props.videoSourceURL) && <antd.Empty
|
<antd.Empty
|
||||||
image={<Icons.MdVideocam />}
|
image={<Icons.MdVideocam />}
|
||||||
description="No video"
|
description="No video"
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
|
|
||||||
{
|
{props.videoSourceURL && (
|
||||||
props.videoSourceURL && <div className="video-editor-preview">
|
<div className="video-editor-preview">
|
||||||
<VideoPlayer
|
<VideoPlayer
|
||||||
controls={[
|
controls={[
|
||||||
"play",
|
"play",
|
||||||
@ -47,7 +48,7 @@ const VideoEditor = (props) => {
|
|||||||
src={props.videoSourceURL}
|
src={props.videoSourceURL}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
|
|
||||||
<div className="flex-column align-start gap10">
|
<div className="flex-column align-start gap10">
|
||||||
<div className="flex-row align-center gap10">
|
<div className="flex-row align-center gap10">
|
||||||
@ -64,7 +65,10 @@ const VideoEditor = (props) => {
|
|||||||
|
|
||||||
<antd.TimePicker
|
<antd.TimePicker
|
||||||
showNow={false}
|
showNow={false}
|
||||||
defaultValue={props.startSyncAt && dayjs((props.startSyncAt), "mm:ss:SSS")}
|
defaultValue={
|
||||||
|
props.startSyncAt &&
|
||||||
|
dayjs(props.startSyncAt, "mm:ss:SSS")
|
||||||
|
}
|
||||||
format={"mm:ss:SSS"}
|
format={"mm:ss:SSS"}
|
||||||
onChange={(time, str) => {
|
onChange={(time, str) => {
|
||||||
handleChange("startSyncAt", str)
|
handleChange("startSyncAt", str)
|
||||||
@ -78,19 +82,15 @@ const VideoEditor = (props) => {
|
|||||||
onSuccess={(id, response) => {
|
onSuccess={(id, response) => {
|
||||||
handleChange("videoSourceURL", response.url)
|
handleChange("videoSourceURL", response.url)
|
||||||
}}
|
}}
|
||||||
accept={[
|
accept={["video/*"]}
|
||||||
"video/*",
|
|
||||||
]}
|
|
||||||
headers={{
|
headers={{
|
||||||
"transmux": "mq-hls",
|
transformations: "mq-hls",
|
||||||
}}
|
}}
|
||||||
disabled={props.loading}
|
disabled={props.loading}
|
||||||
>
|
>
|
||||||
Upload video
|
Upload video
|
||||||
</UploadButton>
|
</UploadButton>
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
<antd.Input
|
<antd.Input
|
||||||
placeholder="Set a video HLS URL"
|
placeholder="Set a video HLS URL"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@ -101,6 +101,7 @@ const VideoEditor = (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default VideoEditor
|
export default VideoEditor
|
Loading…
x
Reference in New Issue
Block a user