While integrating the Milestone SDK on our side for video streaming, we’ve encountered some issues.
Architecture
- Mobile server: Hosted in another environment (controlled by our partner client for whom we are integrating milestone in our product) other than our web client
- Backend server: handling Connect & Login command and sending response to client
- Client (Web): Using response from the backend client directly connects with Mobile server
Execution flow
- Client(web) asks backend to initiate a session with Mobile server
- Backend connects with Mobile server and sends Connect & Login command to start the streaming session and sends the response to Client
- Using response from backend server, now client directly connects with Mobile server and sends the initial commands “LiveMessage”, “Request Stream” and tries to initiate WebSocket connection for streaming.
We are yet to configure CORS on mobile server (as it is controlled by our partner client) for In our development environment we are bypassing CORS (disabling browser security). So, we are able to connect to mobile server and send commands(LiveMessage, RequestStream, etc.) to mobile server without CORS issue from Web.
When client(web) attempts to send few commands (as per the logic in SDK) to mobile server it works fine till it initiate WebSocket connection,
We get following errors,
- Error during WebSocket handshake: Unexpected response code: 410
- Error during WebSocket handshake: Unexpected response code: 400
We want to know, what can be the underlying issue here? is it related to missing configuration on Mobile server OR network configuration where mobile server is deployed?