mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
fix(playback): narrow declared stream metadata
Entire-Checkpoint: f957cd9849e0
This commit is contained in:
1 parent
bbeb29b12b
commit
cd331c796c
2 files changed
+20
-5
No files matched your search
@@ -275,12 +275,12 @@ describe('playback diagnostics', () => {
|
||||
).toBe('m3u8');
|
||||
expect(
|
||||
getPlaybackMediaExtensionFromUrl(
|
||||
'http://portal.example/play/live.php?type=m3u8&stream=123'
|
||||
'http://portal.example/play/live.php?container=m3u8&stream=123'
|
||||
)
|
||||
).toBe('m3u8');
|
||||
expect(
|
||||
getPlaybackMediaExtensionFromUrl(
|
||||
'http://portal.example/play/live.php?output=ts&stream=123'
|
||||
'http://portal.example/play/live.php?ext=ts&stream=123'
|
||||
)
|
||||
).toBe('ts');
|
||||
expect(
|
||||
@@ -303,6 +303,24 @@ describe('playback diagnostics', () => {
|
||||
).toBe('m3u8');
|
||||
});
|
||||
|
||||
it('does not infer media extensions from generic type/output query metadata', () => {
|
||||
expect(
|
||||
getPlaybackMediaExtensionFromUrl(
|
||||
'http://portal.example/play/live.php?type=m3u8&stream=123'
|
||||
)
|
||||
).toBe('');
|
||||
expect(
|
||||
getPlaybackMediaExtensionFromUrl(
|
||||
'http://portal.example/play/live.php?output=ts&stream=123'
|
||||
)
|
||||
).toBe('');
|
||||
expect(
|
||||
getPlaybackMediaExtensionFromUrl(
|
||||
'http://portal.example/play/live.php?format=mpv&stream=123'
|
||||
)
|
||||
).toBe('');
|
||||
});
|
||||
|
||||
it('detects codecs with limited Chromium browser-player support', () => {
|
||||
expect(
|
||||
getLikelyBrowserUnsupportedCodecLabels({
|
||||
|
||||
@@ -129,8 +129,6 @@ const DECLARED_MEDIA_EXTENSION_QUERY_KEYS = [
|
||||
'ext',
|
||||
'format',
|
||||
'container',
|
||||
'type',
|
||||
'output',
|
||||
];
|
||||
|
||||
const DECLARED_MEDIA_EXTENSION_ALIASES = new Map([
|
||||
@@ -149,7 +147,6 @@ const DECLARED_MEDIA_EXTENSIONS = new Set([
|
||||
'mp3',
|
||||
'mp4',
|
||||
'mpd',
|
||||
'mpv',
|
||||
'oga',
|
||||
'ogg',
|
||||
'ogv',
|
||||
|
||||
Reference in new issue
Block a user