Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。
import type { RoomVoiceState } from "../../shared/protocol";
import type { PawnVoice } from "../components/living/Pawn";
import type { CopyKey } from "../ui/copy";
import type { GlyphName } from "../ui/icons";
/** One reading of the room's member snapshot for the couch and voice roster. */
export function describeVoiceParticipant(member?: RoomVoiceState["members"][number]): {
appearance?: PawnVoice; label: CopyKey; icon: GlyphName;
} {
if (!member?.connected) return { label: "voice.offline", icon: "wifiOff" };
if (!member.joined) return { label: "voice.outside", icon: "door" };
const microphone = Boolean(member.publicationId);
return { appearance: { microphone, deafened: member.deafened },
label: microphone ? "voice.microphoneActive" : "voice.microphoneInactive",
icon: microphone ? "microphone" : "microphoneOff" };
}