Fix linter and fix lint issues (#10141)

This commit is contained in:
Nicolas Mowen
2024-02-28 15:23:56 -07:00
committed by GitHub
parent b6ef1e4330
commit 3bf2a496e1
63 changed files with 527 additions and 418 deletions

View File

@@ -58,7 +58,7 @@ export default function WebRtcPlayer({
.filter((kind) => media.indexOf(kind) >= 0)
.map(
(kind) =>
pc.addTransceiver(kind, { direction: "recvonly" }).receiver.track
pc.addTransceiver(kind, { direction: "recvonly" }).receiver.track,
);
localTracks.push(...tracks);
}
@@ -66,12 +66,12 @@ export default function WebRtcPlayer({
videoRef.current.srcObject = new MediaStream(localTracks);
return pc;
},
[videoRef]
[videoRef],
);
async function getMediaTracks(
media: string,
constraints: MediaStreamConstraints
constraints: MediaStreamConstraints,
) {
try {
const stream =
@@ -126,7 +126,7 @@ export default function WebRtcPlayer({
}
});
},
[]
[],
);
useEffect(() => {
@@ -140,7 +140,7 @@ export default function WebRtcPlayer({
const url = `${baseUrl.replace(
/^http/,
"ws"
"ws",
)}live/webrtc/api/ws?src=${camera}`;
const ws = new WebSocket(url);
const aPc = PeerConnection("video+audio");