Skip to content

Commit

Permalink
fix: video is not playing when browser tab is not active
Browse files Browse the repository at this point in the history
  • Loading branch information
tyohan committed Sep 19, 2024
1 parent 39d90a9 commit 3b7c75a
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/room/observer/video-observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,6 @@ export class VideoObserver {
observe(videoElement) {
this.#intersectionObserver.observe(videoElement)
this.#resizeObserver.observe(videoElement)

// report the initial size
if (!(videoElement.srcObject instanceof MediaStream)) return

const videoTracks = videoElement.srcObject.getVideoTracks()
if (videoTracks?.length > 0) {
const trackid = videoTracks[0].id
const width = videoElement.offsetWidth
const height = videoElement.offsetHeight
this.#onVideoSizeChanged(trackid, width, height)
}
}

/**
Expand Down

0 comments on commit 3b7c75a

Please sign in to comment.