{"record":{"id":"9a8231b9c0bbf250","repo":"remotion-dev/remotion","slug":"studio-playback-controls-are-not-ready","errorCode":null,"errorMessage":"Studio playback controls are not ready.","messagePattern":"Studio playback controls are not ready\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":1533,"sourceCode":"\t\t\t\t\t\ttype: 'object',\n\t\t\t\t\t\tproperties: {},\n\t\t\t\t\t\tadditionalProperties: false,\n\t\t\t\t\t},\n\t\t\t\t\tannotations: {readOnlyHint: false},\n\t\t\t\t\texecute: () => {\n\t\t\t\t\t\tconst compositionId = currentCompositionRef.current;\n\t\t\t\t\t\tif (compositionId === null) {\n\t\t\t\t\t\t\tthrow new Error('No composition is currently selected.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (getCurrentDuration() <= 1) {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'The current composition is a still and cannot play.',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (Internals.timeValueRef.current === null) {\n\t\t\t\t\t\t\tthrow new Error('Studio playback controls are not ready.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tplay();\n\t\t\t\t\t\treturn Promise.resolve({\n\t\t\t\t\t\t\tcurrentContent: currentContentRef.current,\n\t\t\t\t\t\t\tplaying: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{signal: controller.signal},\n\t\t\t),\n\t\t\tmodelContext.registerTool(\n\t\t\t\t{\n\t\t\t\t\tname: 'pause',\n\t\t\t\t\ttitle: 'Pause Studio composition',\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t'Pause the current Remotion Studio composition at the current frame.',\n\t\t\t\t\tinputSchema: {","sourceCodeStart":1515,"sourceCodeEnd":1551,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L1515-L1551","documentation":"The play tool requires Internals.timeValueRef.current to be non-null; it is null when the Studio player/playback UI has not mounted yet.","triggerScenarios":"Calling play very early during Studio bootstrap before the player controls are mounted, or in an environment where the player did not render.","commonSituations":"Racing MCP tool calls against Studio startup.","solutions":["Wait for the Studio player UI to be mounted (composition fully loaded) before calling play","Retry after load completes"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await playTool(); } catch (e) { if (e.message.includes('not ready')) { await waitForStudioReady(); await playTool(); } else throw e; }","preventionTips":["Wait for the player UI to mount before playback commands","Retry once after startup"],"tags":["mcp","playback","initialization"],"backgroundTag":"player-not-initialized","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-08-28T15:39:09.316Z","contentChangedAt":"2026-08-28T15:39:09.316Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}