If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
Description
when I list multiple videos and then drag videos that time my web crash for drag and drop, I use @dnd-kit/core
Reduced test case
http://localhost:3000
Steps to reproduce
import React, { useState } from "react";
import { Stream } from "@cloudflare/stream-react";
interface VideoProps extends React.HTMLProps {
src: string;
height?: number;
width?: number;
loop?: boolean;
className?: string;
autoPlay?: boolean;
muted?: boolean;
cover?: boolean;
onClick?: React.MouseEventHandler;
controls?: boolean;
children?: React.ReactNode;
}
const VideoComponent: React.FC = ({
src,
loop = false,
className = "",
autoPlay = false,
muted = true,
onClick,
controls,
children,
height,
width,
cover = true,
...props
}) => {
const [loading, setLoading] =useState(true);
return (
<>
); };
export default React.memo(VideoComponent);
"use client";
import React, { SyntheticEvent, useEffect, useState } from "react"; import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import { RxDragHandleDots2 } from "react-icons/rx"; import { SortableItemProps } from "@/types/restaurant"; import NextImage from "@/components/Common/NextImage"; import VideoComponent from "@/components/Common/VideoComponent"; import { DEFAULT_IMAGE } from "@/utils/constants"; import SectionLoader from "@/components/Common/SectionLoader"; import { CheckCircleBlue } from "@/components/Common/Icons";
const SortableEditableItem: React.FC = ({
id,
dragId,
image,
progressInfo,
errors,
handleDeleteImage,
handleImageChange,
disabled,
type,
handleEditFile,
isUploading,
fileName,
isOfficial,
thumbnail_url
}) => {
const [imageBlobUrl, setImageBlobUrl] = useState("");
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: dragId ?? "", disabled: disabled }); const limitedProgress = Math.min(progressInfo?.[fileName ?? ""], 90); useEffect(() => { const imgUrl = typeof image !== "string" ? URL.createObjectURL(image as File) : (image as string); setImageBlobUrl(imgUrl); }, [image]);
const style = { transform: CSS.Transform.toString(transform), transition: transition, opacity: 1, width: "100%", display: "flex", }; const edit = (mediaFile: File) => { if (handleEditFile && id !== undefined && mediaFile) { handleEditFile(id, mediaFile); } }; return (
); };
export default SortableEditableItem;
Errors
No response
What version of Video.js are you using?
v8.17.3
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
chrome
What OS(es) and version(s) does this occur with?
ubuntu
👋 Thanks for opening your first issue here! 👋
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.