cleanup and turning streaming off for now

This commit is contained in:
talksik
2022-05-22 04:27:27 -05:00
parent be2505f298
commit f98026a3a5
3 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ export default class MasterLineData {
// -> all connected line members be able to show this in the right activity section of the lineRow // -> all connected line members be able to show this in the right activity section of the lineRow
currentBroadcastersUserIds?: string[]; currentBroadcastersUserIds?: string[];
profilePictures: { profilePictures?: {
allMembers: string[]; allMembers: string[];
allMembersWithoutMe: string[]; allMembersWithoutMe: string[];
@@ -32,7 +32,7 @@ export default class MasterLineData {
tunedMembers: string[]; tunedMembers: string[];
broadcastMembers: string[]; broadcastMembers: string[];
}; } = undefined;
isUserTunedIn: boolean = false; isUserTunedIn: boolean = false;
isUserToggleTuned: boolean = false; isUserToggleTuned: boolean = false;
@@ -38,7 +38,7 @@ export function StabilityProvider({ children }: { children: React.ReactNode }) {
</div> </div>
); );
if (state.error || state.loading) if (state.error)
return ( return (
<div className="h-screen w-screen text-gray-400 bg-white flex-1 flex flex-col justify-center items-center"> <div className="h-screen w-screen text-gray-400 bg-white flex-1 flex flex-col justify-center items-center">
<span>{'sorry this is our bad. servers are rebooting... :('}</span> <span>{'sorry this is our bad. servers are rebooting... :('}</span>
@@ -204,14 +204,14 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
console.log(uniqueDevices); console.log(uniqueDevices);
}); });
navigator.mediaDevices // navigator.mediaDevices
.getUserMedia({ // .getUserMedia({
video: videoConstraints, // video: videoConstraints,
audio: true, // audio: true,
}) // })
.then((localMediaStream: MediaStream) => { // .then((localMediaStream: MediaStream) => {
setUserLocalStream(localMediaStream); // setUserLocalStream(localMediaStream);
}); // });
}, []); }, []);
console.log(`peer map: `, peerMap); console.log(`peer map: `, peerMap);
@@ -260,7 +260,7 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
return ( return (
<StreamProviderContext.Provider value={{ peerMap, userLocalStream }}> <StreamProviderContext.Provider value={{ peerMap, userLocalStream }}>
{/* handles stream connections */} {/* handles stream connections */}
{Object.values(roomsMap).map((line) => { {/* {Object.values(roomsMap).map((line) => {
if (line.tunedInMemberIds?.includes(user._id.toString())) if (line.tunedInMemberIds?.includes(user._id.toString()))
return ( return (
<MemoLineConnector <MemoLineConnector
@@ -274,7 +274,7 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
setLocalStreamForLine={setLocalStreamForLine} setLocalStreamForLine={setLocalStreamForLine}
/> />
); );
})} })} */}
{children} {children}
</StreamProviderContext.Provider> </StreamProviderContext.Provider>