0.1.2 • Published 7 months ago
ngx-video-cast v0.1.2
NgxVideoCast
NgxVideoCast is an Angular directive that enables seamless video casting functionality. With just a simple directive on the video tag, you can integrate video casting into your Angular application effortlessly.
Official Google Cast SDK Documentation
For more details about integrating Google Cast SDK in your application, please refer to the Official Google Cast SDK Documentation.
Features
- 🌟 Easy Integration: Add casting functionality with a single directive.
- 🔥 Lightweight: Minimal impact on your application's performance.
- 🛠️ Customizable: Easily extend and configure for your needs.
- 🎥 Supports Native Video Tag: Works directly with the HTML
<video>
element.
Installation
To install NgxVideoCast, use npm:
npm install ngx-video-cast
Required Inputs
Input | Type | Description |
---|---|---|
receiverApplicationId | string | The ID of the casting receiver application (mandatory). |
Optional Inputs
- The position and size of the cast button will be set relative to the video tag, meaning the button will be placed and adjusted inside the video's area on the screen.:
Input | Type | Description | Default Value |
---|---|---|---|
buttonPositionBottom | string | Sets the bottom position of the cast button. | '25px' |
buttonPositionRight | string | Sets the right position of the cast button. | '30px' |
buttonSize | string | Sets the size of the cast button. | '50px' |
Usage
- Import the
NgxVideoCastModule
in your Angular module:
import {NgxVideoCastModule} from "ngx-video-cast";
- Place the NgxVideoCastModule inside the module's imports:
imports: [
BrowserModule,
NgxVideoCastModule,
...
]
- Add the
ngxVideoCast
directive to the video tag and enjoy casting:
<video ngxVideoCast
[receiverApplicationId]="'YOUR RECEIVER APPLICATION ID'" <!-- Mandatory -->
[buttonPositionBottom]="'15px'" <!-- Optional -->
[buttonPositionRight]="'20px'" <!-- Optional -->
[buttonSize]="'30px'" <!-- Optional -->
src="YOUR_VIDEO_URL">
>
Contact & License
Creator: Jesus Laucho
Website: lauchoit.com
Email: contacto@lauchoit.com
License
This package, NgxVideoCast, is open-source and free to use under the MIT License. Contributions and feedback are always welcome!