npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ots-plex-overlay

v1.2.7

Published

Displays currently playing Plex media on stream.

Downloads

8

Readme

ots-plex-overlay

Part of OceaniTS, this is a browser-based overlay designed to be used with OBS that will show whatever media you are currently playing on your Plex server for viewers.

Usage

require("ost-plex-overlay")([options])

Before using Plex Overlay you will need to download and install Plex Media Server and get the Plex token associated with your account.

Simple Setup

The following will create an overlay at http://localhost:3032/plex-overlay/

const plexOverlay = require("ost-plex-overlay")({
    port: 3032,
    plex {
        hostname: "127.0.0.1",
        username: "YourPlexUsername",
        token: "Y0uRPl3xT0kEN"
    }
})

Advanced Setup (using existing Socket setup and listening on a new namespace)

The following will create an overlay at http://localhost:3052/custom-plex-overlay/

const app = require("express")(),
    http = require("http").createServer(app),
    io = require("socket.io")(http);

http.listen(3052, () => {
    // HTTP callback code
});

const PlexOverlay = require("ots-plex-overlay")({
    app: app,
    http: http,
    io: io,
    path: "/custom-plex-overlay",
    plex: {
        hostname: "127.0.0.1",
        username: "YourPlexUsername",
        token: "Y0uRPl3xT0kEN",
    },
});

OBS Setup

Once you have the overlay successfully running, navigate to where it is being served by the HTTP server and copy the URL into a new Browser Source in OBS and resize as necessary, then when you play something on your Plex account you should see something similar to the following:

The source will automatically fade out when you pause or stop media and fade in when you play again.

Styling

You can alter some CSS variables in OBS's Custom CSS panel to alter how the overlay looks.

Defaults

:root {
    /* Background */
    --background: none;

    /* Text styling */
    --font-family: "Open Sans", sans-serif;
    --font-weight: bold;
    --text-max-width: unset;
    --text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0
            #000, 1px 1px 0 #000;
    --text-stroke: none;

    /* Album art */
    --cover-size: 85vh;
    --cover-margin: 5vh;
    --cover-background: rgba(0, 0, 0, 0.5);
    --cover-radius: 5vh;

    /* Track info */
    --title-color: #fff;
    --artist-color: #999;
    --album-color: #ccc;
    --time-color: #ccc;
    --duration-color: #999;

    /* progress bar */
    --progress-bar-bg: rgba(0, 0, 0, 0.5);
    --progress-bar-fg: red;
}