gnaudio / jabra-browser-integration

JavaScript library to control a Jabra headset from a browser
https://www.npmjs.com/package/@gnaudio/jabra-browser-integration
MIT License
3 stars 1 forks source link

FLow diagrams for v2.0 library #36

Closed srtella closed 5 years ago

srtella commented 5 years ago

Flow diagrams like (https://github.com/gnaudio/jabra-browser-integration/blob/master/docs/old/hold-resume-from-device.png) are mising for v2.0.

ghost commented 5 years ago

I agree that this should be in v2.0 also. I have added this to our backlog.

frederiksen commented 5 years ago

Here's the source for the sequence diagrams. Use it here: https://www.websequencediagrams.com/ I suggest that we maintain these as file in this repo.

1 outgoing-call-then-end-call:

title outgoing-call-then-end-call

"App"->"Jabra Browser Integration library": jabra.offHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Device goes into call state "App"->"Jabra Browser Integration library": jabra.onHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Device goes out of call state

2 incoming-call-then-accept-on-device-then-end-call

title incoming-call-then-accept-on-device-then-end-call

"App"->"Jabra Browser Integration library": jabra.ring() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Start device ringer note right of "Jabra USB device": User accepts call "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": "onNotify(jabra.requestEnum.acceptCall)" "App"->"Jabra Browser Integration library": jabra.offHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Device stops ringing and goes into call state note right of "Jabra USB device": The user presses end call button "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": "onNotify(jabra.requestEnum.endCall)" "App"->"Jabra Browser Integration library": jabra.onHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": The device goes out of call state

3 incoming-call-then-user-rejects

title incoming-call-then-user-rejects

"App"->"Jabra Browser Integration library": jabra.ring() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Start device ringer note right of "Jabra USB device": User rejects call "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": onNotify(jabra.requestEnum.rejectCall) "App"->"Jabra Browser Integration library": jabra.onHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": The device stops ringing

4 mute-unmute-from-device

title mute-unmute-from-device

"App"->"Jabra Browser Integration library": jabra.offHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Device is in call state note right of "Jabra USB device": User presses mute "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": onNotify(jabra.requestEnum.mute) "App"->"Jabra Browser Integration library": jabra.mute() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": The device mutes note right of "Jabra USB device": User presses unmute "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": onNotify(jabra.requestEnum.unmute) "App"->"Jabra Browser Integration library": jabra.unmute() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": The device unmutes

"App"->"Jabra Browser Integration library": jabra.onHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": End call

5 hold-resume-from-device title hold-resume-from-device

"App"->"Jabra Browser Integration library": jabra.offHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": Device is in call state note right of "Jabra USB device": User presses flash "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": onNotify(jabra.requestEnum.flash) "App"->"Jabra Browser Integration library": jabra.onHook() "App"->"Jabra Browser Integration library": jabra.hold() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": The device goes into held state note right of "Jabra USB device": User presses flash "Jabra USB device"->"Jabra Browser Integration library": "" "Jabra Browser Integration library"->"App": onNotify(jabra.requestEnum.flash) "App"->"Jabra Browser Integration library": jabra.resume() "App"->"Jabra Browser Integration library": jabra.offHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": The device goes out of held state "App"->"Jabra Browser Integration library": jabra.onHook() "Jabra Browser Integration library"->"Jabra USB device": "" note right of "Jabra USB device": End call

ghost commented 5 years ago

Thanks to the nice source provided by @frederiksen, I have re-introduced the diagrams with the tiny changed needed for the 2.0 Api