mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes #1529 - Request for User Playback details improvement
This commit is contained in:
parent
ab6ae0dd18
commit
f7f42a9777
1 changed files with 38 additions and 29 deletions
|
@ -352,8 +352,6 @@
|
|||
|
||||
html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(session) + '</div>';
|
||||
|
||||
html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(session) + '</div>';
|
||||
|
||||
//if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
|
||||
|
||||
// html += '<div class="sessionTranscodingFramerate">' + session.TranscodingInfo.Framerate + ' fps</div>';
|
||||
|
@ -391,8 +389,13 @@
|
|||
// cardScalable
|
||||
html += '</div>';
|
||||
|
||||
html += '<div style="padding:1em;border-top:1px solid #eee;background:#fff;text-align:center;text-transform:uppercase;display:flex;align-items:center;justify-content:center;">';
|
||||
html += '<div style="padding:1em;border-top:1px solid #eee;background:#fff;text-align:center;">';
|
||||
|
||||
html += '<div class="sessionNowPlayingStreamInfo" style="padding:0 0 1em;">';
|
||||
html += DashboardPage.getSessionNowPlayingStreamInfo(session);
|
||||
html += '</div>';
|
||||
|
||||
html += '<div style="display:flex;align-items:center;justify-content:center;text-transform:uppercase;">';
|
||||
var userImage = DashboardPage.getUserImage(session);
|
||||
if (userImage) {
|
||||
html += '<img style="border-radius:50px;margin-right:.5em;" src="' + userImage + '" />';
|
||||
|
@ -404,6 +407,7 @@
|
|||
html += DashboardPage.getUsersHtml(session) || ' ';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
// cardBox
|
||||
html += '</div>';
|
||||
|
@ -422,17 +426,21 @@
|
|||
var html = '';
|
||||
|
||||
//html += '<div>';
|
||||
|
||||
var showTranscodingInfo = false;
|
||||
if (session.TranscodingInfo && session.TranscodingInfo.IsAudioDirect && session.TranscodingInfo.IsVideoDirect) {
|
||||
html += Globalize.translate('LabelPlayMethodDirectStream');
|
||||
}
|
||||
else if (session.TranscodingInfo && session.TranscodingInfo.IsVideoDirect) {
|
||||
html += Globalize.translate('LabelPlayMethodDirectStream');
|
||||
}
|
||||
else if (session.PlayState.PlayMethod == 'Transcode') {
|
||||
html += Globalize.translate('LabelPlayMethodTranscoding');
|
||||
|
||||
if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
|
||||
|
||||
html += ' - ' + session.TranscodingInfo.Framerate + ' fps';
|
||||
html += ' (' + session.TranscodingInfo.Framerate + ' fps' + ')';
|
||||
}
|
||||
showTranscodingInfo = true;
|
||||
}
|
||||
else if (session.PlayState.PlayMethod == 'DirectStream') {
|
||||
html += Globalize.translate('LabelPlayMethodDirectPlay');
|
||||
|
@ -443,41 +451,42 @@
|
|||
|
||||
//html += '</div>';
|
||||
|
||||
//if (session.TranscodingInfo) {
|
||||
if (showTranscodingInfo) {
|
||||
|
||||
// html += '<br/>';
|
||||
var line = [];
|
||||
|
||||
// var line = [];
|
||||
if (session.TranscodingInfo.Bitrate) {
|
||||
|
||||
// if (session.TranscodingInfo.Container) {
|
||||
if (session.TranscodingInfo.Bitrate > 1000000) {
|
||||
line.push((session.TranscodingInfo.Bitrate / 1000000).toFixed(1) + ' Mbps');
|
||||
} else {
|
||||
line.push(Math.floor(session.TranscodingInfo.Bitrate / 1000) + ' kbps');
|
||||
}
|
||||
}
|
||||
if (session.TranscodingInfo.Container) {
|
||||
|
||||
// line.push(session.TranscodingInfo.Container);
|
||||
// }
|
||||
// if (session.TranscodingInfo.Bitrate) {
|
||||
line.push(session.TranscodingInfo.Container);
|
||||
}
|
||||
|
||||
// if (session.TranscodingInfo.Bitrate > 1000000) {
|
||||
// line.push((session.TranscodingInfo.Bitrate / 1000000).toFixed(1) + ' Mbps');
|
||||
// } else {
|
||||
// line.push(Math.floor(session.TranscodingInfo.Bitrate / 1000) + ' kbps');
|
||||
// }
|
||||
// }
|
||||
// if (line.length) {
|
||||
if (session.TranscodingInfo.VideoCodec) {
|
||||
|
||||
// html += '<div>' + line.join(' ') + '</div>';
|
||||
// }
|
||||
//line.push(Globalize.translate('LabelVideoCodec').replace('{0}', session.TranscodingInfo.VideoCodec));
|
||||
line.push(session.TranscodingInfo.VideoCodec);
|
||||
}
|
||||
if (session.TranscodingInfo.AudioCodec && session.TranscodingInfo.AudioCodec != session.TranscodingInfo.Container) {
|
||||
|
||||
// if (session.TranscodingInfo.VideoCodec) {
|
||||
//line.push(Globalize.translate('LabelAudioCodec').replace('{0}', session.TranscodingInfo.AudioCodec));
|
||||
line.push(session.TranscodingInfo.AudioCodec);
|
||||
}
|
||||
|
||||
// html += '<div>' + Globalize.translate('LabelVideoCodec').replace('{0}', session.TranscodingInfo.VideoCodec) + '</div>';
|
||||
// }
|
||||
// if (session.TranscodingInfo.AudioCodec && session.TranscodingInfo.AudioCodec != session.TranscodingInfo.Container) {
|
||||
if (line.length) {
|
||||
|
||||
// html += '<div>' + Globalize.translate('LabelAudioCodec').replace('{0}', session.TranscodingInfo.AudioCodec) + '</div>';
|
||||
// }
|
||||
html += ' - ' + line.join(' ');
|
||||
}
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
return html;
|
||||
return html || ' ';
|
||||
},
|
||||
|
||||
getSessionNowPlayingTime: function (session) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue