0.0.7 • Published 4 years ago

ngx-video-scrolling v0.0.7

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

NgxVideoScrolling

An angular component allowing video scrubbing on scroll. This project is based on this CodePen.

Demo

Working demo here.

Installation

To install this library, run :

$ npm install ngx-video-scrolling

and then add it into your AppModule :

import { NgxVideoScrollingModule } from 'ngx-video-scrolling';

@NgModule({
  imports: [
    NgxVideoScrollingModule
  ],
  [ ... ]
})
export class AppModule { }

You can now use its component :

<ngx-video-scrolling [videoSource]="'../assets/test.mp4'"></ngx-video-scrolling>

Parameters

InputDefault ValueOptionalDescription
videoSourceundefinedfalseVideo file path
frameNumber0trueThe frame number to start the video from (in seconds)
frameDivider1000trueNumber of pixels to scroll to scrub one second
tooltips[]trueArray of tooltips (See tooltips section)

Tooltips

Show customizable tooltips on video

export class Tooltip {
  public className: string;           // Custom class
  public text: string;                // Tooltip text
  public position: 'left' | 'right';  // Whether the tooltip must be on the left or right of the video
  public videoTime: number;           // Time (in seconds) of the video at which the tooltip should appears
}
0.0.7

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago