Skip to content

Commit 401288d

Browse files
committed
feat: add two cameras for testing in ethernet-view
1 parent 6c3e99f commit 401288d

5 files changed

Lines changed: 2146 additions & 4649 deletions

File tree

common-front/lib/components/LiveStreamPlayer/LiveStreamPlayer.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Props = {
88
borderRadius?: string;
99
};
1010

11-
const LiveStreamPlayer: React.FC<Props> = ({ src, width = '100%', height = '100%', borderRadius = '8px' }) => {
11+
export const LiveStreamPlayer = ({ src, width = '100%', height = '100%', borderRadius = '8px' }: Props) => {
1212
const videoRef = useRef<HTMLVideoElement | null>(null);
1313

1414
useEffect(() => {
@@ -24,20 +24,16 @@ const LiveStreamPlayer: React.FC<Props> = ({ src, width = '100%', height = '100%
2424

2525
return () => hls.destroy();
2626
} else {
27-
console.error('HLS no soportado');
27+
console.error('HLS not supported');
2828
}
2929
}
3030
}, [src]);
3131

3232
return (
33-
<div>
34-
<video
35-
ref={videoRef}
36-
controls
37-
style={{ width: width, height: height, borderRadius: borderRadius }}
38-
/>
39-
</div>
33+
<video
34+
ref={videoRef}
35+
controls
36+
style={{ width: width, height: height, borderRadius: borderRadius }}
37+
/>
4038
);
4139
};
42-
43-
export default LiveStreamPlayer;

common-front/lib/components/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ export * from './Orders/Orders';
1919
export * from './Orders/useOrders';
2020
export * from './SplashScreen/SplashScreen';
2121
export * from './Caret/Caret';
22+
export * from './LiveStreamPlayer/LiveStreamPlayer';

0 commit comments

Comments
 (0)