mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update nowplayingbar.js
This commit is contained in:
parent
6814d8e280
commit
062f7937c5
1 changed files with 9 additions and 9 deletions
|
@ -129,10 +129,10 @@
|
||||||
|
|
||||||
function bindEvents(elem) {
|
function bindEvents(elem) {
|
||||||
|
|
||||||
currentTimeElement = $('.nowPlayingBarCurrentTime', elem);
|
currentTimeElement = elem.querySelector('.nowPlayingBarCurrentTime');
|
||||||
nowPlayingImageElement = elem.querySelector('.nowPlayingImage');
|
nowPlayingImageElement = elem.querySelector('.nowPlayingImage');
|
||||||
nowPlayingTextElement = $('.nowPlayingBarText', elem);
|
nowPlayingTextElement = elem.querySelector('.nowPlayingBarText');
|
||||||
nowPlayingUserData = $('.nowPlayingBarUserDataButtons', elem);
|
nowPlayingUserData = elem.querySelector('.nowPlayingBarUserDataButtons');
|
||||||
|
|
||||||
unmuteButton = $('.unmuteButton', elem).on('click', function () {
|
unmuteButton = $('.unmuteButton', elem).on('click', function () {
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentTimeElement.html(timeText);
|
currentTimeElement.innerHTML = timeText;
|
||||||
|
|
||||||
updateNowPlayingInfo(state);
|
updateNowPlayingInfo(state);
|
||||||
}
|
}
|
||||||
|
@ -478,16 +478,16 @@
|
||||||
var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem) || '';
|
var nameHtml = MediaController.getNowPlayingNameHtml(state.NowPlayingItem) || '';
|
||||||
|
|
||||||
if (nameHtml.indexOf('<br/>') != -1) {
|
if (nameHtml.indexOf('<br/>') != -1) {
|
||||||
nowPlayingTextElement.addClass('nowPlayingDoubleText');
|
nowPlayingTextElement.classList.add('nowPlayingDoubleText');
|
||||||
} else {
|
} else {
|
||||||
nowPlayingTextElement.removeClass('nowPlayingDoubleText');
|
nowPlayingTextElement.classList.remove('nowPlayingDoubleText');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.NowPlayingItem.Id) {
|
if (state.NowPlayingItem.Id) {
|
||||||
nameHtml = '<a style="color:inherit;text-decoration:none;" href="' + LibraryBrowser.getHref(state.NowPlayingItem) + '">' + nameHtml + '</a>';
|
nameHtml = '<a style="color:inherit;text-decoration:none;" href="' + LibraryBrowser.getHref(state.NowPlayingItem) + '">' + nameHtml + '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
nowPlayingTextElement.html(nameHtml);
|
nowPlayingTextElement.innerHTML = nameHtml;
|
||||||
|
|
||||||
var url;
|
var url;
|
||||||
var imgHeight = 80;
|
var imgHeight = 80;
|
||||||
|
@ -540,10 +540,10 @@
|
||||||
|
|
||||||
if (nowPlayingItem.Id) {
|
if (nowPlayingItem.Id) {
|
||||||
ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) {
|
ApiClient.getItem(Dashboard.getCurrentUserId(), nowPlayingItem.Id).then(function (item) {
|
||||||
nowPlayingUserData.html(LibraryBrowser.getUserDataIconsHtml(item, false));
|
nowPlayingUserData.innerHTML = LibraryBrowser.getUserDataIconsHtml(item, false);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
nowPlayingUserData.html('');
|
nowPlayingUserData.innerHTML = '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue