UNPKG

stream-chat-react-native-core

Version:

The official React Native and Expo components for Stream Chat, a service for building chat applications

20 lines 881 B
Object.defineProperty(exports, "__esModule", { value: true }); exports.useImageGalleryVideoPlayer = void 0; var _react = require("react"); var _ImageGalleryContextBase = require("../../../contexts/imageGalleryContext/ImageGalleryContextBase"); var useImageGalleryVideoPlayer = options => { var _useImageGalleryConte = (0, _ImageGalleryContextBase.useImageGalleryContext)(), autoPlayVideo = _useImageGalleryConte.autoPlayVideo, imageGalleryStateStore = _useImageGalleryConte.imageGalleryStateStore; var videoPlayer = (0, _react.useMemo)(() => { return imageGalleryStateStore.videoPlayerPool.getOrAddPlayer({ ...options, autoPlay: autoPlayVideo }); }, [autoPlayVideo, imageGalleryStateStore, options]); return videoPlayer; }; exports.useImageGalleryVideoPlayer = useImageGalleryVideoPlayer; //# sourceMappingURL=useImageGalleryVideoPlayer.js.map