MCPcopy
hub / github.com/kimlimjustin/xplorer / videoPreview

Function videoPreview

src/Components/Thumbnail/thumbnail.ts:38–44  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

36 * @returns {string} HTML Result
37 */
38const videoPreview = async (filename: string): Promise<string> => {
39 const appearance = await Storage.get('appearance');
40 const alt = require(`../../Icon/${defaultThumbnail.DEFAULT_VIDEO_THUMBNAIL}`);
41 return appearance?.videoAsThumbnail
42 ? `<video autoplay loop muted class="file-grid-preview"><source src = "${filename}" /><img src = "${alt}" /></video>`
43 : imageThumbnail(alt, true);
44};
45/**
46 * Get file icon of a file/folder
47 * @param {string} filename - name of the file/folder

Callers 1

fileThumbnailFunction · 0.85

Calls 2

imageThumbnailFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected