This server is useful in this hard time of quarantine period. Using this server, stream all your entertainment content over your LAN so that others can enjoy without using internet or copying the file over their device, while maintaining a social distance.
It has features like:
- Impressive and Responsive UI.
- Join or Create Room, or watch personally.
- Synchronised Video Playback in the room across all members.
- Controls of the video will be controled by the Leader (one who created the room by default).
- Real-time messaging in the Room so everyone can share their thoughts.
Follow below steps in order to setup project:
- Install
ffmpeg
for your respective OS. - Run
npm i
to install node packages. - Setup
dotenv
file (information given below). - Edit
- (LINUX / MAC)
terminal/bash/stream
- (WINDOWS)
terminal/cmd/stream.cmd
.
- (LINUX / MAC)
You need to rename sample.env
to .env
located in ROOT/backend/
folder. You need to modify SECRET_KEY
to prevent tampering of session cookie.
SECRET_KEY=a secret string for session
This project comes with a custom build CLI menu to help users setup the project configuration at ease.
Edit following shell files based on OS.
- LINUX / MAC)
terminal/bash/stream
. - (WINDOWS)
terminal/cmd/stream.cmd
.
and add the root path of the project, i.e., path to index.js
. Edit the following line:
(LINUX / MAC)
node "/path/to/project/index.js" $*
(WINDOWS)
node "/path/to/project/index.js" %*
This files allows the user to start the server any place on any directory using Terminal or Command Prompt.
After completing the steps mentioned above, you will be able to configure the root directory of the media and pass kwargs and args from cli itself.
TODO
I have introduced a searching algoritm which does the job pretty well. To give queries more power and flexibility, I have added string manipulation. You can produce multiple query strings to get result for them using just single string.
To use this functionality, you just need to use &
in the strings. In order to produce complex strings, you can use parentheses ()
. Here are some examples below:
"A(B(Z&X)&C)D(E&F)GH&JK" = [
"ABZDEGH",
"ABXDEGH",
"ABZDFGH",
"ABXDFGH",
"ACDEGH",
"ACDFGH",
"JK"
]
"(Bubble&Merge&Insertion) Sort" = [
"Bubble Sort",
"Merge Sort",
"Insertion Sort"
]
- Need to escape
&
. - Add param for
tn
. - Re-write
getFile()
. - Fix videos inside a folder in search.
- Accept params in js except batch.
- Modulate routes in separate files.
- Delete Folder's Thumbnails.
- Browser boolean not working in terminal.
- Write
help
command. - Catch the error when the file is deleted from the system but not from the db.
- Make the filenames URL safe as some filenames might contains + and other URL characters.
- For now, there is no way to escape
&
in search query.(NEED FIX)
.