Hello,
We are using the MIP Mobile Web SDK library and could use some help trying to obtain microphone and speaker data so that I may implement PTT and audio streaming functionality in a react-based web application.
We have a test camera that know has a microphone and speaker, and have tested it and this camera’s data does come back with the necessary microphone/speaker data on milestone’s own web application when making the getAllViews request.
However, when making a similar getAllViews request (no CHAP Challenge params), we do not receive the microphone/speaker data associated with the test camera. Is there a different way we should be querying for this data? Or, is there potentially necessary configuration that we may be missing when initializing the SDK? Any help is much appreciated.
Thanks!
Hello Michael,
Thank you for the details. To help troubleshoot the issue more effectively, could you please provide the following:
- SDK Version: Can you confirm which version of the MIP Mobile Web SDK you are currently using?
- Sample Code: Could you share a snippet of the code you’re using for the getAllViews request that doesn’t return the microphone/speaker data? This will help us better understand the approach you’re taking.
Once we have this information, we can investigate further and provide guidance.
Thank you Daniel,
We are currently using XProtect 2023 R3 release and here is the snippet below.
The normalize method just standardizes object keys to camel case and converts ‘Yes’/‘No’ values to booleans. Also, when calling fetchAllViews we do not pass in a success or error callback.
/**
* Fetch All Views for a User
* @see https://doc.developer.milestonesys.com/mipsdkmobile/reference/WebSDKdoc/global.html#getAllViews
*/
public fetchAllViews(onSuccess?: SuccessCb, onError?: ErrorCb) {
return new Promise((resolve, reject) => {
const connectionRequest = this.sdk.getAllViews(
(res: ResponseItem\[\]) => {
const results = this.normalize(res);
onSuccess && onSuccess(this.normalize(results));
resolve(results);
},
(error: any) => {
const errorObj = this.handleResponseError(error, 'fetchAllViews');
onError && onError(errorObj);
reject(errorObj);
},
);
});
}