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
currentBroadcastersUserIds?: string[];
profilePictures: {
profilePictures?: {
allMembers: string[];
allMembersWithoutMe: string[];
@@ -32,7 +32,7 @@ export default class MasterLineData {
tunedMembers: string[];
broadcastMembers: string[];
};
} = undefined;
isUserTunedIn: boolean = false;
isUserToggleTuned: boolean = false;
@@ -38,7 +38,7 @@ export function StabilityProvider({ children }: { children: React.ReactNode }) {
</div>
);
if (state.error || state.loading)
if (state.error)
return (
<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>
@@ -204,14 +204,14 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
console.log(uniqueDevices);
});
navigator.mediaDevices
.getUserMedia({
video: videoConstraints,
audio: true,
})
.then((localMediaStream: MediaStream) => {
setUserLocalStream(localMediaStream);
});
// navigator.mediaDevices
// .getUserMedia({
// video: videoConstraints,
// audio: true,
// })
// .then((localMediaStream: MediaStream) => {
// setUserLocalStream(localMediaStream);
// });
}, []);
console.log(`peer map: `, peerMap);
@@ -260,7 +260,7 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
return (
<StreamProviderContext.Provider value={{ peerMap, userLocalStream }}>
{/* handles stream connections */}
{Object.values(roomsMap).map((line) => {
{/* {Object.values(roomsMap).map((line) => {
if (line.tunedInMemberIds?.includes(user._id.toString()))
return (
<MemoLineConnector
@@ -274,7 +274,7 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
setLocalStreamForLine={setLocalStreamForLine}
/>
);
})}
})} */}
{children}
</StreamProviderContext.Provider>