Skip to content

Commit

Permalink
Merge pull request #481 from gagan-suie/dev
Browse files Browse the repository at this point in the history
Fix: viewers view not resizing
  • Loading branch information
gagansuie authored Jun 5, 2023
2 parents 0090561 + c4ac471 commit f9d2e76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/Channel/Chat/DrawerChat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
if (
$was_chat_drawer_closed &&
!chatHistory?.length &&
$channel_connection === `open-${channel._id}`
$channel_connection === `open-${channel._id}` &&
channel.socket?.readyState === WebSocket.OPEN
) {
emitChatHistoryToChannel({ channelSocket: channel.socket, channelId: channel._id, skip: 100 })
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/Channel/Stream/VideoItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
$: animate = isWebcamFocused ? '' : 'transition-all'
</script>

<div class={$is_sharing_screen || $is_sharing_webcam ? 'w-full h-full' : 'w-[500px] max-h-80'}>
<div class={video.screen || video.webcam ? 'w-full h-full' : 'w-[500px] max-h-80'}>
<div class="bg-base-200 relative w-full h-full rounded-md">
<img
src={video.avatar}
Expand All @@ -273,7 +273,7 @@
on:mouseup={onMouseUp}
class={animate +
' absolute ' +
(!$is_sharing_screen ? 'w-full bottom-0 left-0 h-full' : 'w-1/4 bottom-0 right-0')}>
(!video.screen ? 'w-full bottom-0 left-0 h-full' : 'w-1/4 bottom-0 right-0')}>
<video id={`webcam-${video._id}`} autoplay muted class="rounded-md h-full w-full" />
</div>
<video id={`audio-${video._id}`} autoplay muted class="rounded-md w-0 h-0" />
Expand Down

0 comments on commit f9d2e76

Please sign in to comment.