WebRTC service
1. How I fit WebRTC service to whole my application.
Because I made Global objects with references to all application services I split Android service code to Starter and
and WebRTC service body.
2. How I organized WebRTC service body.
-
(1) I make logging full state is services instead simple idiotic Log.d, this is first critical point, because this is event based protocol.
-
(2) We already need understand in what point in Protocol State machine we were are. Because all this code working asynchronously important point is changing protocol states.
Any synchronous WebRTC protocol events accepted by listener, what connected to low-level library livekit.org.webrtc
(3) I split all WebRTC functionality to class, one class has own responsibility.
3. Benefits of this clear structure.
Because service is sophisticated asynchronous protocol event handler I need clear structure to connect this service to SIP service and to testing. About testing you can see this page - Isolate Android WebRTC service with MoSKito and testing it with endpoint based on Node.JS WebRTC endpoint.
AndroidMosaic context:
)
|
|