From c5a37bcb1e02caec1cbafe737de8c09afe400a79 Mon Sep 17 00:00:00 2001 From: Mohammad Amoush Date: Fri, 13 Sep 2019 16:52:59 -0400 Subject: Local WebCam shows up --- src/client/views/webcam/DashWebCam.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/webcam/DashWebCam.tsx b/src/client/views/webcam/DashWebCam.tsx index a158938fe..3659bbc6e 100644 --- a/src/client/views/webcam/DashWebCam.tsx +++ b/src/client/views/webcam/DashWebCam.tsx @@ -24,7 +24,7 @@ interface WebcamProps { } @observer -export class DashWebCam extends React.Component, WebcamState> { +export class DashWebCam extends React.Component> { static defaultProps = { audio: true, imageSmoothing: true, @@ -54,11 +54,11 @@ export class DashWebCam extends React.Component { + const sourceSelected = (audioConstraints: any, videoConstraints: any) => { const constraints: MediaStreamConstraints = { video: typeof videoConstraints !== "undefined" ? videoConstraints : true }; @@ -181,9 +181,9 @@ export class DashWebCam extends React.Component ({ optional: [{ sourceId: id }] }); + const optionalSource = (id: any) => ({ optional: [{ sourceId: id }] }); - const constraintToSourceId = constraint => { + const constraintToSourceId = (constraint: any) => { const { deviceId } = constraint; if (typeof deviceId === "string") { @@ -206,7 +206,7 @@ export class DashWebCam extends React.Component { + sources.forEach((source: { kind: string; id: any; }) => { if (source.kind === "audio") { audioSource = source.id; } else if (source.kind === "video") { @@ -234,12 +234,12 @@ export class DashWebCam extends React.Component