Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cannot remove an observer <AVCaptureMultiCamSession 0x301ef44e0> for the key path \"enabled\" from <AVCaptureConnection 0x301e2ec60> because it is not registered as an observer. #687

Open
lurongshuang opened this issue Jan 16, 2025 · 0 comments

Comments

@lurongshuang
Copy link

Describe the bug
Continuously switching resolution configuration will cause flashback
To Reproduce

Expected behavior

Platform information
iphone 12 pro 18.1.1

  • Flutter version: Flutter (Channel stable, 3.24.3, on macOS 15.1.1 24B91 darwin-arm64, locale
    zh-Hans-CN)
  • Flutter console log:
    Cannot remove an observer <AVCaptureMultiCamSession 0x301ef44e0> for the key path "enabled" from <AVCaptureConnection 0x301e2ec60> because it is not registered as an observer.
  Future<bool?> setPixels(UNEEDVideoParameters parameters) async {
    if (_room == null || _room?.localParticipant == null) {
      return Future.value(false);
    }
    var cameraPosition = (_room?.localParticipant?.videoTrackPublications.first
            .track?.currentOptions as CameraCaptureOptions)
        .cameraPosition;
    var captureOptions = getCurRoom()
        ?.roomOptions
        .defaultCameraCaptureOptions
        .copyWith(params: parameters, cameraPosition: cameraPosition);
    var locTrack = await LocalVideoTrack.createCameraTrack(captureOptions);
    for (var el in _room?.localParticipant?.videoTrackPublications ?? []) {
      _room?.localParticipant?.removePublishedTrack(el.sid);
    }
    await _room?.localParticipant?.publishVideoTrack(locTrack);
    return Future.value(true);
  }
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant