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

penpencil-player

v2.5.30

Published

PenpencilPlayer is HTML5 video player based ob videojs library. It gathers all the neccessary plugins or library at single place to play videos like:- Vimeo, Youtube , hls (m3us). PenpencilPlayer require angular v6 or above.

Downloads

717

Readme

PenpencilPlayer

npm version

PenpencilPlayer is based on videoJS library. You can install this via npm i penpencil-player

Description

PenpencilPlayer is HTML5 video player based on videoJS library. Basically, I build this player for my personal use, I just wanted a player which can play multiple video formats like: MP4, Youtube, HLS.

####Feature: i) Support Multiple video formats like: MP4, Youtube, HLS.

ii) Multiple video quality support for both HLS and MP4 sources.

iii) Dynamic watermarking including Text, Image and Link. (Combined or Individual)

iv) Forward and backward seek button compatibility.

v) Setting button with Quality and Speed options

v) Live video ui.

Note:- Because this library is only for personal use, I made lots of stuff hardcoded, like: Adding Plugins.

How to use

Step 1: Install the penpencil-player using npm i penpencil-player

Step 2: Paste these Styles and Script urls in your angular.json

"styles": [...
              "node_modules/video.js/dist/video-js.css",
              "node_modules/penpencil-player/videojs-seek-buttons/videojs-seek-buttons.css",
              "node_modules/penpencil-player/videojs-setting-menu/videojs-setting-menu.css",
              "node_modules/penpencil-player/videojs-watermark/videojs-watermark.css"
              ]

"scripts": [...
              "node_modules/video.js/dist/video.js",
              ""node_modules/@videojs/http-streaming/dist/videojs-http-streaming.js",
              "node_modules/penpencil-player/videojs-contrib-eme/videojs-contrib-eme.min.js",
              "node_modules/penpencil-player/videojs-youtube/videojs-youtube.min.js",
              "node_modules/penpencil-player/videojs-seek-buttons/videojs-seek-buttons.min.js",
              "node_modules/penpencil-player/videojs-setting-menu/videojs-setting-menu.min.js",
              "node_modules/penpencil-player/videojs-watermark/videojs-watermark.js",
              "node_modules/penpencil-player/videojs-liveui/videojs-liveui.min.js"
              ]

Step 3: Add PenpencilPalyerModule In AppModule

import: [..
  PenpencilPlayerModule
..
]

Step 4: Add PenpencilPlayer component in your html.

<rs-penpencil-player [playerConfig]="playerConfig"></rs-penpencil-player>

Step 5: Provide player config:

playerConfig = {
    poster: 'Poster Image Url',
    liveui: false,
    sources: [{
      src: 'Video source url',
      type: 'Video type' // video/mp4 (for mp4) ||application/x-mpegURL (for hls) || video/youtube (for youtube)
    }],
    autoplay: true,
    startTime: 0,
    fullScreenEnabled: false,
    fluid: boolean; // fluid || fill || responsive
    seekButtons: true, // Add plugin first
    seekSeconds: 2, // Add plugin first
    defaultQuality: 'auto', // Auto|'240'|'360'...
    encryptionUri: 'http://localhost:8000/v1/videos/get-hls-key?videoId=videoId', // For Secured HLS only
    query: '?key=value',
    headers: [
      {
        authorization: 'Bearer 14fe4f2003f7633b6366a660fb30200f5f95218ef52272b50644fa023ce245ea'
      }
    ], // For Secured HLS only
    watermark: { // Add plugin first
      text: string, 
      link: string, 
      imageUrl: string
    }
 };
 
 Chnage listner is being detected on player config, 
 If you want to update player src try this.
 
 playerConfig = {...} // replace your new player config with new video source
 
 Currently supported video type
  1: video/mp4 (for mp4)
  2: video/youtube (for youtube)
  3: application/x-mpegURL (for hls)

Step 5: Adding Plugins:

Download all the plugins and unzip it and paste all the plugins in project directory

i) Setting button for video quality and speed settings videojs-setting-menu-plugin.

"styles": [...
              "node_modules/penpencil-player/videojs-setting-menu/videojs-setting-menu.css"
              ]

"scripts": [...
              "node_modules/penpencil-player/videojs-setting-menu/videojs-setting-menu.min.js"
              ]

ii) Seek button for forward and backward videojs-seek-buttons-plugin.

"styles": [...
              "node_modules/penpencil-player/videojs-seek-buttons/videojs-seek-buttons.css"
              ]

"scripts": [...
              "node_modules/penpencil-player/videojs-seek-buttons/videojs-seek-buttons.min.js"
              ]

iii) Youtube video support videojs-youtube-plugin.

"scripts": [...
              "node_modules/penpencil-player/videojs-youtube/videojs-youtube.min.js"
              ]

iv) Dynamic watermarking videojs-watermark-plugin.

"styles": [...
              "node_modules/penpencil-player/videojs-watermark/videojs-watermark.css"
              ]

"scripts": [...
              "node_modules/penpencil-player/videojs-watermark/videojs-watermark.js"
              ]

v) Video live ui support videojs-liveui-plugin.

"scripts": [...
              "videojs-liveui/videojs-liveui.min.js"
              ]

vi) Video.js eme support videojs-eme-plugin.

"scripts": [...
              "node_modules/penpencil-player/videojs-contrib-eme/videojs-contrib-eme.min.js"
              ]

Credits (Using libraries and plugins)

videojs http-streaming videojs-hls-quality-selector videojs-contrib-quality-levels videojs-youtube videojs-seek-buttons