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

@interactify-live/player-react-native

v1.0.3

Published

React Native library for Interactify player with media display, widgets, and MQTT integration

Readme

@interactify-live/player-react-native

React Native library for Interactify player with media display, interactive widgets, and real-time MQTT integration.

Installation

This library requires react-native-video as a peer dependency. Install it first:

npm install react-native-video
# or
yarn add react-native-video

Then install this library:

npm install @interactify-live/player-react-native
# or
yarn add @interactify-live/player-react-native

Peer Dependencies

  • react: >=16.8.0
  • react-native: >=0.60.0
  • react-native-video: >=5.0.0

Quick Start

import React from "react";
import { InteractifyPlayer } from "@interactify-live/player-react-native";

const App = () => {
  const media = {
    id: "test-stream",
    type: "video",
    url: "https://example.com/video.mp4",
  };

  const interactions = [
    {
      interaction: "text",
      geometric: {
        x: 20,
        y: 20,
        width: 200,
        height: 50,
      },
      payload: {
        text: "Amazing Video!",
        size: 18,
        color: "#ffffff",
        background: "rgba(0,0,0,0.8)",
        borderRadius: 8,
      },
    },
  ];

  const options = {
    user_id: "USER_ID",
    token: "TOKEN",
    scope: "short",
    space_slug: "SPACE_SLUG",
    slug: "SLUG",
    session: "SESSION",
  };

  return (
    <InteractifyPlayer
      media={media}
      interactions={interactions}
      autoPlay={true}
      muted={true}
      loop={true}
      isDraggable={true}
      options={options}
      onPlay={() => console.log("Started playing")}
      onPause={() => console.log("Paused")}
      onError={(error) => console.error("Error:", error)}
      onStatusChange={(status) => console.log("Connection:", status)}
      onNewMessageReceived={(message) => console.log("Message:", message)}
    />
  );
};

API Reference

InteractifyPlayer Props

interface InteractifyPlayerProps {
  // Media configuration
  media: {
    id: string;
    type: "video" | "image";
    url: string;
    thumbnail?: string;
    alt?: string;
  };

  // Interactive widgets configuration
  interactions: any[];

  // Media playback options
  autoPlay?: boolean;
  muted?: boolean;
  loop?: boolean;
  isDraggable?: boolean;

  // Event handlers
  onPlay?: () => void;
  onPause?: () => void;
  onEnded?: () => void;
  onTimeUpdate?: (time: number) => void;
  onError?: (error: Error) => void;
  onInteractionClick?: (interaction: any) => void;
  onInteractionDragEnd?: (
    index: number,
    geometric: { x: number; y: number; width: number; height: number }
  ) => void;
  onVideoReady?: (videoRef: any) => void;

  // UI customization
  loadingIndicator?: ReactNode;
  errorIndicator?: ReactNode;
  className?: string;
  style?: any;

  // MQTT connection options
  options?: {
    user_id: string;
    token: string;
    scope: "short" | "live";
    space_slug: string;
    slug: string;
    session: string;
    brokerUrl?: string;
  };

  // MQTT event handlers
  onStatusChange?: (status: string) => void;
  onNewMessageReceived?: (message: any) => void;
}

InteractifyPlayerHandle Methods

interface InteractifyPlayerHandle {
  // Media control
  play: () => void;
  pause: () => void;
  mute: () => void;
  unmute: () => void;
  getCurrentTime: () => number;
  setCurrentTime: (time: number) => void;
  isMuted: () => boolean;
  isPlaying: () => boolean;

  // Widget management
  setInteractions: (interactions: any[]) => void;

  // Video element access
  getVideoElement: () => any;
  loadStream: (stream: any) => void;

  // MQTT actions
  publishEvent: (type: string) => void;
  sendMessage: (message: {
    text: string;
    avatar?: string;
    displayName?: string;
    visible?: boolean;
    replyTo?: {
      text: string;
      userID: string;
      displayName: string;
    };
  }) => void;
  subscribeToNewMessages: (callback: (message: any) => void) => () => void;
}

Using with Ref

import React, { useRef } from "react";
import {
  InteractifyPlayer,
  InteractifyPlayerHandle,
} from "@interactify-live/player-react-native";

const App = () => {
  const playerRef = useRef<InteractifyPlayerHandle>(null);

  const handleLike = () => {
    playerRef.current?.publishEvent("like");
  };

  const handleSendMessage = () => {
    playerRef.current?.sendMessage({
      text: "Hello from React Native!",
      displayName: "User",
      avatar: "https://example.com/avatar.jpg",
    });
  };

  return (
    <InteractifyPlayer
      ref={playerRef}
      media={media}
      interactions={interactions}
      options={options}
      // ... other props
    />
  );
};

Features

  • 🎥 Media Display: Video and image playback with HLS support
  • 🎨 Interactive Widgets: Text overlays and interactive elements with drag, resize, and rotation
  • 🔌 MQTT Integration: Real-time messaging and analytics
  • 📱 React Native Optimized: Built specifically for mobile apps
  • 🎮 Event Handling: Comprehensive event system for media and interactions
  • 🎯 TypeScript Support: Full type safety and IntelliSense

License

MIT