Skip to content

Commit

Permalink
refactor(web): remove unused video prop from updateUserMedia
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocroh committed May 18, 2024
1 parent 23980c2 commit 5b97bf8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/web/hooks/useUserMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useUserMedia = (video: HTMLVideoElement) => {
const [accessGranted, setAccessGranted] = useState(false);

const updateUserMedia = useCallback(
async (video: HTMLVideoElement, constraints: MediaConstraints) => {
async (constraints: MediaConstraints) => {
let _video: MediaTrackConstraints | boolean = false;

if (constraints.video !== "off") {
Expand Down Expand Up @@ -92,7 +92,7 @@ export const useUserMedia = (video: HTMLVideoElement) => {

useEffect(() => {
const init = async () => {
updateUserMedia(video, {
updateUserMedia({
audio: "",
video: "",
});
Expand All @@ -103,7 +103,7 @@ export const useUserMedia = (video: HTMLVideoElement) => {

useEffect(() => {
if (!selectedAudioDevice || !selectedAudioDevice) return;
updateUserMedia(video, {
updateUserMedia({
audio: selectedAudioDevice,
video: selectedVideoDevice,
});
Expand Down

0 comments on commit 5b97bf8

Please sign in to comment.