snort/packages/app/src/Element/LiveEvent.tsx

12 lines
323 B
TypeScript
Raw Normal View History

2023-06-17 11:53:38 +00:00
import { NostrEvent } from "@snort/system";
import { findTag } from "SnortUtils";
2023-06-17 21:36:15 +00:00
import { LiveVideoPlayer } from "Element/LiveVideoPlayer";
2023-06-17 11:53:38 +00:00
export function LiveEvent({ ev }: { ev: NostrEvent }) {
2023-06-17 21:36:15 +00:00
const stream = findTag(ev, "streaming");
if (stream) {
return <LiveVideoPlayer src={stream} />;
}
return null;
2023-06-17 11:53:38 +00:00
}