Skip to content

Commit 2eb4c48

Browse files
fix: change local video track constructor (#971)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Updated the internal initialization structure of video track components for improved code organization and maintainability. Thir PR updates the LocalVideoTrack definition to carry an "@internal" annotation and match the LocalAudioTrack version. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 690f276 commit 2eb4c48

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

lib/src/track/local/video.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ class LocalVideoTrack extends LocalTrack with VideoTrack {
175175
}
176176

177177
// Private constructor
178-
LocalVideoTrack._(
178+
@internal
179+
LocalVideoTrack(
179180
TrackSource source,
180181
rtc.MediaStream stream,
181182
rtc.MediaStreamTrack track,
@@ -189,7 +190,7 @@ class LocalVideoTrack extends LocalTrack with VideoTrack {
189190
options ??= const CameraCaptureOptions();
190191

191192
final stream = await LocalTrack.createStream(options);
192-
final track = LocalVideoTrack._(
193+
final track = LocalVideoTrack(
193194
TrackSource.camera,
194195
stream,
195196
stream.getVideoTracks().first,
@@ -218,7 +219,7 @@ class LocalVideoTrack extends LocalTrack with VideoTrack {
218219
options ??= const ScreenShareCaptureOptions();
219220

220221
final stream = await LocalTrack.createStream(options);
221-
return LocalVideoTrack._(
222+
return LocalVideoTrack(
222223
TrackSource.screenShareVideo,
223224
stream,
224225
stream.getVideoTracks().first,
@@ -247,7 +248,7 @@ class LocalVideoTrack extends LocalTrack with VideoTrack {
247248
final stream = await LocalTrack.createStream(options);
248249

249250
final List<LocalTrack> tracks = [
250-
LocalVideoTrack._(
251+
LocalVideoTrack(
251252
TrackSource.screenShareVideo,
252253
stream,
253254
stream.getVideoTracks().first,

0 commit comments

Comments
 (0)