Fix case sensitivity in protocol checks
This commit is contained in:
@@ -521,7 +521,7 @@ export class HtmlVideoPlayer {
|
||||
|
||||
if (enableHlsJsPlayer(options.mediaSource.RunTimeTicks, 'Video') && isHls(options.mediaSource)) {
|
||||
return this.setSrcWithHlsJs(elem, options, val);
|
||||
} else if (options.playMethod !== 'Transcode' && options.mediaSource.Container === 'flv') {
|
||||
} else if (options.playMethod !== 'Transcode' && options.mediaSource.Container?.toUpperCase() === 'FLV') {
|
||||
return this.setSrcWithFlvJs(elem, options, val);
|
||||
} else {
|
||||
elem.autoplay = true;
|
||||
|
||||
@@ -6,5 +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 {
|
||||
return (mediaSource?.TranscodingSubProtocol || mediaSource?.Container) === 'hls';
|
||||
const protocol = mediaSource?.TranscodingSubProtocol || mediaSource?.Container;
|
||||
return protocol?.toUpperCase() === 'HLS';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user