Skip to content

Commit

Permalink
Merge pull request #1251 from CodeCrowCorp/dev
Browse files Browse the repository at this point in the history
Fix: testing null video elements
  • Loading branch information
gagansuie authored May 15, 2024
2 parents bbd8055 + 8be65ca commit 2b25b89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/lib/WHIPClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ export default class WHIPClient extends EventTarget {
// })
this.peerConnection.close()
this.localStream?.getTracks().forEach((track) => track.stop())
this.videoElement.srcObject = null
if (this.videoElement) {
this.videoElement.srcObject = null
}
this.dispatchEvent(new CustomEvent(`localStreamStopped-${this.trackType}`))
console.log('Disconnected')
}
Expand Down
3 changes: 1 addition & 2 deletions src/lib/components/Channel/Stream/VideoItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@
class="rounded-md w-full h-full"
allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture; fullscreen;" />
</div>
{/if}
{#if !iframeUrl}
{:else}
<video
bind:this={screen_element}
id={`screen-${video._id}`}
Expand Down

0 comments on commit 2b25b89

Please sign in to comment.