UNPKG

@afzalimdad9/react-file-preview

Version:

The url previewer is built using native html elements for previewing url of files of the following type

10 lines 812 B
import { __assign, __makeTemplateObject } from "tslib"; import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import styled from 'styled-components'; var Video = styled.video(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"]))); export default function VideoViewer(_a) { var src = _a.src, onError = _a.onError, onLoad = _a.onLoad, mimeType = _a.mimeType, autoPlay = _a.autoPlay; return (_jsxs(Video, __assign({ controls: true, onError: onError, onCanPlay: function () { return onLoad(true); }, autoPlay: autoPlay }, { children: [_jsx("source", { src: src, type: mimeType }), "Your browser does not support this video tag"] }))); } var templateObject_1; //# sourceMappingURL=video-viewer.js.map