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:
Larvey
2023-04-21 04:15:27 -04:00
committed by GitHub
parent e7731651f2
commit 2ed085831b

View File

@@ -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>
</>
);