Update MPEG-TS IPTV detection to use native playback

Changed protocol detection for .ts IPTV streams to prefer native playback instead of HLS.js, reflecting modern browser support for MPEG-TS. Updated related tests to match new behavior.
This commit is contained in:
hibna
2025-11-04 06:09:26 +03:00
parent 64bdb6c9f2
commit 38295bdf9c
2 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -74,12 +74,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
// We use HLS.js to transmux them as browsers don't support MPEG-TS natively
// Try native playback first as modern browsers support MPEG-TS
if (lowerSrc.includes('.ts') || lowerSrc.match(/\.ts(\?|$)/)) {
return {
protocol: 'hls', // Use HLS.js which can handle MPEG-TS transmuxing
protocol: 'native', // Try native playback first
isLive: true, // IPTV streams are typically live
needsSpecialPlayer: true, // Requires HLS.js for MPEG-TS transmuxing
needsSpecialPlayer: false, // Modern browsers support MPEG-TS
}
}