This commit is contained in:
parent
a9e3cf2ea5
commit
48f62c8c02
6 changed files with 107 additions and 5 deletions
|
|
@ -72,6 +72,9 @@ private:
|
|||
|
||||
// State freshness tracking
|
||||
int64_t lastDbSyncMs = 0; // Last time state was synced from database
|
||||
|
||||
// Client-reported video end (fallback when duration is unknown)
|
||||
bool videoEndedReported = false; // True when client reports video ended
|
||||
};
|
||||
|
||||
static std::unordered_map<WebSocketConnectionPtr, ViewerInfo> viewers_;
|
||||
|
|
@ -128,6 +131,9 @@ private:
|
|||
const ViewerInfo& info,
|
||||
const Json::Value& data);
|
||||
|
||||
void handleVideoEnded(const WebSocketConnectionPtr& wsConnPtr,
|
||||
const ViewerInfo& info);
|
||||
|
||||
void sendError(const WebSocketConnectionPtr& wsConnPtr, const std::string& error);
|
||||
void sendSuccess(const WebSocketConnectionPtr& wsConnPtr, const Json::Value& data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue