2019-01-23 11:33:34 +00:00
|
|
|
define([], function () {
|
2019-01-10 15:39:37 +03:00
|
|
|
'use strict';
|
2018-10-23 01:05:09 +03:00
|
|
|
|
|
|
|
function getDisplayPlayMethod(session) {
|
2019-01-10 15:39:37 +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
|
|
|
}
|
2019-01-10 15:39:37 +03:00
|
|
|
|
2018-10-23 01:05:09 +03:00
|
|
|
return {
|
|
|
|
getDisplayPlayMethod: getDisplayPlayMethod
|
2019-01-10 15:39:37 +03:00
|
|
|
};
|
2018-10-23 01:05:09 +03:00
|
|
|
});
|