1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Allow notification display when video playing

Users can interact with notifications in windowed mode
This commit is contained in:
Tim Hobbs 2014-03-17 16:59:25 -07:00
parent 37fb510a2d
commit d48854dda8
3 changed files with 24 additions and 4 deletions

View file

@ -686,6 +686,11 @@ h1 .imageLink {
height: 50px; height: 50px;
} }
.footerNotifications {
height: 50px;
margin: 0 2px 2px 2px;
}
.footerNotification { .footerNotification {
text-shadow: none; text-shadow: none;
padding: 0 1em .75em; padding: 0 1em .75em;

View file

@ -234,6 +234,8 @@
$("#videoBackdrop", footer).show(); $("#videoBackdrop", footer).show();
footer.css("height", "0");
var videoPlayer = $("#videoPlayer", footer) var videoPlayer = $("#videoPlayer", footer)
//.hide() //.hide()
.append(nowPlayingBar); .append(nowPlayingBar);

View file

@ -292,7 +292,7 @@ var Dashboard = {
options.id = options.id || "notification" + new Date().getTime() + parseInt(Math.random()); options.id = options.id || "notification" + new Date().getTime() + parseInt(Math.random());
var footer = $("#footer").show(); var footer = $("#footer").css("height", "50px");
var parentElem = $('#footerNotifications', footer); var parentElem = $('#footerNotifications', footer);
@ -309,7 +309,16 @@ var Dashboard = {
} }
if (options.forceShow) { if (options.forceShow) {
elem.show(); elem.slideDown(400);
}
var videoBackdrop = $("#videoBackdrop");
var isPlaying = false;
if (videoBackdrop.is(":visible")) {
videoBackdrop.css("bottom", "48px");
isPlaying = true;
} }
elem.html(options.html).trigger("create"); elem.html(options.html).trigger("create");
@ -329,9 +338,13 @@ var Dashboard = {
footer.on("notification.remove notification.hide", function (e) { footer.on("notification.remove notification.hide", function (e) {
setTimeout(function () { // give the DOM time to catch up setTimeout(function () { // give the DOM time to catch up
console.log("html", parentElem.html() == "", this);
if (parentElem.html() == "") { if (parentElem.html() == "") {
footer.slideUp(); if (!isPlaying) {
footer.slideUp();
} else {
footer.css({ height: "0" });
videoBackdrop.animate({ bottom: "0" }, 400);
}
} }
}, 50); }, 50);
}); });