diff --git a/src/main/js/webrtc_adaptor.js b/src/main/js/webrtc_adaptor.js index 0baf34d5..ae7c4489 100644 --- a/src/main/js/webrtc_adaptor.js +++ b/src/main/js/webrtc_adaptor.js @@ -878,6 +878,22 @@ export class WebRTCAdaptor { this.webSocketAdaptor.send(JSON.stringify(jsCmd)); } + /** + * Called to get the subtrack count for a specific maintrack. AMS responds with the subtrackCount callback. + * @param {string} streamId : main track id + * @param {string} role : filter the subtracks with the role + * @param {string} status : filter the subtracks with the status + */ + getSubtrackCount(streamId, role, status) { + let jsCmd = { + command: "getSubtracksCount", + streamId: streamId, + role: role, + status: status, + }; + this.webSocketAdaptor.send(JSON.stringify(jsCmd)); + } + /** * Called to enable/disable data flow from the AMS for a specific track under a main track. * Parameters: