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
+6 -6
View File
@@ -5,16 +5,16 @@ describe('videoProtocol', () => {
describe('detectVideoProtocol', () => {
it('should detect MPEG-TS IPTV streams', () => {
const result = detectVideoProtocol('http://favoritv65.xyz:8080/live/Apollon45/HpjWrDa6gWWd/98925.ts')
expect(result.protocol).toBe('hls')
expect(result.protocol).toBe('native')
expect(result.isLive).toBe(true)
expect(result.needsSpecialPlayer).toBe(true)
expect(result.needsSpecialPlayer).toBe(false)
})
it('should detect .ts files with query parameters', () => {
const result = detectVideoProtocol('http://example.com/stream/video.ts?token=abc123')
expect(result.protocol).toBe('hls')
expect(result.protocol).toBe('native')
expect(result.isLive).toBe(true)
expect(result.needsSpecialPlayer).toBe(true)
expect(result.needsSpecialPlayer).toBe(false)
})
it('should detect HLS streams', () => {
@@ -75,8 +75,8 @@ describe('videoProtocol', () => {
expect(isHlsStream('http://example.com/stream.m3u8')).toBe(true)
})
it('should return true for IPTV .ts streams', () => {
expect(isHlsStream('http://favoritv65.xyz:8080/live/user/pass/98925.ts')).toBe(true)
it('should return false for IPTV .ts streams (they are native, not HLS)', () => {
expect(isHlsStream('http://favoritv65.xyz:8080/live/user/pass/98925.ts')).toBe(false)
})
it('should return false for non-HLS streams', () => {