
* enable one-var rule * enable indent rule * enable no-multiple-empty-lines rule * enable no-empty rule * enable no-trailing-spaces rule * enable no-extra-semi rule * add eslint rules to fix block spacing * enable max-statements-per-line rule * enable brace-style rule * fix some spacing issues and add future rules * add code suggestions
24 lines
No EOL
674 B
JavaScript
24 lines
No EOL
674 B
JavaScript
define([], function () {
|
|
'use strict';
|
|
|
|
function getDisplayPlayMethod(session) {
|
|
|
|
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';
|
|
}
|
|
}
|
|
|
|
return {
|
|
getDisplayPlayMethod: getDisplayPlayMethod
|
|
};
|
|
}); |