getMediaTrack function
Implementation
MediaStreamTrack getMediaTrack({
required MediaStream stream,
required String kind,
}) {
final tracks = stream.getTracks();
for (final track in tracks) {
if (track.kind == kind) {
return track;
}
}
throw StateError('Track Not Found');
}