Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lint warnings #77

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"sideEffects": false,
"scripts": {
"build": "remix build",
"lint": "prettier --check . && eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"lint": "prettier --check . && eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint --max-warnings=0 .",
"dev": "remix dev --manual -c \"npm start\"",
"start": "wrangler dev ./build/index.js",
"prebuild": "npm run clean",
Expand Down