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

use-player

v0.2.0

Published

React hook for Dacast Video Player.

Readme

Use Dacast Player

React hook for Dacast Video Player.

Commands

npm i use-player

Usage

import * as React from 'react';
import { usePlayer } from 'use-player';
const App = () => {

  let playerRef = React.useRef(null);
  let playerOptions = {
    autoplay: false, // default
    provider: 'universe', // default
  };
  usePlayer(playerRef, 'YOUR_CONTENT_ID_FROM_DACAST', playerOptions);

  return (
    <div ref={playerRef}></div>
  );
};

All player options

| Parameter | Type | Optional | Default | Description | |-|-|-|-|-| | provider | OVPProvider | No | 'universe' | 'vzaar', 'dacast', 'universe' or 'singularity'. | | width | number | Yes | 100% | Player width in pixels. Omit units. | | height | number | Yes | 100% | Player height in pixels. Omit units. | | player | Player | Yes | 'theo' | 'theo', 'vjs5' or 'jw' | | jwUrl | string | Yes | | | | hlsQualities | string | Yes | | | | autoplay | boolean | string | Yes | false | Play video once the player loads. | | kioskMode | boolean | string | Yes | false | Enable Kiosk mode. | | loop | boolean | string | Yes | false | Play video on repeat mode. | | playsinline | boolean | string | Yes | | | | startMute | boolean | string | Yes | false | Video starts muted. | | brandText | string | Yes | null | | | brandLink | string | Yes | null | | | disableControls | boolean | Yes | false | Disable the player control bar interaction. | | hideFullscreen | boolean | string | Yes | false | Hide the fullscreen control button. | | adPreRollUrl | string | Yes | | | | adMidRollUrl | string | Yes | | | | adMidRollTime | number | Yes | | | | adPostRollUrl | string | Yes | | | | showControlsForJSAds | boolean | string | Yes | | | | border | boolean | Yes | false | Shows a border line around the player. | | colourAccent | string | Yes | rgba(255, 255, 255, 0.4) | The color in hexadecimal format of elements such as video progress bar, volume bar and options background. | | colourBase | string | Yes | rgba(155, 155, 155, 0.3) | The theme main color in hexadecimal format, affects the player controls backgrounds. | | colourSet | string | Yes | | | | endText | string | Yes | null | Text to appear once the video playback finishes. | | endLink | string | Yes | null | Link to appear once the video playback finishes. | | showPlayButton | boolean | string | Yes | true | Show or hide the big play button over the video. Doesn't hide the play/pause button on the control bar. | | previewThumbs | boolean | string | Yes | true | Show a preview image of the video when the mouse hovers the video progress bar. | | preload | boolean | string | Yes | false | | | hideControls | boolean | string | Yes | false | Hides the control bar. | | socialSharing | string | Yes | | | | videoURL | string | Yes | null | | | setSubsBg | boolean | string | Yes | | | | brandOverlayFS | boolean | string | Yes | false | | | colourBg | string | Yes | null | | | playlistMode | string | Yes | null | | | continuousPlay | boolean | string | Yes | false | Whether the next video in a playlist will be autplayed. | | hideBuffering | boolean | string | Yes | false | | | language | string | Yes | 'en' | ISO 639-1 language code for localization | | skipButtonsTime | number | Yes | | | | objectFitCSS | ObjectFitCSS | Yes | 'fill' | 'fill', 'contain', 'cover', 'none' or 'scale-down'. | | hideMailCatcher | boolean | Yes | | | | lightWeight | boolean | Yes | | | | inplayertoken | string | Yes | | | | referrerToken | string | Yes | | | | signedKey | string | Yes | | | | subtitles | string | Yes | | | | relayGAEventsToParent | boolean | Yes | | | | ads | Ads | OldAds | No | | | | theme | ThemeInfo | No | | |

Example

https://codepen.io/turizoft/pen/RwoywBg