Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix play stop by * #78

Closed
wants to merge 2 commits into from
Closed

fix play stop by * #78

wants to merge 2 commits into from

Conversation

xquanluu
Copy link
Collaborator

@xquanluu xquanluu commented Jul 7, 2023

@davehorton
Copy link
Collaborator

seems to cause test failiure

@@ -387,7 +387,6 @@ test('record', (t) => {
return ep.set('playback_terminators', '123456789#*');
})
.then(() => {
ep.play(['silence_stream://1000', 'voicemail/8000/vm-record_message.wav']);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we just removing this to make the test pass?

@xquanluu
Copy link
Collaborator Author

xquanluu commented Jul 7, 2023

@davehorton
the test failed because:
.then(() => {
return ep.set('playback_terminators', '123456789#*');
})
.then(() => {
ep.play(['silence_stream://1000', 'voicemail/8000/vm-record_message.wav']);
promiseRecord = ep.record(EP_FILE2, {timeLimitSecs: 3});
t.pass('started recording');
return uac.generateSilence(2000);
})

The testcase set 'playback_terminators', '123456789#*', then play will clean 'playback_terminators', 'none'

i have to remove ep.play(['silence_stream://1000', 'voicemail/8000/vm-record_message.wav']);

@@ -299,6 +299,7 @@ class Endpoint extends Emitter {
'file param is required and must be a string, array or PlaybackOptions object');

let timeoutSecs = -1;
const playback_terminators = file.playback_terminators ? file.playback_terminators : 'none';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this eliminates the ability to call ep.set('playback_terminators') explicitly and then do ep.play. So we are removing a feature here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems yes, and no

if you want to play with playback_terminators, in the file object, please put the value directly

file = {
url,
playback_terminators,
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah wait, file can be array

@xquanluu xquanluu closed this Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants