resume
Resume paused playback from where it was paused.
Returns
Promise<Record<string, unknown>> — Server acknowledgment.
Resume paused playback from where it was paused.
Promise<Record<string, unknown>> — Server acknowledgment.
1 import { RelayClient } from '@signalwire/sdk'; 2 3 const client = new RelayClient({ 4 project: process.env.SIGNALWIRE_PROJECT_ID!, 5 token: process.env.SIGNALWIRE_API_TOKEN!, 6 contexts: ['default'] 7 }); 8 9 client.onCall(async (call) => { 10 await call.answer(); 11 const action = await call.play( 12 [{ type: 'audio', url: 'https://example.com/hold-music.mp3' }], 13 { loop: 0 }, 14 ); 15 16 await action.pause(); 17 // ... do something ... 18 await action.resume(); 19 }); 20 21 await client.run();