@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 • 768 B
JavaScript
import { __assign, __makeTemplateObject } from "tslib";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import styled from 'styled-components';
var Audio = styled.audio(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
export default function AudioViewer(_a) {
var src = _a.src, onError = _a.onError, onLoad = _a.onLoad, mimeType = _a.mimeType, autoPlay = _a.autoPlay;
return (_jsxs(Audio, __assign({ controls: true, className: 'audio', onError: onError, onCanPlay: onLoad, autoPlay: autoPlay }, { children: [_jsx("source", { src: src, type: mimeType }), "Your browser does not support this audio tag"] })));
}
var templateObject_1;
//# sourceMappingURL=audio-viewer.js.map