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 🙏

© 2025 – Pkg Stats / Ryan Hefner

kpoint-angular-player

v0.0.16

Published

An Angular component for embeding KPOINT video in your Angular application.

Downloads

31

Readme

kpoint-angular-player

An Angular component for embeding KPOINT video in your Angular application.

Usage

npm install kpoint-angular-player

Advance Embedding Template

   <kpoint-player #player
      [domain]="'service.domain'"
      [videoId]="'gcc-id'"
      [height]="'360px'"
      [width]="'640px'"
      [personalizationInfo]="'bmFtZTpWaXJhdDthbW91bnQ6MTAwMDAwOw=='"
      [videoParams]="{search: 'false', toc: 'false'}"
      [onStateChange]="onStateChange"
      [onTimeupdate]="onTimeupdate"
      [onload]="onload"
      [onError]="onError"
    >
    </kpoint-player>

Dynamic Embedding Template

   <kpoint-player #player
      [domain]="'service.domain'"
      [videoId]="'gcc-id'"
      [height]="'360px'"
      [width]="'640px'"
      [packageId]="'package-id'"
      [personalizationInfo]="'bmFtZTpWaXJhdDthbW91bnQ6MTAwMDAwOw=='"
      [onStateChange]="onStateChange"
      [onTimeupdate]="onTimeupdate"
      [onload]="onload"
      [onError]="onError"
    >
    </kpoint-player>

Input Properties

Input Properties | Description | Default ---- | ----------- | ------- domain | Host name of your kPoint server. Typically of the form acme.kpoint.com. | "" videoId | Id of the video to load. | "" width | Set the width of the player | 640px height | Set the height of the player | 360px videoParams | Set the player parameters | {} widgetsConfig | Set the widgets configuration | {} packageId | Id of interactivity package created for the video | "" personalizationInfo | Base 64 encoded string of the personalized data | ""

Callback events

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

Events | Description ---- | ----------- onLoad | Called when media is loaded and ready to play. onError | Called when an error occurs whilst attempting to play media onStateChange | Called when playback state updates (-1: Not started yet, 0: Playback Over, 1: Playing, 2: Paused, 3: Buffering, 5: Replay) onTimeupdate | called when playback time updates

Method | Description ---- | ----------- playVideo | Plays video from current position. or if video has not started, starts video from beginning. pauseVideo | Pauses video at the current position. replayVideo | Replays video from the beginning. getCurrentTime |Returns current video position in milliseconds. getDuration | Returns the duration of the video in milliseconds. getPlayerInfo | Return the video information like kvtoken,video-hostname,etc. seekTo | Jumps to specific point in video. Time argument in specified in milliseconds. setAudio | Sets playback audio to specified language, available for the video (Language codes: 'hi': 'Hindi', 'en': 'English', 'mr': 'Marathi', 'te': 'Telgu'). For more follow ISO Language Code table.

Example of how to use callback props and Instance methods to control the player

import { Component, OnInit, ViewChild } from '@angular/core';
import { KpointAngularPlayerComponent } from 'kpoint-angular-player';

@Component({
  selector: 'app',
  template: `
    <button (click)="getVideoDuration()">Get Video Duration</button>
    <kpoint-player #player
      [domain]="'ktpl.kpoint.com'"
      [videoId]="'gcc-d9e8dbc3-5dfa-4f68-bf7a-97f25fb7632c'"
      [height]="'360px'"
      [width]="'640px'"
      [personalizationInfo]="'bmFtZTpWaXJhdDthbW91bnQ6MTAwMDAwOw=='"
      [videoParams]="{search: 'false', toc: 'false'}"
      [onStateChange]="onStateChange"
      [onTimeupdate]="onTimeupdate"
      [onload]="onload"
      [onError]="onError"
    >
    </kpoint-player>
  `,
})
export class AppComponent implements OnInit {
  @ViewChild('player', { static: true }) player!: KpointAngularPlayerComponent;

  ngOnInit() {}

  onTimeupdate = (timeMs: number) => {
    console.log('Time update, new time: ' + parseFloat(timeMs).toFixed(2));
  }

  onStateChange = (evt: any) => {
    console.log('onStateChange: ' + evt.data);
  }

  onError = (evt: any) => {
    console.log('onError: ' + evt.data);
  }

  Onload = () => {
    console.log('Video loaded');
  }

  getVideoDuration() {
    console.log(this.player.getDuration());
  }

  getPlayerInfo() {
    console.log(this.player.getPlayerInfo());
  }
  
  setAudio(langCode: any){
    console.log(this.player.setAudio(langCode));
  }

}

License

Angular is MIT licensed.