2020-05-21 15:28:19 +02:00
|
|
|
export function getDisplayPlayMethod(session) {
|
2018-10-23 01:05:09 +03:00
|
|
|
|
2020-05-21 15:28:19 +02:00
|
|
|
if (!session.NowPlayingItem) {
|
|
|
|
return null;
|
|
|
|
}
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2020-05-21 15:28:19 +02:00
|
|
|
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
|
|
|
}
|
2020-05-21 15:28:19 +02:00
|
|
|
}
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2020-05-21 15:28:19 +02:00
|
|
|
export default {
|
|
|
|
getDisplayPlayMethod: getDisplayPlayMethod
|
|
|
|
};
|