Skip to content

yakimenko73/syncit

Repository files navigation

Syncit

Pray for Ukraine Deploy

What is it?

Syncit is a simple collaborative video-watching platform that enables users to synchronize their YouTube video playback in soft real-time utilizing Elixir Phoenix Channels to establish WebSocket connections between users for bidirectional communication.

img.png

Features

  • Auth:

    Platform integrates the Phoenix.Auth module to provide a robust and secure authentication system for users accessing.

  • Pause and Resume:

    The system supports the ability to pause and resume video playback seamlessly across all connected clients. This is achieved by broadcasting pause and play events.

  • Seek Position Synchronization:

    When a user seeks to a specific position in the video, the Phoenix.Channels handle the synchronization of this action across all connected clients.

  • Dynamic Viewers Count Display:

    Through Phoenix.LiveView, the platform provides a dynamic display of the current number of viewers, ensuring that the count is updated in soft real-time as users join or leave site.

  • LiveView Hooks for Integration:

    Custom phx-hook implemented to manage replacing videos seamlessly.

  • Player Agent for State Management:

    Platform leverages the Agent module to manage the state of the video player across the entire app.

Built With

Getting Started

Installation

Clone the repo:

git clone https://github.com/yakimenko73/syncit.git

To start Phoenix server manually:

  1. Install and setup dependencies:
mix setup
  1. Start Phoenix endpoint:
mix phx.server

or inside IEx:

iex -S mix phx.server

Using Docker:

  1. Build image with MIX_ENV argument:
docker build --tag syncit --build-arg MIX_ENV=dev .
  1. Create .env file and fill it according to the .env.sample
cat .env.sample >> .env
  1. Run container:
docker run --net host --env-file .env syncit

Now you can visit localhost:4000 from your browser.