1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Simplify syntax

Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
This commit is contained in:
gnattu 2024-05-30 00:12:16 +08:00 committed by GitHub
parent a67fd2e5ac
commit 3a0be7d345
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,9 +6,6 @@ import type { MediaSourceInfo } from '@jellyfin/sdk/lib/generated-client';
* @returns _true_ if the media source is an HLS stream, _false_ otherwise.
*/
export function isHls(mediaSource: MediaSourceInfo|null|undefined): boolean {
if (mediaSource?.TranscodingSubProtocol?.toUpperCase() === 'HLS') {
return true;
}
return mediaSource?.Container?.toUpperCase() === 'HLS';
return mediaSource?.TranscodingSubProtocol?.toUpperCase() === 'HLS'
|| mediaSource?.Container?.toUpperCase() === 'HLS';
}