Skip to content

feat(plugin-cc): added-werbtc-task-refactor#1

Closed
adhmenon wants to merge 5 commits into
voice-taskfrom
webrtc
Closed

feat(plugin-cc): added-werbtc-task-refactor#1
adhmenon wants to merge 5 commits into
voice-taskfrom
webrtc

Conversation

@adhmenon

Copy link
Copy Markdown
Owner

COMPLETES #< CAI-6475 >

This pull request addresses

  • Completes the task refactor for the webRTC task

by making the following changes

  • Added code to handle state for webrtc events and update the task ui controls.
  • Added sample app changes and basic methods for webrtc.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios where tested

  • Tested basic call control in sample app via webrtc
  • Tested advanced call control in sample app via webrtc

I certified that

  • I have read and followed contributing guidelines

  • I discussed changes with code owners prior to submitting this pull request

  • I have not skipped any automated checks

  • All existing and new tests passed

  • I have updated the documentation accordingly


Make sure to have followed the contributing guidelines before submitting.

callOptions: {isEndCallEnabled?: boolean; isEndConsultEnabled?: boolean} = {}
) {
super(contact, data, callOptions);
this.updateTaskUiControls({accept: [true, true], decline: [true, true]});

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Setting up the initial buttons when the task is created.

*/
protected setUIControls(): void {
// TODO: This implementation will change based on the type of task. We need to modify it appropriately, we can even read from task data rather than listening to events
super.setUIControls();

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Most controls will be set by the parent class, only mute needs to be set for webrtc.
By default isEndCallEnabled and isEndConsultEnabled will be true for voice task if we do not provide any flag, which is the case for webrtc.

expect(webCallingService.muteUnmuteCall).toHaveBeenCalledWith(dummyStream);
});

describe('WebRTC internal methods', () => {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Some basic tests.

@adhmenon adhmenon closed this Jun 24, 2025
@adhmenon
adhmenon deleted the webrtc branch June 24, 2025 03:46
@adhmenon
adhmenon restored the webrtc branch June 24, 2025 03:46
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.

1 participant