Skip to content

Commit

Permalink
add kerberos-io image card
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed Jun 14, 2024
1 parent dd49138 commit c2886c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/livestream-sd/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@kerberos-io/ui": "^1.77.0",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
11 changes: 8 additions & 3 deletions examples/livestream-sd/ui/src/Liveview.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
// This component will receive an array of livestreams and display them in a video grid.

import React from 'react';
import { ImageCard } from '@kerberos-io/ui';

const Liveview = ({ liveviews }) => {
return (
<div className="liveview">
{liveviews && liveviews.length && "ok"}
{liveviews && liveviews.map((liveview, index) => (
<img key={index} src={`data:image/jpeg;base64,${liveview.image}`} alt="liveview" />
<div>
<p>Camera name: {liveview.camera_id}</p>
<ImageCard
imageSrc={`data:image/png;base64, ${liveview.image}`}
onerror=""
/>
</div>
))}
</div>
);
Expand Down

0 comments on commit c2886c5

Please sign in to comment.