Files
jellyfin-web/src/bower_components/emby-webcomponents/playback/playmethodhelper.js
T
2019-01-23 11:33:34 +00:00

27 lines
698 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
};
});