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 🙏

© 2026 – Pkg Stats / Ryan Hefner

chushi-player

v1.1.6

Published

A Pixel Streaming client library for Unreal Engine - 像素流客户端库

Readme

chushi-player

A Pixel Streaming client library for Unreal Engine (UE4/UE5).
像素流客户端库,用于 Unreal Engine 像素流媒体播放。

Installation

npm install chushi-player

Usage

Basic Example

import chushiApi from "chushi-player";

const { rtcPlayer, RTCEvent } = chushiApi;

// 设置配置(可选) rtcPlayer.setPlayerConfig({ scaleMultiple: 1, // 页面缩放倍数,针对大屏 printLog: false, // 是否打印日志 interceptMouseAndKeyBoard: false // 是否拦截鼠标键盘事件 });

// 连接到像素流服务 rtcPlayer.start('container-id', 'ws://your-signaling-server:port');

// 监听连接事件 rtcPlayer.on(RTCEvent.Connecting, () => { console.log('正在连接...'); });

rtcPlayer.on(RTCEvent.Connected, () => { console.log('连接成功'); // iOS 设备需要在连接成功后调用 play() // rtcPlayer.play(); });

rtcPlayer.on(RTCEvent.Disconnected, () => { console.log('连接断开'); });

// 接收 UE 客户端发送的数据 rtcPlayer.on(RTCEvent.ReceivedMsg, (msg) => { console.log('收到消息:', msg); });

// 发送消息到 UE 客户端 rtcPlayer.sendMSG({ type: 'your-message-type', data: 'your-data' });

// 断开连接 rtcPlayer.closeConnect();


### HTML Structure

```html
<div id="container-id" style="width: 100%; height: 100vh;"></div>

API Reference

rtcPlayer

Methods

  • start(elementId: string, websocketUrl: string)
    开始连接像素流服务

    • elementId: 容器元素的 ID
    • websocketUrl: 信令服务器的 WebSocket 地址
  • play()
    播放视频(主要用于 iOS 设备,需要在用户交互后调用)

  • closeConnect()
    断开像素流连接

  • setPlayerConfig(config: PlayerOption)
    设置播放器配置

    interface PlayerOption {
      scaleMultiple: number; // 页面缩放倍数
      printLog: boolean; // 是否打印日志
      interceptMouseAndKeyBoard: boolean; // 是否拦截鼠标键盘事件
    }
  • sendMSG(msg: Object)
    发送消息到 UE 客户端

  • on(event: string, callback: Function)
    监听事件

  • once(event: string, callback: Function)
    监听一次性事件

  • off(event: string, callback: Function)
    取消监听

Events

  • RTCEvent.Connecting - 正在连接
  • RTCEvent.Connected - 连接成功
  • RTCEvent.Disconnected - 连接断开
  • RTCEvent.ReceivedMsg - 接收到 UE 客户端发送的数据

Browser Support

  • Chrome (recommended)
  • Firefox
  • Safari
  • Edge

Requires WebRTC support.

License

MIT