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

crestron-mediaplayer-sdk

v0.1.1

Published

[![ci](https://github.com/Sight-and-Sound/Crestron-MediaPlayer-SDK/workflows/ci/badge.svg)](https://github.com/Sight-and-Sound/Crestron-MediaPlayer-SDK/actions/workflows/ci.yml)

Downloads

3

Readme

SDK package for CRPC, to integrate into a mediaplayer.

ci

Initial works from the MVP https://github.com/JayLiaProgramming/MediaPlayer rewrote into SDK-like package to hopefully in the future make integrations with the CRPC streams easy.

NOT READY FOR USE YET

TODO

  • [ ] Add service selection to automatically skip the main menu in the Browser.
  • [ ] Add search method which browses and inserts search query in the background with category selection like Artist, Track etc.
  • [ ] Create icon/art replacement/injection based on Level/Service and item Name, for example show icons for Tidal top categories as they would in the tidal app.
const container = new CrpcContainer('5db35e97-a379-46e4-ac32-6b16d5ed6d3e');

// When server sends data, run it into
container.pipeFromServer('{rpc data from server}');

// Whenever the SDK generates data, send it back to the server.
const subscription = container.pipeToServer.subscribe({
    next: (data: string) =>
    {
        // send "data" to server!
    },
});

// After setting this up, initialize (async method)
await container.initialize();

// Get browser and watch title, when subscribing to a property it should automatically be retrieved by the SDK
if (container.browser) {
    // Initialize browser before using it!
    container.browser.initialize();

    container.browser.title$.subscribe({
        next: (title: string) => console.log(`Received title: ${title}`),
    });

    container.browser.items$.subscribe({
        next: (items: ListItem[]) => {
            console.log('Received browsable items: ', items)
            
            // Select item
            items[0].select()
        },
    });

    container.browser.functions$.subscribe({
        next: (listFunctions: ListFunction[]) => {
            console.log('Received executable functions', listFunctions);
            
            // Execute function
            listFunctions[0].execute()
        }
    });
}

// Getting now playing lines
if (container.player) {
    container.player.initialize();
    container.player.textLines$.subscribe({
        next: (lines: string[]) =>
            console.log(`Received now playing text lines: ${lines.join(' - ')}`),
    });

    // Or start playing
    container.player.play();
}