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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user