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.
-
Auth:
Platform integrates the
Phoenix.Authmodule 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.Channelshandle 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-hookimplemented to manage replacing videos seamlessly. -
Player Agent for State Management:
Platform leverages the
Agentmodule to manage the state of the video player across the entire app.
Clone the repo:
git clone https://github.com/yakimenko73/syncit.git- Install and setup dependencies:
mix setup- Start Phoenix endpoint:
mix phx.serveror inside IEx:
iex -S mix phx.server- Build image with
MIX_ENVargument:
docker build --tag syncit --build-arg MIX_ENV=dev .- Create
.envfile and fill it according to the.env.sample
cat .env.sample >> .env- Run container:
docker run --net host --env-file .env syncitNow you can visit localhost:4000 from your browser.
