removeSubscription method
Future<Result<None> >
removeSubscription({
- required String userId,
- required String sessionId,
- required String trackIdPrefix,
- required SfuTrackTypeVideo trackType,
- RtcVideoDimension? videoDimension,
Implementation
Future<Result<None>> removeSubscription({
required String userId,
required String sessionId,
required String trackIdPrefix,
required SfuTrackTypeVideo trackType,
RtcVideoDimension? videoDimension,
}) async {
final result = await _session?.updateSubscription(
SubscriptionChange.update(
userId: userId,
sessionId: sessionId,
trackIdPrefix: trackIdPrefix,
trackType: trackType,
),
) ??
Result.error('Session is null');
if (result.isSuccess) {
_stateManager.participantRemoveSubscription(
userId: userId,
sessionId: sessionId,
trackIdPrefix: trackIdPrefix,
trackType: trackType,
);
}
return result;
}