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

Allow VideoStreamCopy for remote source fallback
Original-merge: 40e7dc9007
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
11 lines
460 B
TypeScript
11 lines
460 B
TypeScript
import type { MediaSourceInfo } from '@jellyfin/sdk/lib/generated-client';
|
|
|
|
/**
|
|
* Checks if the media source is an HLS stream.
|
|
* @param mediaSource The media source.
|
|
* @returns _true_ if the media source is an HLS stream, _false_ otherwise.
|
|
*/
|
|
export function isHls(mediaSource: MediaSourceInfo|null|undefined): boolean {
|
|
return mediaSource?.TranscodingSubProtocol?.toUpperCase() === 'HLS'
|
|
|| mediaSource?.Container?.toUpperCase() === 'HLS';
|
|
}
|