Gathering detailed insights and metrics for ngx-lite-vid
Gathering detailed insights and metrics for ngx-lite-vid
Gathering detailed insights and metrics for ngx-lite-vid
Gathering detailed insights and metrics for ngx-lite-vid
npm install ngx-lite-vid
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
11
ngx-lite-video is an Angular package that provides lazy loading capabilities for embedded iframes from popular video sharing platforms like YouTube and Vimeo. The package is designed to optimize the loading of embedded videos, improving page load times and reducing data usage.
The package is built specifically for Angular, utilizing Angular's onpush change detection strategy for efficient rendering and updating of video components. It also includes features such as customizable lazy loading thresholds and options for controlling video playback and display.
This package requires a minimum of Angular version 13 and rxjs version 7.2 to function properly.
Try it yourself by measuring the performance on Demo page
1npm install ngx-lite-video --save
Once installed, import the module that you wish to use in your desired module
1@NgModule({ 2 //... 3 imports: [ 4 //... 5 NgxLiteVimeoModule, // Vimeo lite module 6 NgxLiteYoutubeModule, // YouTube lite module 7 ], 8}) 9export class YourModule {}
To use ngx-lite-video, add the 'ngx-lite-youtube'/'ngx-lite-vimeo' component to your template and configure its properties as needed:
1<!-- YouTube Component --> 2<ngx-lite-youtube videoId="Ys7xdebd66Y"></ngx-lite-youtube> 3 4<!-- Vimeo Component --> 5<ngx-lite-vimeo videoId="786570322"></ngx-lite-vimeo>
To override styling create a class in global style.scss file & provide it to styleClass attribute
For more detailed examples see Demo page
Property | Type | Default | Description |
---|---|---|---|
videoId | string | undefined | Video ID to be viewed |
videoTitle | string | undefined | Title to be displayed in lazy mode |
hasControls | boolean | false | Shows/hides video controls in iframe |
loop | boolean | false | Enables video looping |
allowFullScreen | boolean | true | Enables/disables fullscreen button in iframe |
start | number | undefined | Sets starting video time (in seconds) |
end | number | undefined | Sets ending video time (in seconds) |
styleClass | string | undefined | External styling class |
thumbQuality | 'sd', 'medium', 'high', 'max' | 'high' | Lazy image quality |
Property | Type | Default | Description |
---|---|---|---|
videoId | string | undefined | Video ID to be viewed |
thumbQuality | 'sd', 'medium', 'high', 'max' | 'high' | Lazy image quality |
showTitle | boolean | false | Enables/disables showing title in lazy mode |
hasControls | boolean | false | Shows/hides video controls in iframe |
loop | boolean | false | Enables video looping |
isBackground | boolean | false | Enables vimeo background mode, please refer to https://developer.vimeo.com/player/sdk/embed |
styleClass | string | undefined | External styling class |
Contributions are welcome. You can start by creating new Issue with proposal or bug report.
ngx-lite-video is an open source package released under the MIT license. See the LICENSE file for more information.
No vulnerabilities found.
No security vulnerabilities found.