vue-advanced-chat
vue-advanced-chat copied to clipboard
feat: Add JJSIP based phone option to chat
trafficstars
Integrates JJSIP.js to enable voice call functionality within chat rooms.
Key changes:
- Added
jjsipService.jsto manage JJSIP User Agent, call session lifecycle (make, answer, hangup), and event handling. - Modified
Room.vueto:- Initialize and use
jjsipService. - Manage call states (incoming, active, errors).
- Render UI for incoming call notifications (with Answer/Decline) and active call display (with Hang Up).
- Include an
<audio>element for remote audio playback, connected viajjsipService.
- Initialize and use
- Updated
RoomHeader.vueto include a "Call" button that initiates calls. - Made JJSIP credentials (SIP URI, password, server) configurable via props from your demo application (
App.vue->ChatContainer.vue->ChatWindow.vue->Room.vue). - Added a placeholder
vendor/jjsip.min.jsas the JJSIP library was not found on standard package managers/CDNs during development. - Implemented unit tests for
jjsipService.js,Room.vue, andRoomHeader.vueto cover the new functionality, including mocking of the JJSIP library and service interactions.
What kind of change does this PR introduce? (check at least one)
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:
Does this PR introduce a breaking change? (check one)
- [ ] Yes
- [ ] No
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g.
fix #xxx[,#xxx], where "xxx" is the issue number) - [ ] All tests are passing
If adding a new feature, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)
Other information: