Skip to content

Commit

Permalink
Add mechanism to get subtrack count
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Nov 20, 2024
1 parent 095b524 commit 69cd8a0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main/js/webrtc_adaptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {

Check warning on line 888 in src/main/js/webrtc_adaptor.js

View check run for this annotation

Codecov / codecov/patch

src/main/js/webrtc_adaptor.js#L888

Added line #L888 was not covered by tests
command: "getSubtracksCount",
streamId: streamId,
role: role,
status: status,
};
this.webSocketAdaptor.send(JSON.stringify(jsCmd));

Check warning on line 894 in src/main/js/webrtc_adaptor.js

View check run for this annotation

Codecov / codecov/patch

src/main/js/webrtc_adaptor.js#L894

Added line #L894 was not covered by tests
}

/**
* Called to enable/disable data flow from the AMS for a specific track under a main track.
* Parameters:
Expand Down

0 comments on commit 69cd8a0

Please sign in to comment.