Add IPTV (.ts) stream support and tests
Introduced detection and support for MPEG-TS (.ts) IPTV streams in videoProtocol, updated documentation and examples to reflect IPTV support, and added comprehensive tests for protocol detection. Mock implementations for flv.js and hls.js were added for testing, and vitest config now aliases these libraries to their mocks.
This commit is contained in:
@@ -73,6 +73,7 @@ A feature-rich, modern video player library built with React, TypeScript, and Vi
|
||||
|
||||
### 🚀 Advanced Features
|
||||
- **HLS Streaming** - Automatic HLS.js integration for .m3u8 files
|
||||
- **IPTV Support** - MPEG-TS (.ts) streams for IPTV services
|
||||
- **HTTP Range Request** - Progressive download for large MP4 files
|
||||
- **Subtitles** - WebVTT and SRT support
|
||||
- **Multiple Audio Tracks** - Switch between different audio streams
|
||||
@@ -146,6 +147,15 @@ function App() {
|
||||
/>
|
||||
```
|
||||
|
||||
### IPTV Streaming
|
||||
|
||||
```tsx
|
||||
<VideoPlayer
|
||||
src="http://server.com:8080/live/username/password/12345.ts"
|
||||
poster="http://example.com/channel-logo.png"
|
||||
/>
|
||||
```
|
||||
|
||||
### Custom Theme
|
||||
|
||||
```tsx
|
||||
@@ -259,7 +269,7 @@ video-player/
|
||||
|
||||
| Prop | Type | Default | Description |
|
||||
|------|------|---------|-------------|
|
||||
| `src` | `string` | **required** | Video source URL (MP4, WebM, HLS) |
|
||||
| `src` | `string` | **required** | Video source URL (MP4, WebM, HLS, IPTV .ts) |
|
||||
| `poster` | `string` | - | Poster image URL |
|
||||
| `autoplay` | `boolean` | `false` | Auto-play video on load |
|
||||
| `loop` | `boolean` | `false` | Loop video playback |
|
||||
|
||||
Reference in New Issue
Block a user