apivideo / api.video-flutter-live-stream

Flutter RTMP live stream client. Made with ♥ by api.video
MIT License
62 stars 37 forks source link

[Bug]: iOS Camera Does Not Dispose #33

Closed kodypeterson closed 1 year ago

kodypeterson commented 1 year ago

Version

v1.1.1

Which operating systems have you used?

Environment that reproduces the issue

iPhone 11 (iOS 16.3.1)

Is it reproducible in the example application?

Not tested

RTMP Server

N/A

Reproduction steps

  1. Start a preview by initializing the controller
  2. Call controller.stopPreview()

Expected result

The preview is stopped and the privacy center shows that the app used the camera recently.

Actual result

The preview is stopped although the privacy center shows that the app is still using the camera. Noteworthy, the microphone is showing as used recently instead of in use.

Additional context

No response

Relevant logs output

No response

ThibaultBee commented 1 year ago

Hi,

From what I read from HaishinKit (the iOS native library), stopping the preview (internaly calling attachStream(nil)) does not really stop the preview but just set a flag to passthrough so frames are not processed. See here.

We could just add a notice explaining this behavior in the documentation to avoid the confusion.

Is this a blocking issue for you or your user? If yes, then we should add an issue in HaishinKit.

Best regards, Thibault

kodypeterson commented 1 year ago

Thanks! I have opened an issue here https://github.com/shogo4405/HaishinKit.swift/issues/1205

ThibaultBee commented 1 year ago

I have updated HaishinKit on the main branch. Could you check if the bug is fixed?

kodypeterson commented 1 year ago

I can confirm this is now resolved!