Skip to content

A self-hosted nightbot-like video player which can be used on streaming or others.

Notifications You must be signed in to change notification settings

NatLee/streaming-player

Repository files navigation

Streaming Player

Notice that here use package yt_dlp to get link of video on Youtube.

demo

This is an online player can be used on streaming.

Playlist

playlist

History

playlist-history

APIs

apis

Requirements

pip install -r requirements.txt

Usage

Quick Start

  1. Run the service.

    docker-compose up
  2. Go to http://localhost:7878/player/ and create the first user.

    Port is specified in docker-compose.yml file. Default is 7878.

  3. (Optional) Check Admin page.

    Go here http://localhost:7878/api/__hidden_admin .

    And you'll see the page below.

  4. (Optional) Check Swagger.

    Go here http://localhost:7878/api/__hidden_swagger/ .

  5. (Optional) Check player in frontend.

    See http://localhost:7878/player/

Interaction APIs

You can use the following APIs in streaming chat box to interact with your audience.

  • /player/nightbot/current Get current playing video.

  • /player/nightbot/current/poll Poll to stop current playing video.

  • /player/nightbot/order Order to play a video.

  • /player/nightbot/order/{user}/count Get the number of videos that user has ordered.

  • /player/nightbot/{song_pk_in_queue}/delete Delete a video with song's ID in queue.

  • /player/nightbot/{song_pk_in_queue}/insert Insert a video with song's ID in queue.

In Nightbot, you can add custom command with URL in command page.

Specify command !sr and give the message below.

$(urlfetch https://<YOUR_DOMAIN>/player/nightbot/order?user=$(user)&url=$(querystring))

Link

About

A self-hosted nightbot-like video player which can be used on streaming or others.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages