resume

View as MarkdownOpen in Claude

Resume paused playback from where it was paused.

Returns

Promise<Record<string, unknown>> — Server acknowledgment.

Example

import { RelayClient } from '@signalwire/sdk';
const client = new RelayClient({
project: process.env.SIGNALWIRE_PROJECT_ID!,
token: process.env.SIGNALWIRE_API_TOKEN!,
contexts: ['default']
});
client.onCall(async (call) => {
await call.answer();
const action = await call.play(
[{ type: 'audio', url: 'https://example.com/hold-music.mp3' }],
{ loop: 0 },
);
await action.pause();
// ... do something ...
await action.resume();
});
await client.run();