Skip to content

Watch videos from ARTE and YouTube together with friends

License

Notifications You must be signed in to change notification settings

LucasHild/watchensemble

Repository files navigation

WatchEnsemble

Watch Ensemble allows you to watch videos together with your friends online. Watch Ensemble synchronizes video playback using a websocket.

Usage

go run main.go

docker build -t watchensemble .
docker run -p 8080:8080 watchensemble

Websocket Docs

Endpoint: /ws?clientId=EXAMPLE_ID

setPlaybackState: Report to server after user changed playback state or server tells client to change state

{
    "type": "setPlaybackState",
    "text": "playing|paused|waiting",
    "client": "<client>",
    "date": "..."
}

requestVideo: Client requests video by url

{
    "type": "requestVideo",
    "text": "<url>",
    "client": "<client>",
    "date": "..."
}

setVideoDetails: Server sends new video with details to all clients

{
    "type": "setVideoDetails",
    "videoDetails": {
        "title": {"de": "<video title>"},
        "description": {"de": "<video description>"},
        "url": {"de": "<video url>"},
        "languages": ["de"],
    },
    "client": "<client>",
    "date": "..."
}

jumpToTime: Report to server after user jumped to time and server transmits to all clients

{
    "type": "jumpToTime",
    "seconds": 163,
    "client": "<client>",
    "date": "..."
}

reportStatus: Clients reports every 5 seconds current status

{
    "type": "reportStatus",
    "status": {
        "playbackState": "playing|paused|waiting",
        "currentTime": 163
    },
    "client": "<client>",
    "date": "..."
}

Meta

Lucas Hild - https://lucas-hild.de
This project is licensed under the MIT License - see the LICENSE file for details

About

Watch videos from ARTE and YouTube together with friends

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published