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';
|
2019-11-23 00:29:38 +09:00
|
|
|
} else if (session.PlayState.PlayMethod === 'Transcode') {
|
2019-01-10 15:39:37 +03:00
|
|
|
return 'Transcode';
|
2019-11-23 00:29:38 +09:00
|
|
|
} else if (session.PlayState.PlayMethod === 'DirectStream') {
|
2019-01-10 15:39:37 +03:00
|
|
|
return 'DirectPlay';
|
2019-11-23 00:29:38 +09:00
|
|
|
} else if (session.PlayState.PlayMethod === 'DirectPlay') {
|
2019-01-10 15:39:37 +03:00
|
|
|
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
|
|
|
};
|
2020-02-22 11:47:03 -05:00
|
|
|
});
|