Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 40d3959

Browse files
committed
MediaOnOff is not supported by QUIC agent.
1 parent 8e0471d commit 40d3959

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

source/agent/quic/index.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -264,27 +264,7 @@ module.exports = function (rpcClient, selfRpcId, parentRpcId, clusterWorkerIP) {
264264
};
265265

266266
that.mediaOnOff = function (connectionId, track, direction, action, callback) {
267-
log.debug('mediaOnOff, connection id:', connectionId, 'track:', track, 'direction:', direction, 'action:', action);
268-
var conn = router.getConnection(connectionId);
269-
if (conn) {
270-
if (conn.type === 'quic') {//NOTE: Only webrtc connection supports media-on-off
271-
conn.connection.onTrackControl(track,
272-
direction,
273-
action,
274-
function () {
275-
callback('callback', 'ok');
276-
}, function (error_reason) {
277-
log.info('trac control failed:', error_reason);
278-
callback('callback', 'error', error_reason);
279-
});
280-
} else {
281-
log.info('mediaOnOff on non-webrtc connection');
282-
callback('callback', 'error', 'mediaOnOff on non-webrtc connection');
283-
}
284-
} else {
285-
log.info('Connection does NOT exist:' + connectionId);
286-
callback('callback', 'error', 'Connection does NOT exist:' + connectionId);
287-
}
267+
callback('callback', 'error', 'MediaOnOff is not supported by QUIC agent.');
288268
};
289269

290270
that.close = function() {

0 commit comments

Comments
 (0)