Skip to content

Web application with synchronized player for watching YouTube, Anime and other videos with friends.

Notifications You must be signed in to change notification settings

FallenAstaroth/varus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗺️ Navigation

📄 Current features

  1. Sites that the player supports:
  1. Synchronization of the following actions:
  • Play
  • Pause
  • Rewind
  1. Synchronization of the video player time during playback and rewind events.
  2. Chat, as well as its overlay version (pc only) when the player is opened full screen.

🛠️ Deployment

⚙️ Backend

  1. Open cmd.
  2. Type in the command:
pip install virtualenv
  1. Go to the backend folder:
cd path/to/folder
  1. Create a virtual environment:
virtualenv venv
  1. Activate the virtual environment:

Windows:

call venv/Scripts/activate

Linux:

source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Replace the host, port, and origin fields with your own in the file backend/src/misc.py.
  2. Start the server with the command:

Windows:

set PYTHONPATH=path/to/varus/project && python path/to/app.py

Linux:

PYTHONPATH=path/to/varus/project python path/to/app.py

👁️ Frontend

  1. Open cmd.
  2. Go to the frontend folder:
cd path/to/folder
  1. Install the modules:
npm install
npm install --global serve
  1. Replace the backend url field in the file frontend/src/globals.js.
  2. Create an application build:
npm run build
  1. Start the application:
serve -s path/to/frontend/folder/dist -l 5000

💻 Service creation

To avoid starting the application manually after every server reboot, you can create services.

  1. Open cmd.
  2. Go to the system folder:
cd /etc/systemd/system/
  1. Create a backend service file:
nano varus.backend.service
  1. Paste the service code and replace the paths in it:
[Unit]
Description=Varus backend service
After=network.target

[Service]
User=root
Group=root
WorkingDirectory=/root/varus
Environment="PATH=/root/varus/backend/venv/bin"
Environment="PYTHONPATH=/root/varus"
ExecStart=/root/varus/backend/venv/bin/python /root/varus/backend/src/app.py

[Install]
WantedBy=multi-user.target
  1. Save all and close the file.
  2. Create a frontend service file:
nano varus.frontend.service
  1. Paste the service code and replace the paths in it:
[Unit]
Description=Varus frontend service
After=network.target

[Service]
User=root
Group=root
WorkingDirectory=/root/varus/frontend/dist
ExecStart=/usr/bin/serve -s /root/varus/frontend/dist -l 80

[Install]
WantedBy=multi-user.target
  1. Save all and close the file.
  2. Reload daemon:
systemctl daemon-reload
  1. Enable services:
systemctl enable varus.backend.service
systemctl enable varus.frontend.service
  1. Start services:
systemctl start varus.backend.service
systemctl start varus.frontend.service
  1. Check if services are running:
systemctl status varus.backend.service
systemctl status varus.frontend.service