-
Notifications
You must be signed in to change notification settings - Fork 16
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
Handle voice playback failure #731
Conversation
🦋 Changeset detectedLatest commit: 5d69bb8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -104,6 +104,10 @@ export class CallPlaybackAPI | |||
} | |||
|
|||
ended() { | |||
if (['finished', 'error'].includes(this.state)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Can you create a const at the top with the states to check? Like ENDED_STATES = [...]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅
resolve(true) | ||
}) | ||
}) | ||
await waitForPlaybackEnded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed already: lets add a comment explaining the logic in here since the playback ends because the inbound call hangup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done ✅ Let me know if I can improve it further
See #732 |
On playback failure
playback.failed
event to the end-user,This PR also includes an e2e test case for the playback function.