chore(lint): satisfy CI lint and CodeQL in DASH support files

- replace shell-built tar/npm commands with execFileSync arg arrays in
  the fixture generator (CodeQL: uncontrolled shell command)
- give jest stub methods explicit bodies (no-empty-function)
- compact the diagnostic label switches in WebPlayerViewComponent to
  stay under the max-lines budget

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-07-23 23:40:40 +02:00
1 parent 95bd7f7fe0
commit c19c639ef2
3 files changed
+26 -29

No files matched your search

@@ -370,34 +370,24 @@ export class WebPlayerViewComponent {
}
private formatPlayer(player: PlaybackDiagnostic['player']): string {
switch (player) {
case 'videojs':
return 'Video.js';
case 'html5':
return 'HTML5';
case 'artplayer':
return 'ArtPlayer';
default:
return '';
}
const labels: Record<string, string> = {
videojs: 'Video.js',
html5: 'HTML5',
artplayer: 'ArtPlayer',
};
return (player && labels[player]) || '';
}
private formatDiagnosticSource(
source: PlaybackDiagnostic['source']
): string {
switch (source) {
case 'hls':
return 'HLS.js';
case 'mpegts':
return 'mpegts.js';
case 'native':
return 'Native media element';
case 'shaka':
return 'Shaka Player';
case 'source':
return 'Stream metadata';
default:
return source;
}
const labels: Record<string, string> = {
hls: 'HLS.js',
mpegts: 'mpegts.js',
native: 'Native media element',
shaka: 'Shaka Player',
source: 'Stream metadata',
};
return labels[source] ?? source;
}
}