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

ngx-video-list-player

v13.0.2

Published

A simple Angular video player with video list. No dependecies. Only custom controls, css, ts and svgs. Youtube support

Downloads

23

Readme

NgxVideoListPlayer

This is an Angular module. It helps to integrate a video player with a video list. The video's base controls are disable and it uses custom controls for control video events.

Update

Support Youtube videos from v12.2.2

Info

No support for IE

Mobile browsers got different designe for an easier handling

In case of Youtube source, subtitles and PIP are not supported

npm downloads

Check out the demo!

Note: v13.0.2 is out and supports Angular 13!

Install

  1. Install by running npm install ngx-video-list-player

  2. Add NgxVideoListPlayerModule to your app.module.ts imports:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { NgxVideoListPlayerModule } from 'ngx-video-list-player';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxVideoListPlayerModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Important: This module uses custom SVGs, so import of these are REQUIRED!!

  1. Next step is to import these:

angular.json


"assets": [              
              {
                "glob": "**/*",
                "input": "./node_modules/ngx-video-list-player/assets",
                "output": "/assets/"
              }            
          ],

Important: folder contents of ./node_modules/ngx-video-list-player/assets always have to be in assets folder under root

  1. From v12.2.2 you have to install youtube-player package as devDependency if npm didn't install automatic: npm install @angular/youtube-player --save-dev

  2. From v12.2.2 you have to add Youtube API script to index.html: <script src="https://www.youtube.com/iframe_api"></script>

Basics

Usage

You can use this module easily after imports. Just use ngx-video-list-player tag in your html and give a config for it like an @Input(). For example:

app.component.html

<ngx-video-list-player [config]="config">

</ngx-video-list-player>

app.component.ts

import { IVideoConfig } from "ngx-video-list-player";

...

export class AppComponent {
    config: IVideoConfig = {
        sources: [
        {
            src: "{video1_src}",
            videoName: "{video1_name}",
            artist: "{video1_artist}"
        },
        //In case of Youtube
        {
            src: "xxxxxxxx", //e.g.: https://www.youtube.com/watch?v=xxxxxxxx
            videoName: "{video1_name}",
            artist: "{video1_artist}",
            isYoutubeVideo: true
        },
        {
            src: "{video2_src}",
            videoName: "{video2_name}",
            artist: "{video2_artist}"
        }]          
    };
...
}

Config properties

Inputs

| Property | Type | Description | --- | --- | --- | | config | IVideoConfig | Config: see below the details |

Outputs

| Property | Parameter | Description | --- | --- | --- | | onTimeUpdate | empty | Fire at each ontimeupdate event | | onCanPlay | empty | Fire at each onCanPlay event | | onLoadedMetadata | empty | Fire at each onLoadedMetadata event |

IVideoConfig

| Property | Type | Description | --- | --- | --- | | sources | IVideoSource[] | Video sources comes here | | isVideoLoader | boolean? | In case of slow source load you can use loader animation while waiting for first load. Default is true | | isAutoPlay | boolean? | If you set more than one source, afterwhen the video is over it plays the next video automatically. Default is false | | isFirstVideoAutoPlay | boolean? | The first video plays automatically when site is loaded. According to the browser's rules, the video will start in muted status in this case. Default is false | | videoListDisplayMode | string?: inline, block, none | You can override the video list responsive display logic for a fix display setting. !!This is not dynamic property | | volumeCookieName | string? | If you fill it, browser saves current volume as a cookie. The cookie's name depends on what you set | | videoIndexCookieName | string? | If you fill it, browser save current video index as a cookie. The cookie's name depends on what you set. Recommended to use unique cookie name in each tag | | subtitleText | string? | Dynamic property for subtitle container's header text. Default is Subtitles | | subtitleOffText | string? | Dynamic property for subtitle's turn off text. Default is Off |

IVideoSource

| Property | Type | Description | --- | --- | --- | | src | string | Video source path | | videoName | string? | Video name. Appear on top of the video and in the video list | | type | string? | Video type | | artist | string? | Video artist. Appear in the video list | | subtitles | IVideoSubtitle[]? | Video subtitles come here | | isYoutubeVideo | boolean? | Video source is Youtube link |

IVideoSubtitle

| Property | Type | Description | --- | --- | --- | | src | string | Subtitle source path | | name | string | Subtitle name. Appear on the subtitle list | | default | boolean? | Use the video player by default |