Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changes/fix-camera-options-copywith
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patch type="fixed" "Fix missing params in CameraCaptureOptions.copyWith"
1 change: 1 addition & 0 deletions .changes/fix-processor-stop
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
patch type="fixed" "Stop processor on track end"
7 changes: 7 additions & 0 deletions lib/src/track/local/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,13 @@ abstract class LocalTrack extends Track {
logger.severe('MediaStreamTrack.dispose() did throw $error');
}
_stopped = true;
try {
if (_processor != null) {
await stopProcessor();
}
} catch (error) {
logger.severe('LocalTrack.stopProcessor did throw: $error');
}
}
return didStop;
}
Expand Down
11 changes: 9 additions & 2 deletions lib/src/track/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class CameraCaptureOptions extends VideoCaptureOptions {
params: captureOptions.params,
deviceId: captureOptions.deviceId,
maxFrameRate: captureOptions.maxFrameRate,
processor: captureOptions.processor,
);

@override
Expand Down Expand Up @@ -108,18 +109,24 @@ class CameraCaptureOptions extends VideoCaptureOptions {

// Returns new options with updated properties
CameraCaptureOptions copyWith({
VideoParameters? params,
CameraPosition? cameraPosition,
CameraFocusMode? focusMode,
CameraExposureMode? exposureMode,
String? deviceId,
double? maxFrameRate,
VideoParameters? params,
bool? stopCameraCaptureOnMute,
TrackProcessor<VideoProcessorOptions>? processor,
}) =>
CameraCaptureOptions(
params: params ?? this.params,
cameraPosition: cameraPosition ?? this.cameraPosition,
focusMode: focusMode ?? this.focusMode,
exposureMode: exposureMode ?? this.exposureMode,
deviceId: deviceId ?? this.deviceId,
maxFrameRate: maxFrameRate ?? this.maxFrameRate,
params: params ?? this.params,
stopCameraCaptureOnMute: stopCameraCaptureOnMute ?? this.stopCameraCaptureOnMute,
processor: processor ?? this.processor,
);
}

Expand Down
Loading