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

@creaditor/media-player-web-component

v0.1.2

Published

### Keep the following in mind

Downloads

27

Readme

Creaditor Media Player

Keep the following in mind

this package use react-player

Installation

Node package

npm i styleit-api --save

Include the module in your application

import "@creaditor/media-player-web-component"

Add the tag in as dom element

<cdtr-media-player></cdtr-media-player>

Publish

Please build using npm run build

and then run npm publish

Props

| Prop | Description | Default | | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | | url | The url of a video or song to play  ◦  Can be an array or MediaStream object | | playing | Set to true or false to pause or play the media | false | | loop | Set to true or false to loop the media | false | | controls | Set to true or false to display native player controls.  ◦  For Vimeo videos, hiding controls must be enabled by the video owner. | false | | light | Set to true to show just the video thumbnail, which loads the full player on click  ◦  Pass in an image URL to override the preview image | false | | volume | Set the volume of the player, between 0 and 1  ◦  null uses default volume on all players #357 | null | | muted | Mutes the player  ◦  Only works if volume is set | false | | playbackRate | Set the playback rate of the player  ◦  Only supported by YouTube, Wistia, and file paths | 1 | | width | Set the width of the player | 640px | | height | Set the height of the player | 360px | | style | Add inline styles to the root element | {} | | progressInterval | The time between onProgress callbacks, in milliseconds | 1000 | | playsinline | Applies the playsinline attribute where supported | false | | pip | Set to true or false to enable or disable picture-in-picture mode  ◦  Only available when playing file URLs in certain browsers | false | | stopOnUnmount | If you are using pip you may want to use stopOnUnmount={false} to continue playing in picture-in-picture mode even after ReactPlayer unmounts | true | | fallback | Element or component to use as a fallback if you are using lazy loading | null | | wrapper | Element or component to use as the container element | div | | playIcon | Element or component to use as the play icon in light mode | | previewTabIndex | Set the tab index to be used on light mode | 0 | | config | Override options for the various players, see config prop |

Callback props

Callback props take a function that gets fired on various player events:

| Prop | Description | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | onReady | Called when media is loaded and ready to play. If playing is set to true, media will play immediately | | onStart | Called when media starts playing | | onPlay | Called when media starts or resumes playing after pausing or buffering | | onProgress | Callback containing played and loaded progress as a fraction, and playedSeconds and loadedSeconds in seconds  ◦  eg { played: 0.12, playedSeconds: 11.3, loaded: 0.34, loadedSeconds: 16.7 } | | onDuration | Callback containing duration of the media, in seconds | | onPause | Called when media is paused | | onBuffer | Called when media starts buffering | | onBufferEnd | Called when media has finished buffering  ◦  Works for files, YouTube and Facebook | | onSeek | Called when media seeks with seconds parameter | | onPlaybackRateChange | Called when playback rate of the player changed  ◦  Only supported by YouTube, Wistia, and file paths | | onEnded | Called when media finishes playing  ◦  Does not fire when loop is set to true | | onError | Called when an error occurs whilst attempting to play media | | onClickPreview | Called when user clicks the light mode preview | | onEnablePIP | Called when picture-in-picture mode is enabled | | onDisablePIP | Called when picture-in-picture mode is disabled |