SetMediaTime
Control media playback by setting specific start times in milliseconds. Jump to scenes or set replay positions for media sources during streaming presentations.
Instructions
Sets the current playback time of a media source. 用途: 特定シーンへのジャンプ、リプレイの開始位置設定
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Implementation Reference
- src/index.ts:752-761 (handler)The handler logic for the 'SetMediaTime' tool. It extracts sourceName and mediaTime from parameters, calls the OBS WebSocket method 'SetMediaInputCursor' via sendToObs, and returns success or error structured content.case "SetMediaTime": const timeParams = params as { sourceName: string; mediaTime: number }; console.log(`Executing SetMediaTime with params:`, timeParams); try { await sendToObs("SetMediaInputCursor", { inputName: timeParams.sourceName, mediaCursor: timeParams.mediaTime }, context, action.name); return { structuredContent: { success: true } }; } catch (e: any) { console.error(`Error in SetMediaTime for OBS:`, e.message); return { structuredContent: { success: false, error: e.message } }; }