Commit 2cac3ed0 authored by Matt Mascarenhas's avatar Matt Mascarenhas

cinera.c: Add <!-- __CINERA_CUSTOMn__--> tags

Also compress the template code

cinera_player_pre.js: Fix bug in which onRefChanged() tried to call
player.jumpToNextMarker(); before the player was ready. This could
happen if its first marker's timecode is 0:00 and medium is :afk

Enable Theatre mode to work in containers styled with max-width or
max-height
parent c5bc4873
This diff is collapsed.
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
.cineraMenus > .menu > .filter_container .filter_content, .cineraMenus > .menu > .filter_container .filter_content,
.cineraPlayerContainer .markers_container > .markers .marker .cineraContent .cineraCategories { .cineraPlayerContainer .markers_container > .markers .marker .cineraContent .cineraCategories {
cursor: pointer; cursor: pointer;
display: flex; display: inline-flex;
align-items: center; align-items: center;
} }
...@@ -575,7 +575,6 @@ ...@@ -575,7 +575,6 @@
} }
.cineraPlayerContainer .markers_container > .markers .marker .cineraContent .cineraCategories { .cineraPlayerContainer .markers_container > .markers .marker .cineraContent .cineraCategories {
display: inline-flex;
margin: 4px; margin: 4px;
} }
......
...@@ -107,7 +107,9 @@ var cineraProps = { ...@@ -107,7 +107,9 @@ var cineraProps = {
X: null, X: null,
Y: null, Y: null,
W: null, W: null,
mW: null,
H: null, H: null,
mH: null,
P: null P: null
}; };
......
...@@ -465,7 +465,9 @@ function toggleTheatreMode() { ...@@ -465,7 +465,9 @@ function toggleTheatreMode() {
cineraProps.X = cinera.style.left; cineraProps.X = cinera.style.left;
cineraProps.Y = cinera.style.top; cineraProps.Y = cinera.style.top;
cineraProps.W = cinera.style.width; cineraProps.W = cinera.style.width;
cineraProps.mW = cinera.style.maxWidth;
cineraProps.H = cinera.style.height; cineraProps.H = cinera.style.height;
cineraProps.mH = cinera.style.maxHeight;
cineraProps.P = cinera.style.position; cineraProps.P = cinera.style.position;
cinera.style.backgroundColor = "#000"; cinera.style.backgroundColor = "#000";
...@@ -473,7 +475,9 @@ function toggleTheatreMode() { ...@@ -473,7 +475,9 @@ function toggleTheatreMode() {
cinera.style.left = 0; cinera.style.left = 0;
cinera.style.top = 0; cinera.style.top = 0;
cinera.style.width = "100%"; cinera.style.width = "100%";
cinera.style.maxWidth = "100%";
cinera.style.height = "100%"; cinera.style.height = "100%";
cinera.style.maxHeight = "100%";
cinera.style.position = "fixed"; cinera.style.position = "fixed";
viewItems[0].setAttribute("data-id", "regular"); viewItems[0].setAttribute("data-id", "regular");
...@@ -491,7 +495,9 @@ function toggleTheatreMode() { ...@@ -491,7 +495,9 @@ function toggleTheatreMode() {
cinera.style.left = cineraProps.X; cinera.style.left = cineraProps.X;
cinera.style.top = cineraProps.Y; cinera.style.top = cineraProps.Y;
cinera.style.width = cineraProps.W; cinera.style.width = cineraProps.W;
cinera.style.maxWidth = cineraProps.mW;
cinera.style.height = cineraProps.H; cinera.style.height = cineraProps.H;
cinera.style.maxHeight = cineraProps.mH;
cinera.style.position = cineraProps.P; cinera.style.position = cineraProps.P;
viewItems[0].setAttribute("data-id", "theatre"); viewItems[0].setAttribute("data-id", "theatre");
...@@ -1173,7 +1179,7 @@ function onRefChanged(ref, element) { ...@@ -1173,7 +1179,7 @@ function onRefChanged(ref, element) {
filter.querySelector(".filter_content." + element.classList[selector].replace(/^off_/, "")).classList.add("responsible"); filter.querySelector(".filter_content." + element.classList[selector].replace(/^off_/, "")).classList.add("responsible");
} }
} }
if((element.classList[selector].startsWith("cat_") || element.classList[selector] in filterState)) if(element.classList[selector].startsWith("cat_") || element.classList[selector] in filterState)
{ {
if(!filter.querySelector(".filter_mode").classList.add("responsible")) if(!filter.querySelector(".filter_mode").classList.add("responsible"))
{ {
...@@ -1182,7 +1188,10 @@ function onRefChanged(ref, element) { ...@@ -1182,7 +1188,10 @@ function onRefChanged(ref, element) {
} }
setTimeout(resetFade, 8000); setTimeout(resetFade, 8000);
} }
if(player && player.playing)
{
player.jumpToNextMarker(); player.jumpToNextMarker();
}
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment