UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

22 lines (21 loc) 826 B
import { jsx } from "react/jsx-runtime"; import ReactPlayerImport from "react-player"; //#region src/components/VideoPlayer/ReactPlayerWrapper.tsx var ReactPlayer = ReactPlayerImport.default ?? ReactPlayerImport; /** * Default-exported so `VideoPlayer` can code-split it via `React.lazy`, keeping * `react-player` (~2 MB) out of the SDK's eager import graph — it is fetched * only when a default video player actually renders. */ var ReactPlayerWrapper = ({ isPlaying, thumbnailUrl, videoUrl }) => /* @__PURE__ */ jsx(ReactPlayer, { className: "react-player", config: { file: { attributes: { poster: thumbnailUrl } } }, controls: true, height: "100%", playing: isPlaying, url: videoUrl, width: "100%" }); //#endregion export { ReactPlayerWrapper as default }; //# sourceMappingURL=ReactPlayerWrapper.d2ae5941.mjs.map