All streaming platforms restrict the content available for its viewer . StreamVerse is a platform where users can upload videos audios and stream it seamlessly with there friends while chatting with them . It does not uses screen sharing therefore the video quality is not affected by the internet of admin and all viewers have control over their players and can sync their video with admin whenever they wish to do so. Platform also supports playlist creations , room creations with functionalities , seamless audio and video streaiming . video and audio download ,etc.
We wanted to log out users (if logged in) instantly on being suspended by admin. This seem difficult at first then we thought of using sockets for this. we assigned each user a room of their unique user id on logging in and whenever a user was suspended we emitted an event by admin to server with specifies email id of user to log him out which was then emitted back to the room that user was in with a command to log him out and we stored the user in a suspended user model in the db to restrict him from logging in again.
on every refresh a new socket is assigned to every user therefore a user in room would not be able to communiacate inthe same room after refreshing the page .Therefore , we stored the rooms in mongodb and its id was encrypted in local storage whenever a user joined any room. on refreshing the page we emitted a socket event "refresh-check" which joined the user again in the room they were in with hte new socket id
Discussion