mirror of
https://github.com/UiO-Gaming/infoscreen3.git
synced 2026-11-05 13:56:52 +01:00
Merge pull request #75 from kasimos/videoTransition
Fix webgl transition from video/webpages to slide
This commit is contained in:
4 files changed
+21
-15
No files matched your search
@@ -367,6 +367,9 @@ export default class admin {
|
||||
}
|
||||
|
||||
bundle.save();
|
||||
// Adds empty slide render for smooth transitions
|
||||
fs.copyFileSync("./templates/bundle/render/empty.png","./data/bundles/" + data.bundleName + "/render/" + filename + ".png")
|
||||
|
||||
|
||||
cli.success("save web link");
|
||||
socket.emit("callback.saveLink", {});
|
||||
@@ -442,6 +445,9 @@ export default class admin {
|
||||
}
|
||||
|
||||
bundle.save();
|
||||
// Adds empty slide render for smooth transitions
|
||||
// Could be enhanced with the actual last video frame
|
||||
fs.copyFileSync("./templates/bundle/render/empty.png","./data/bundles/" + data.bundleName + "/render/" + filename + ".png")
|
||||
|
||||
cli.success("save video link");
|
||||
socket.emit("callback.saveVideo", {});
|
||||
|
||||
+12
-14
@@ -115,21 +115,19 @@ export default class bundleClass {
|
||||
x++;
|
||||
}
|
||||
if (slide.uuid === uuid) {
|
||||
if (slide.type === "slide") {
|
||||
let path = process.cwd() + "/data/bundles/" + this.name;
|
||||
try {
|
||||
uuid = checkAndSanitizeFilePathName(uuid)
|
||||
if (fs.existsSync(path + "/render/" + uuid + ".png")) {
|
||||
fs.unlinkSync(path + "/render/" + uuid + ".png");
|
||||
cli.success("removing file:" + path + "/render/" + uuid + ".png");
|
||||
}
|
||||
if (fs.existsSync(path + "/slides/" + uuid)) {
|
||||
fs.unlinkSync(path + "/slides/" + uuid);
|
||||
cli.success("removing file:" + path + "/slides/" + uuid);
|
||||
}
|
||||
} catch (err) {
|
||||
cli.error("error while deleting file:" + uuid, err);
|
||||
let path = process.cwd() + "/data/bundles/" + this.name;
|
||||
try {
|
||||
uuid = checkAndSanitizeFilePathName(uuid)
|
||||
if (fs.existsSync(path + "/render/" + uuid + ".png")) {
|
||||
fs.unlinkSync(path + "/render/" + uuid + ".png");
|
||||
cli.success("removing file:" + path + "/render/" + uuid + ".png");
|
||||
}
|
||||
if (fs.existsSync(path + "/slides/" + uuid)) {
|
||||
fs.unlinkSync(path + "/slides/" + uuid);
|
||||
cli.success("removing file:" + path + "/slides/" + uuid);
|
||||
}
|
||||
} catch (err) {
|
||||
cli.error("error while deleting file:" + uuid, err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,11 +295,13 @@ function nextSlide(data) {
|
||||
$("#slider").hide();
|
||||
video.pause();
|
||||
$("#stream").hide();
|
||||
sketch.showSlide(serverOptions.currentFile, serverOptions.transition);
|
||||
$("#" + getWebLayer()).css("transform", "scale(" + serverOptions.currentMeta.zoom + ")");
|
||||
$("#" + getWebLayer()).addClass("fadeIn").removeClass("fadeOut");
|
||||
displayWebPage(serverOptions.currentMeta.webUrl);
|
||||
break;
|
||||
case "video":
|
||||
sketch.showSlide(serverOptions.currentFile, serverOptions.transition);
|
||||
displayVideo(serverOptions.currentMeta.url, serverOptions.currentMeta.loop, serverOptions.currentMeta.mute);
|
||||
setTimeout(function () {
|
||||
clearIFrame(getWebLayer());
|
||||
@@ -446,7 +448,7 @@ async function preloadImages(data) {
|
||||
|
||||
for (let i in allSlides) {
|
||||
try {
|
||||
if (allSlides[i].type === "slide") {
|
||||
if (allSlides[i].type === "slide" || allSlides[i].type === "video") {
|
||||
await sketch.loadImage("/render/" + serverOptions.currentBundle + "/" + allSlides[i].uuid + ".png", allSlides[i].uuid);
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
Reference in new issue
Block a user