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

21 lines
574 B
JavaScript
Raw Normal View History

export function getDisplayPlayMethod(session) {
2018-10-23 01:05:09 +03:00
if (!session.NowPlayingItem) {
return null;
}
if (session.TranscodingInfo && session.TranscodingInfo.IsVideoDirect) {
return 'DirectStream';
} else if (session.PlayState.PlayMethod === 'Transcode') {
return 'Transcode';
} else if (session.PlayState.PlayMethod === 'DirectStream') {
return 'DirectPlay';
} else if (session.PlayState.PlayMethod === 'DirectPlay') {
return 'DirectPlay';
2018-10-23 01:05:09 +03:00
}
}
export default {
getDisplayPlayMethod: getDisplayPlayMethod
};