hls-vedio
v1.0.1
Published
A simple Web Component for playing HLS (.m3u8) videos.
Downloads
5
Readme
HLS Video Player
A simple Web Component for playing HLS (.m3u8) videos.
Installation
Install via npm:
npm install hls-vedioUsage
Import the component into your project:
import "hls-vedio";Use the component in your HTML file:
<hls-video src="https://[your path]/video.m3u8" />Attributes
- src (required): URL of the HLS video to be played.
Example with Direct Mounting
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module">
import "./hls-vedio.js";
</script>
</head>
<body>
<hls-video src="https://[your path]/video.m3u8" />
</body>
</html>Notes
- This component uses Hls.js to implement HLS playback.
License
This project is licensed under the MIT License.
Please replace `[your path]` with the actual video path. Feel free to further customize the README according to your specific needs. I hope this helps!