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

nuxt-restream

v0.0.7

Published

Secure media content inside your Nuxt app

Readme

nuxt-restream

Restream is a module that allows you to create a stream of an audio/video file from the Firebase storage, protected from direct download through the client. Convenient to use if needed provide media files with restricted access such as purchase, subscription and avoid downloading the file directly from the Firebase storage on the client-side

Features

  • 🤓 Very easy to use
  • 🛡 Direct download protection
  • 🔥 Setup for Firebase Admin
  • 🟢 Nuxt 3

Quick setup

  1. Install nuxt-restream

    yarn add --dev nuxt-restream # or npm install --save-dev nuxt-restream
  2. Add it to the modules section of nuxt.config.ts

    import { defineNuxtConfig } from 'nuxt'
    
    export default defineNuxtConfig({
      modules: ['nuxt-restream']
    })
  3. Basic configuration restream setup for accessing Firebase Get JSON file with credential Admin Firebase

    import { defineNuxtConfig } from 'nuxt'
    
    export default defineNuxtConfig({     
      restream: {
        credential: './firebase-admin-sdk.json',
        storage: 'firebase-storage-name.appspot.com'
      }
    })
  4. Add src attribute with a link to server routes /api/restream with the ?f= parameter containing the path to the file in Firebase storage.

    <template>
      <div>
        <audio src="/api/restream?f=path_to/audio.mp3" typeof="audio/mp3" controls />
      </div>
    </template>

    Configuration

Restream supports a number of options, which you can pass in your nuxt.config.ts file:

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  // ...
  restream: {
    /**
     * Path (relative to your base URL) where the JSON file with Firebase admin credentials.
     * @example './assets/fearbook-c8d55-firebase-adminsdk-vbvi5-57b761f13c.json'
     * @default undefund
     */
    credential: string,

    /**
     * Firebase storage bucket url
     * @example 'fearbook-c8d55.appspot.com'
     * @default undefund
     */
    storage: string,

    /**
     * Base route that will be used for restream api
     * @example 'restream' -> 'api/restream?f=...'
     * @default 'restream' 
     */
    apiRouteName: string
  },
})

Licence

MIT Licence