Skip to content

Commit

Permalink
fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
threepointone committed Aug 9, 2024
1 parent 2745709 commit ce9c974
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/components/AudioStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function AudioTrack({
mediaStream.removeTrack(audioTrack)
onTrackRemovedRef.current(track, audioTrack)
}
}, [audioTrack])
}, [audioTrack, mediaStream, track])

return null
}
3 changes: 2 additions & 1 deletion app/hooks/rxjsHooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useRef, useState } from 'react'
import { BehaviorSubject, Observable } from 'rxjs'
import type { Observable } from 'rxjs'
import { BehaviorSubject } from 'rxjs'

export function useSubscribedState<T>(observable: Observable<T>): T | undefined
export function useSubscribedState<T>(
Expand Down
3 changes: 1 addition & 2 deletions app/hooks/useDeadPulledTrackMonitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function useDeadPulledTrackMonitor(
// reset this to -1 for the check above
timeoutRef.current = -1
}
}, [deadTrack, enabled, feedbackEnabled, peer, track])
}, [deadTrack, enabled, feedbackEnabled, peer, peerConnection, track])

useEffect(() => {
if (!sessionId || !deadTrack || !feedbackEnabled) return
Expand Down Expand Up @@ -65,7 +65,6 @@ export function useDeadPulledTrackMonitor(
name,
sessionId,
room.identity?.name,
sessionId,
traceLink,
trackInfo,
])
Expand Down
1 change: 1 addition & 0 deletions app/routes/_room.$roomName.room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ function JoinedRoom({ bugReportsEnabled }: { bugReportsEnabled: boolean }) {
userMedia.videoStreamTrack &&
fakeUsers.map((uid) => (
<PullVideoTrack
key={identity.id}
video={identity.tracks.video}
audio={identity.tracks.audio}
>
Expand Down
4 changes: 2 additions & 2 deletions app/routes/_room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function Room() {
useStateObservable<RTCRtpEncodingParameters[]>(videoEncodingParams)
const pushedVideoTrack$ = useMemo(
() => peer.pushTrack(userMedia.videoTrack$, videoTrackEncodingParams$),
[videoTrackEncodingParams$]
[peer, userMedia.videoTrack$, videoTrackEncodingParams$]
)

const pushedVideoTrack = useSubscribedState(pushedVideoTrack$)
Expand All @@ -160,7 +160,7 @@ function Room() {
},
])
),
[]
[peer, userMedia.publicAudioTrack$]
)
const pushedAudioTrack = useSubscribedState(pushedAudioTrack$)

Expand Down
3 changes: 2 additions & 1 deletion app/routes/demo.rxjs.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ComponentProps, ElementRef } from 'react'
import { useMemo, useRef, useState } from 'react'
import { Observable, map, shareReplay } from 'rxjs'
import type { Observable } from 'rxjs'
import { map, shareReplay } from 'rxjs'
import { useObservableEffect, useSubscribedState } from '~/hooks/rxjsHooks'
import { useIsServer } from '~/hooks/useIsServer'
import { RxjsPeer } from '~/utils/rxjs/RxjsPeer.client'
Expand Down
3 changes: 2 additions & 1 deletion app/utils/rxjs/devicePrioritization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { BehaviorSubject, Observable, merge, of } from 'rxjs'
import type { Observable } from 'rxjs'
import { BehaviorSubject, merge, of } from 'rxjs'

export interface GetDeviceListOptions {
prioritizeList?: Array<Partial<MediaDeviceInfo>>
Expand Down
10 changes: 2 additions & 8 deletions app/utils/rxjs/getPacketLossStats$.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import {
combineLatest,
interval,
map,
Observable,
pairwise,
switchMap,
} from 'rxjs'
import type { Observable } from 'rxjs'
import { combineLatest, interval, map, pairwise, switchMap } from 'rxjs'
import Ewma from '~/utils/ewma'

export interface PacketLossStats {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/rxjs/getUserMediaTrack$.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Subscriber } from 'rxjs'
import {
Observable,
Subscriber,
combineLatest,
concat,
distinctUntilChanged,
Expand Down

0 comments on commit ce9c974

Please sign in to comment.