Skip to content

Commit 5c57d97

Browse files
committed
wip
1 parent 6cf134c commit 5c57d97

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/endpoint.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,7 @@ class Endpoint extends Emitter {
12391239
/**
12401240
* Pause sending audio over the websocket connection
12411241
* @param {string} [bugname] - bugname to pause
1242-
* @param {boolean} [silence] - whether to send silence frames while paused
1242+
* @param {boolean} [silence] - whether to send silence frames while paused, only applied if bugname is specified
12431243
* @param {function} [callback] - callback invoked when api request completes
12441244
* @return {Promise|Endpoint} returns a Promise if no callback supplied; otherwise
12451245
* a reference to the Endpoint object
@@ -1276,9 +1276,10 @@ class Endpoint extends Emitter {
12761276
//forkAudioPause('my-bugname', true)
12771277
}
12781278
//forkAudioPause('my-bugname', true, callback)
1279-
//2nd argument is silence, 3rd is bugname
1280-
args.push(silence ? 'silence' : 'blank');
1281-
if (bugname) args.push(bugname);
1279+
if (bugname) {
1280+
args.push(bugname);
1281+
args.push(silence ? 'silence' : 'blank');
1282+
}
12821283

12831284
const __x = (callback) => {
12841285
debug(`calling uuid_audio_fork with args ${JSON.stringify(args)}`);

test/endpoint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ test.skip('fork audio', (t) => {
521521
return uac.playFile('voicemail/16000/vm-record_message.wav');
522522
})
523523
.then((evt) => {
524-
return ep.forkAudioPause(true);
524+
return ep.forkAudioPause('background_record', true);
525525
})
526526
.then((evt) => {
527527
return ep.forkAudioResume();

0 commit comments

Comments
 (0)