mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-18 11:11:10 +01:00
✨Allow Video Stream widget to play any video file type. (#835)
* Remove type limitation for video player This allows the video player to play any video source, including m3u8 live streams, mp4, gifs, etc. * Fixed Linting.
This commit is contained in:
@@ -15,7 +15,6 @@ const VideoFeed = ({ source, controls, autoPlay, muted }: VideoFeedProps) => {
|
||||
const [player, setPlayer] = useState<ReturnType<typeof videojs>>();
|
||||
|
||||
const { classes, cx } = useStyles();
|
||||
|
||||
useEffect(() => {
|
||||
// make sure Video.js player is only initialized once
|
||||
if (player) {
|
||||
@@ -50,7 +49,7 @@ const VideoFeed = ({ source, controls, autoPlay, muted }: VideoFeedProps) => {
|
||||
<LoadingOverlay visible={player === undefined} />
|
||||
{/* eslint-disable-next-line jsx-a11y/media-has-caption */}
|
||||
<video className={cx('video-js', classes.video)} ref={videoRef}>
|
||||
<source src={source} type="video/mp4" />
|
||||
<source src={source} />
|
||||
</video>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user