Files
vii 29a0f03a90 fix(webview): launch web Play buttons without waiting for navigation
Roblox defers a launchGame sent from the WebView until the Lua app next
navigates, so joining a private server stalled until a sidebar tab was
clicked. Parse launchGame in the runtime, queue it through the
experience launch pipeline, and close the WebView. Other commands still
reach Roblox.

Fixes #169
2026-09-24 23:02:48 -05:00

33 lines
1.2 KiB
C++

#ifndef MOCKTAIL_RUNTIME_ROBLOX_LAUNCH_URI_H_
#define MOCKTAIL_RUNTIME_ROBLOX_LAUNCH_URI_H_
#include <cstddef>
#include <string_view>
#include "mocktail/status.h"
#include "runtime/roblox_experience_launch_bridge.h"
namespace mocktail {
namespace runtime {
inline constexpr std::size_t kMaximumRobloxLaunchUriBytes = 64 * 1024;
// Converts the two Roblox website launch protocols into the owned
// ExperienceProtocol contract used by the supported game-session pipeline.
// Authentication tickets and tracker IDs are discarded; the runtime already
// has a validated account identity.
Status ParseRobloxLaunchUri(std::string_view uri,
RobloxExperienceLaunchRequest* request);
// Converts a WebView launchGame command
// ({"functionName":"launchGame","params":{"request":{...}}}) into the same
// contract. Returns kUnsupported for other commands and kInvalidArgument for
// a malformed launchGame request.
Status ParseRobloxWebViewLaunchGame(std::string_view command,
RobloxExperienceLaunchRequest* request);
} // namespace runtime
} // namespace mocktail
#endif // MOCKTAIL_RUNTIME_ROBLOX_LAUNCH_URI_H_