Skip to content

Commit

Permalink
feat: add basic metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
FallenDeity committed Jul 28, 2023
1 parent 0f71d92 commit 878b3b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/Call/IncomingCall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export default function IncomingCall({
const remoteView = _zg.createRemoteStreamView(remoteStream);
setRemoteStream(remoteStream);
remoteView.play("remote-video", { enableAutoplayDialog: true });
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
} else if (updateType === "DELETE") {
_zg.stopPlayingStream(streamList[0].streamID);
}
Expand Down Expand Up @@ -155,7 +156,10 @@ export default function IncomingCall({
<div className="h-3 w-3 animate-pulse rounded-full bg-red-500" />
<span className="text-md">{formatTime(duration)}</span>
</div>
<div className="absolute bottom-5 right-5 z-50 h-auto w-56 shadow-xl" id="local-video" />
<div
className="absolute bottom-5 right-5 z-50 h-auto w-32 shadow-xl sm:w-48 lg:w-56"
id="local-video"
/>
<div className="hidden" id="local-audio" />
<button
className="absolute bottom-5 left-0 right-0 z-50 mx-auto flex h-[56px] w-[56px] cursor-pointer items-center justify-center rounded-full bg-red-500 p-3 text-white disabled:cursor-not-allowed disabled:opacity-50"
Expand Down
6 changes: 5 additions & 1 deletion src/components/Call/OutgoingCall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export default function OutgoingCall({ call, user }: { call: Call; user: User })
const remoteView = _zg.createRemoteStreamView(remoteStream);
setRemoteStream(remoteStream);
remoteView.play("remote-video", { enableAutoplayDialog: true });
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
} else if (updateType === "DELETE") {
_zg.stopPlayingStream(streamList[0].streamID);
}
Expand Down Expand Up @@ -164,7 +165,10 @@ export default function OutgoingCall({ call, user }: { call: Call; user: User })
<div className="h-3 w-3 animate-pulse rounded-full bg-red-500" />
<span className="text-md">{formatTime(duration)}</span>
</div>
<div className="absolute bottom-5 right-5 z-50 h-auto w-56 shadow-xl" id="local-video" />
<div
className="absolute bottom-5 right-5 z-50 h-auto w-32 shadow-xl sm:w-48 lg:w-56"
id="local-video"
/>
<div className="hidden" id="local-audio" />
<button
className="absolute bottom-5 left-0 right-0 z-50 mx-auto flex h-[56px] w-[56px] cursor-pointer items-center justify-center rounded-full bg-red-500 p-3 text-white disabled:cursor-not-allowed disabled:opacity-50"
Expand Down
1 change: 1 addition & 0 deletions src/components/Chat/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default function List({ conversation }: { conversation: FullConversationT
setConversations((prev) =>
prev.map((conversation) => {
if (conversation.id === data.id) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
return { ...conversation, messages: [...conversation?.messages, ...data.messages] };
}
return conversation;
Expand Down

0 comments on commit 878b3b9

Please sign in to comment.