feat: add video widget (#287)
* feat: add nestjs replacement, remove nestjs * feat: add video widget * feat: add notice about youtube not supported with video.js * fix: format issue * fix: format issue
This commit is contained in:
20
packages/widgets/src/video/index.ts
Normal file
20
packages/widgets/src/video/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { IconDeviceCctv } from "@homarr/ui";
|
||||
|
||||
import { createWidgetDefinition } from "../definition";
|
||||
import { optionsBuilder } from "../options";
|
||||
|
||||
export const { definition, componentLoader } = createWidgetDefinition("video", {
|
||||
icon: IconDeviceCctv,
|
||||
options: optionsBuilder.from((factory) => ({
|
||||
feedUrl: factory.text({
|
||||
defaultValue: "",
|
||||
}),
|
||||
hasAutoPlay: factory.switch({
|
||||
withDescription: true,
|
||||
}),
|
||||
isMuted: factory.switch({
|
||||
defaultValue: true,
|
||||
}),
|
||||
hasControls: factory.switch(),
|
||||
})),
|
||||
}).withDynamicImport(() => import("./component"));
|
||||
Reference in New Issue
Block a user