Update MPEG-TS IPTV handling to use native playback

Changed protocol detection for direct .ts IPTV streams from 'hls' to 'native', reflecting that modern browsers can play MPEG-TS streams without a special player. Updated documentation, README, and tests to clarify browser support and recommend requesting .m3u8 links for best compatibility.
This commit is contained in:
hibna
2025-11-04 05:34:29 +03:00
parent 15bfb01c33
commit c5ca776a60
4 changed files with 50 additions and 13 deletions
+3 -2
View File
@@ -73,11 +73,12 @@ export const detectVideoProtocol = (src: string): ProtocolDetectionResult => {
// MPEG-TS (IPTV) detection
// Check for .ts extension (Transport Stream used in IPTV)
// Note: These are direct TS streams, not HLS playlists, so we use native playback
if (lowerSrc.includes('.ts') || lowerSrc.match(/\.ts(\?|$)/)) {
return {
protocol: 'hls', // HLS player can handle MPEG-TS streams
protocol: 'native', // Use native video element for direct TS streams
isLive: true, // IPTV streams are typically live
needsSpecialPlayer: true,
needsSpecialPlayer: false, // Modern browsers can handle MPEG-TS directly
}
}