mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix case sensitivity in protocol checks
This commit is contained in:
parent
5a5a70dad0
commit
005bc0560f
2 changed files with 3 additions and 2 deletions
|
@ -521,7 +521,7 @@ export class HtmlVideoPlayer {
|
||||||
|
|
||||||
if (enableHlsJsPlayer(options.mediaSource.RunTimeTicks, 'Video') && isHls(options.mediaSource)) {
|
if (enableHlsJsPlayer(options.mediaSource.RunTimeTicks, 'Video') && isHls(options.mediaSource)) {
|
||||||
return this.setSrcWithHlsJs(elem, options, val);
|
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);
|
return this.setSrcWithFlvJs(elem, options, val);
|
||||||
} else {
|
} else {
|
||||||
elem.autoplay = true;
|
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.
|
* @returns _true_ if the media source is an HLS stream, _false_ otherwise.
|
||||||
*/
|
*/
|
||||||
export function isHls(mediaSource: MediaSourceInfo|null|undefined): boolean {
|
export function isHls(mediaSource: MediaSourceInfo|null|undefined): boolean {
|
||||||
return (mediaSource?.TranscodingSubProtocol || mediaSource?.Container) === 'hls';
|
const protocol = mediaSource?.TranscodingSubProtocol || mediaSource?.Container;
|
||||||
|
return protocol?.toUpperCase() === 'HLS';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue