Spaces:
Running
Running
Commit History
-
CROW_ROUTE(app, "/")([]() {
Verified signaturecrow::response fres; fres.redirect_perm("/static"); return fres; }); // Gets JSON array of recoded videos, included currently recording video CROW_ROUTE(app, "/videos")([&rec]() { json fres = json::array({}); for (const auto entry : rec.recordings()) if (entry.is_regular_file()) fres.emplace_back(entry.path().filename().string()); return crow::response("application/json", fres.dump()); }); // Get duration of current recording CROW_ROUTE(app, "/duration")([&rec](const crow::request& req) { const auto fres = rec.uptime(); if (fres.has_value()) return crow::response("text/plain", std::to_string(fres.value())); return crow::response(crow::status::NOT_FOUND); }); // Gets thumbnail of current recording CROW_ROUTE(app, "/thumbnail")([&rec](const crow::request& req) { if (!rec.running()) return crow::response(crow::status::NOT_FOUND); crow::response fres; fres.redirect("/thumbnail/" + rec.file().filename().strin…8876673 -
initial commit
Verified signaturec44db84